Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #240126 > unrolled thread
| Started by | Dedeco Balaco <dedeco.balaco@yahoo.com> |
|---|---|
| First post | 2021-09-19 03:20 +0200 |
| Last post | 2021-09-20 22:40 +0200 |
| Articles | 18 — 6 participants |
Back to article view | Back to linux.debian.user
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
A bug in Vim, in Mate Terminal or in Debian 11? Dedeco Balaco <dedeco.balaco@yahoo.com> - 2021-09-19 03:20 +0200
Re: A bug in Vim, in Mate Terminal or in Debian 11? Jeremy Hendricks <jwh1981@gmail.com> - 2021-09-19 03:30 +0200
Re: A bug in Vim, in Mate Terminal or in Debian 11? Jeremy Hendricks <jwh1981@gmail.com> - 2021-09-19 03:50 +0200
Re: A bug in Vim, in Mate Terminal or in Debian 11? Greg Wooledge <greg@wooledge.org> - 2021-09-19 04:30 +0200
Re: A bug in Vim, in Mate Terminal or in Debian 11? <tomas@tuxteam.de> - 2021-09-19 09:50 +0200
Re: A bug in Vim, in Mate Terminal or in Debian 11? Greg Wooledge <greg@wooledge.org> - 2021-09-19 16:00 +0200
Re: A bug in Vim, in Mate Terminal or in Debian 11? <tomas@tuxteam.de> - 2021-09-19 17:20 +0200
Re: A bug in Vim, in Mate Terminal or in Debian 11? Greg Wooledge <greg@wooledge.org> - 2021-09-19 18:00 +0200
Re: A bug in Vim, in Mate Terminal or in Debian 11? <tomas@tuxteam.de> - 2021-09-19 19:50 +0200
Re: A bug in Vim, in Mate Terminal or in Debian 11? <tomas@tuxteam.de> - 2021-09-19 20:50 +0200
Re: A bug in Vim, in Mate Terminal or in Debian 11? <tomas@tuxteam.de> - 2021-09-19 21:30 +0200
Re: A bug in Vim, in Mate Terminal or in Debian 11? David Wright <deblis@lionunicorn.co.uk> - 2021-09-19 21:40 +0200
Re: A bug in Vim, in Mate Terminal or in Debian 11? <tomas@tuxteam.de> - 2021-09-19 22:00 +0200
Re: A bug in Vim, in Mate Terminal or in Debian 11? David Wright <deblis@lionunicorn.co.uk> - 2021-09-19 22:20 +0200
Re: A bug in Vim, in Mate Terminal or in Debian 11? <tomas@tuxteam.de> - 2021-09-19 22:10 +0200
Re: A bug in Vim, in Mate Terminal or in Debian 11? Greg Wooledge <greg@wooledge.org> - 2021-09-19 16:00 +0200
Re: A bug in Vim, in Mate Terminal or in Debian 11? Mark Neyhart <Mark.Neyhart@akleg.gov> - 2021-09-20 22:40 +0200
Re: A bug in Vim, in Mate Terminal or in Debian 11? Dedeco Balaco <dedeco.balaco@yahoo.com> - 2021-09-20 22:40 +0200
| From | Dedeco Balaco <dedeco.balaco@yahoo.com> |
|---|---|
| Date | 2021-09-19 03:20 +0200 |
| Subject | A bug in Vim, in Mate Terminal or in Debian 11? |
| Message-ID | <CYTER-Hm-1@gated-at.bofh.it> |
[Multipart message — attachments visible in raw view] — view raw
Hello, I recently upgraded my Debian 9 to Debian 11. But there are strange or wrong things happening right now, that did not exist before. My window manager is Mate Desktop. The terminal i most use is its own. And i use vim a lot, and i basically never use gvim, i prefer it through a terminal window. Each mate-terminal window can have several tabs in it. I use this feature a lot too. Each tab has its own title, which works pretty fine. There are several programs that change the title shown while they run. Vim is one of these programs. While it is running, the terminal title shows the name of the file currently being edited, and the number of files that was opened with it, when it was launched. After the upgrade, when i quit vim, the terminal title becomes empty, instead of returning to the default title "Terminal". Why is this happening? A bug in Vim? In mate-terminal? Or in Debian 11?
[toc] | [next] | [standalone]
| From | Jeremy Hendricks <jwh1981@gmail.com> |
|---|---|
| Date | 2021-09-19 03:30 +0200 |
| Message-ID | <CYTOy-Kt-13@gated-at.bofh.it> |
| In reply to | #240126 |
[Multipart message — attachments visible in raw view] — view raw
Generally it’s not recommended to leap frog over releases and you should upgrade in order (Ex. From 9 to 10). I suspect you might need to delete some of the config files in your home directory (rename them it .bak) as the version of vim, etc might be considerable different from 9 to 11 and might have odd results. I’d recommend first renaming .vimrc to .vimrc.bak and see if that fixes it. The next step might be to rename the config files for the mate-terminal and test to see if it’s fixed. On Sat, Sep 18, 2021 at 9:15 PM Dedeco Balaco <dedeco.balaco@yahoo.com> wrote: > Hello, > > I recently upgraded my Debian 9 to Debian 11. But there are strange or > wrong things happening right now, that did not exist before. > > My window manager is Mate Desktop. The terminal i most use is its own. And > i use vim a lot, and i basically never use gvim, i prefer it through a > terminal window. > > Each mate-terminal window can have several tabs in it. I use this feature > a lot too. Each tab has its own title, which works pretty fine. There are > several programs that change the title shown while they run. > > Vim is one of these programs. While it is running, the terminal title > shows the name of the file currently being edited, and the number of files > that was opened with it, when it was launched. > > After the upgrade, when i quit vim, the terminal title becomes empty, > instead of returning to the default title "Terminal". > > Why is this happening? A bug in Vim? In mate-terminal? Or in Debian 11? >
[toc] | [prev] | [next] | [standalone]
| From | Jeremy Hendricks <jwh1981@gmail.com> |
|---|---|
| Date | 2021-09-19 03:50 +0200 |
| Message-ID | <CYU7U-R5-5@gated-at.bofh.it> |
| In reply to | #240127 |
[Multipart message — attachments visible in raw view] — view raw
I apologize for assuming you upgraded from 9 to 11 directly (skipping 10). It’s a common misconception that is acceptable. On Sat, Sep 18, 2021 at 9:46 PM Dedeco Balaco <dedeco.balaco@yahoo.com> wrote: > I did not leap any release. I did everything correctly, step by step. > > The issue is not being reprodutible. I do not find a clear condition to > make it happen. Searching about your suggestion, I found that vim has a > few very important arguments, where 2 of them interest me a lot, to > isolate this issue (I guess): > > $ vim -u NORC # does not load any RC file, global or user's > > $ vim -u NONE # does not load any RC file, and also no plugin > > More information can be found in vim man page, and inside vim: > > :h initialization > > > Em 18/09/2021 22:27, Jeremy Hendricks escreveu: > > Generally it’s not recommended to leap frog over releases and you should > > upgrade in order (Ex. From 9 to 10). I suspect you might need to delete > > some of the config files in your home directory (rename them it .bak) as > > the version of vim, etc might be considerable different from 9 to 11 and > > might have odd results. I’d recommend first renaming .vimrc to > > .vimrc.bak and see if that fixes it. > > > > The next step might be to rename the config files for the mate-terminal > > and test to see if it’s fixed. > > > > On Sat, Sep 18, 2021 at 9:15 PM Dedeco Balaco <dedeco.balaco@yahoo.com > > <mailto:dedeco.balaco@yahoo.com>> wrote: > > > > Hello, > > > > I recently upgraded my Debian 9 to Debian 11. But there are strange > > or wrong things happening right now, that did not exist before. > > > > My window manager is Mate Desktop. The terminal i most use is its > > own. And i use vim a lot, and i basically never use gvim, i prefer > > it through a terminal window. > > > > Each mate-terminal window can have several tabs in it. I use this > > feature a lot too. Each tab has its own title, which works pretty > > fine. There are several programs that change the title shown while > > they run. > > > > Vim is one of these programs. While it is running, the terminal > > title shows the name of the file currently being edited, and the > > number of files that was opened with it, when it was launched. > > > > After the upgrade, when i quit vim, the terminal title becomes > > empty, instead of returning to the default title "Terminal". > > > > Why is this happening? A bug in Vim? In mate-terminal? Or in Debian > 11? > > > >
[toc] | [prev] | [next] | [standalone]
| From | Greg Wooledge <greg@wooledge.org> |
|---|---|
| Date | 2021-09-19 04:30 +0200 |
| Message-ID | <CYUKB-1oH-1@gated-at.bofh.it> |
| In reply to | #240126 |
On Sat, Sep 18, 2021 at 10:14:39PM -0300, Dedeco Balaco wrote: > My window manager is Mate Desktop. The terminal i most use is its own. > And i use vim a lot, > After the upgrade, when i quit vim, the terminal title becomes empty, > instead of returning to the default title "Terminal". The real question is how it worked in stretch. There are several moving pieces here, and it's not at all clear how they all fit together. The terminal's title bar is set whenever some program writes the appropriate bytes to the terminal. Once the title is set to something, it stays that way, until something changes it again. So: under stretch, what program was writing what bytes to the terminal, at what time? We know that vim can be configured to set the title when you start it. This is controlled by the "title" setting. If you have "set title" in your .vimrc file, then at startup, vim will change the terminal's title to the name of the file you're editing. But what happens when vim exits? Vim doesn't know what the *previous* title was, so how can it change the title back? Therefore, when vim exits (with "set title" in your .vimrc file), it changes the title to "Thanks for flying Vim". Vim has another setting called "titleold". If this is set to a non-empty string, vim will use the value of this variable as the new title. So, for example, if you would like the title to be changed to "Terminal" every time you exit vim, you can put these lines in your .vimrc file: set title set titleold=Terminal If titleold is set to the empty string, then the title isn't changed at all on exit -- it just stays as the filename. If there's a *third* option (to make vim somehow read the previous title from the terminal, if that's even possible), then I don't know how to achieve it. It would probably be specific to the terminal as well. If you want more answers than this, I suggest asking on a vim mailing list. They may have more expertise than we do. A *fourth* option that some people use is to have their shell change the terminal's title on a regular or semi-regular basis. For example, some people unilaterally override the title from the shell prompt every time the prompt is drawn. Other people override the title when the shell changes directory. These might be viable solutions for you as well, if you choose.
[toc] | [prev] | [next] | [standalone]
| From | <tomas@tuxteam.de> |
|---|---|
| Date | 2021-09-19 09:50 +0200 |
| Message-ID | <CYZKi-4ry-13@gated-at.bofh.it> |
| In reply to | #240131 |
[Multipart message — attachments visible in raw view] — view raw
On Sat, Sep 18, 2021 at 10:23:06PM -0400, Greg Wooledge wrote:
> On Sat, Sep 18, 2021 at 10:14:39PM -0300, Dedeco Balaco wrote:
> > My window manager is Mate Desktop. The terminal i most use is its own.
> > And i use vim a lot,
[...]
> Vim has another setting called "titleold". If this is set to a non-empty
> string, vim will use the value of this variable as the new title. So,
> for example, if you would like the title to be changed to "Terminal"
> every time you exit vim, you can put these lines in your .vimrc file:
>
> set title
> set titleold=Terminal
>
> If titleold is set to the empty string, then the title isn't changed at
> all on exit -- it just stays as the filename.
>
> If there's a *third* option (to make vim somehow read the previous title
> from the terminal, if that's even possible), then I don't know how to
> achieve it. It would probably be specific to the terminal as well.
>
> If you want more answers than this, I suggest asking on a vim mailing
> list. They may have more expertise than we do.
>
> A *fourth* option that some people use is to have their shell change the
> terminal's title on a regular or semi-regular basis [...]
I've no Mate terminal here (just plain xterm), but this fourth way is
the one Debian chose for me: the shell prompt (via the PS1 variable)
is the one working the magic. I guess Mate terminal works as Xterm
here.
It's defined to be
tomas@trotzki:~$ echo $PS1
\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$
Now it's a bit tough to read with all that escape voodoo (part of this
are "real" escapes sent to the terminal, part of them are interpreted
by the shell while preparing the prompt string out of this mumbo-jumbo
template) but I'll try (the PROMPTING section from the bash manual
is of help here). Those digested by the shell prompt I label with [P],
those passed through to the term as escape sequences with [E] (cf.
[1] for the latter):
\[ -> [P] begin sequence of non-printing chars
\e]0; -> [E] ESC ] 0 ; (Xterm) set window title
\u -> [P] useername
@ -> literal @
\h -> [P] hostname
: -> again, a literal
[space] -> literal (this gets boring :)
\w -> [P] current working directory (CWD)
\a -> [E] bell: close "set window title" escape
\] -> [P] end sequence of non-printing chars
...the rest is boring prompt matter. What this cooks down to is to
set the terminal title to <username>@<host>: <cwd>.
This has to be done at every prompt, otherwise the title wouldn't
"follow along" when I do cd, for example (or when I ssh into
another host).
When exiting vim, a new prompt is issued, so this is the one which
should take care of this.
So Dedeco -- I'd look into whatever is providing your shell prompt
as a first guess.
Cheers
[1] https://en.wikipedia.org/wiki/ANSI_escape_code
- t
[toc] | [prev] | [next] | [standalone]
| From | Greg Wooledge <greg@wooledge.org> |
|---|---|
| Date | 2021-09-19 16:00 +0200 |
| Message-ID | <CZ5wm-7TD-9@gated-at.bofh.it> |
| In reply to | #240139 |
On Sun, Sep 19, 2021 at 09:44:58AM +0200, tomas@tuxteam.de wrote:
> I've no Mate terminal here (just plain xterm), but this fourth way is
> the one Debian chose for me: the shell prompt (via the PS1 variable)
> is the one working the magic. I guess Mate terminal works as Xterm
> here.
>
> It's defined to be
>
> tomas@trotzki:~$ echo $PS1
> \[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$
Ah yes, good old Debian /etc/skel/.bashrc at work. Presumably you
mean this section:
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
I don't know what mate-terminal uses for $TERM, or what it used back
in stretch, but it's something the OP could research, I suppose. If
it changed from "xterm" to "mate-terminal" or something along those
lines, that would certainly explain the change.
[toc] | [prev] | [next] | [standalone]
| From | <tomas@tuxteam.de> |
|---|---|
| Date | 2021-09-19 17:20 +0200 |
| Message-ID | <CZ6LL-mG-3@gated-at.bofh.it> |
| In reply to | #240159 |
[Multipart message — attachments visible in raw view] — view raw
On Sun, Sep 19, 2021 at 09:58:17AM -0400, Greg Wooledge wrote:
> On Sun, Sep 19, 2021 at 09:44:58AM +0200, tomas@tuxteam.de wrote:
[...]
> Ah yes, good old Debian /etc/skel/.bashrc at work. Presumably you
> mean this section:
>
> # If this is an xterm set the title to user@host:dir
> case "$TERM" in
> xterm*|rxvt*)
> PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
> ;;
Most probably, so thanks for spotting it :)
> I don't know what mate-terminal uses for $TERM, or what it used back
> in stretch, but it's something the OP could research, I suppose. If
> it changed from "xterm" to "mate-terminal" or something along those
> lines, that would certainly explain the change.
I can't imagine MATE terminal to implement its own escaping machinery.
They'll probably copy that of the Xterm, to stay compatible (although
these days you never know).
So perhaps the OP gets away with pretending he has an xterm.
@Dedeco: what happens if you say "export TERM=xterm", start a new
shell [1] (i.e. you say "bash") and then start vim?
Cheers
[1] I don't know when PS1 gets refreshed, so being carefully here
- t
[toc] | [prev] | [next] | [standalone]
| From | Greg Wooledge <greg@wooledge.org> |
|---|---|
| Date | 2021-09-19 18:00 +0200 |
| Message-ID | <CZ7ot-zp-1@gated-at.bofh.it> |
| In reply to | #240161 |
On Sun, Sep 19, 2021 at 05:13:34PM +0200, tomas@tuxteam.de wrote: > I can't imagine MATE terminal to implement its own escaping machinery. > They'll probably copy that of the Xterm, to stay compatible (although > these days you never know). > > So perhaps the OP gets away with pretending he has an xterm. That's not would I would suggest. > @Dedeco: what happens if you say "export TERM=xterm", start a new > shell [1] (i.e. you say "bash") and then start vim? It would be more useful to know what $TERM is *currently* set to. (And also what it was set to by a stretch mate-terminal, but that may not be important now, or may not be easily discoverable, unless there's another reader out there running mate-terminal on stretch who can test it for us.) > [1] I don't know when PS1 gets refreshed, so being carefully here Assuming the OP is using Debian's provided .bashrc file (and other shell dotfiles), PS1 is changed when .bashrc is read, which normally means when bash is started as an interactive, non-login shell. Running "bash" would do that. I prefer "exec bash" because it gives a cleaner starting point. But... changing the TERM variable isn't the correct solution. If mate-terminal sets TERM to something like "mate-terminal" (speculation), then there must be a good reason for it. Maybe they've diverged enough from xterm that setting TERM to xterm would break something. If you want the title-changing behavior of bash in a terminal whose $TERM doesn't begin with xterm or rxvt, it would be better to change .bashrc and simply allow that PS1 addition to happen on other $TERM values as well. Once we know what $TERM is, we can advise.
[toc] | [prev] | [next] | [standalone]
| From | <tomas@tuxteam.de> |
|---|---|
| Date | 2021-09-19 19:50 +0200 |
| Message-ID | <CZ96W-1Dt-9@gated-at.bofh.it> |
| In reply to | #240139 |
[Multipart message — attachments visible in raw view] — view raw
On Sun, Sep 19, 2021 at 01:58:16PM -0300, Dedeco Balaco wrote:
>
>
> > tomas@trotzki:~$ echo $PS1
> > \[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$
> >
>
> There has been a lot of time that i use a fancy PS1. But it does not
> touch the terminal title, it never did. I just worked in it to get a
> satisfying informative prompt.
Interesting. In my box it seems to be PS1 what is setting the
term title...
Cheers
- t
[toc] | [prev] | [next] | [standalone]
| From | <tomas@tuxteam.de> |
|---|---|
| Date | 2021-09-19 20:50 +0200 |
| Message-ID | <CZa2Z-2fG-1@gated-at.bofh.it> |
| In reply to | #240166 |
[Multipart message — attachments visible in raw view] — view raw
On Sun, Sep 19, 2021 at 03:06:28PM -0300, Dedeco Balaco wrote:
>
>
> Em 19/09/2021 14:41, tomas@tuxteam.de escreveu:
> > On Sun, Sep 19, 2021 at 01:58:16PM -0300, Dedeco Balaco wrote:
> >>
> >>
> >>> tomas@trotzki:~$ echo $PS1
> >>> \[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$
> >>>
> >>
> >> There has been a lot of time that i use a fancy PS1. But it does not
> >> touch the terminal title, it never did. I just worked in it to get a
> >> satisfying informative prompt.
> >
> > Interesting. In my box it seems to be PS1 what is setting the
> > term title...
> >
>
> That is because you use a <something> enclosed between "\e]0;" and "\]",
> and i never wanted to do it. Notice that, in the PS1 value you gave
> above, you have "\u@\h: \w\a\" written twice. This is because one (the
> first) is to set the title, and another (the second) is to set the prompt.
I know, I know (after all, I analysed that in another mail). I was
just trying to reverse-engineer how things are working (by default)
on my Debian box.
In any case, here it's not vim cleaning up its title after itself,
but rather the shell's PS1 restoring it at the next prompt after
vim.
I just hoped this data point might help you pin-pointing your
problem (BTW: vim could only restore the term's title if there
were... an escape sequence to either query the title or tell the
term to save/restore it.
As to how to get xterm's [1] window title, I think you might
have to fool around with xprop. Here [2] is some example code.
Have fun :)
[1] I'm always talking xterm. I guess that this parts are
pretty similar (if not identical) to other X based terminal
emulators.
[2] http://www.shelldorado.com/scripts/cmds/xtitle
- tomás
[toc] | [prev] | [next] | [standalone]
| From | <tomas@tuxteam.de> |
|---|---|
| Date | 2021-09-19 21:30 +0200 |
| Message-ID | <CZaFI-2HO-19@gated-at.bofh.it> |
| In reply to | #240167 |
[Multipart message — attachments visible in raw view] — view raw
On Sun, Sep 19, 2021 at 04:21:56PM -0300, Dedeco Balaco wrote: > > Em 19/09/2021 15:48, tomas@tuxteam.de escreveu: > > On Sun, Sep 19, 2021 at 03:06:28PM -0300, Dedeco Balaco wrote: [...] > Fine. I understand that you say that i could change my PS1 to always > reset the title. Specifically this is desirable whenever you want the title to show a "changing" property (in this case, for example, the current working directory). > But there is something this would hide, and which i did > not yet found an explanation for: sometimes, the default title is reset > after quitting vim, and sometimes not. That was my question: did you really observe vim resetting the title at program end, or was it something set dynamically by your shell (you said you changed your PS1 before the upgrade and the title was "fixed" at vim's exit, so there's evidence for both hypotheses :-) Cheers - t
[toc] | [prev] | [next] | [standalone]
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Date | 2021-09-19 21:40 +0200 |
| Message-ID | <CZaPo-2Lk-9@gated-at.bofh.it> |
| In reply to | #240170 |
On Sun 19 Sep 2021 at 21:27:49 (+0200), tomas@tuxteam.de wrote: > On Sun, Sep 19, 2021 at 04:21:56PM -0300, Dedeco Balaco wrote: > > Em 19/09/2021 15:48, tomas@tuxteam.de escreveu: > > > On Sun, Sep 19, 2021 at 03:06:28PM -0300, Dedeco Balaco wrote: > > [...] > > > Fine. I understand that you say that i could change my PS1 to always > > reset the title. > > Specifically this is desirable whenever you want the title to show > a "changing" property (in this case, for example, the current > working directory). > > > But there is something this would hide, and which i did > > not yet found an explanation for: sometimes, the default title is reset > > after quitting vim, and sometimes not. > > That was my question: did you really observe vim resetting the title at > program end, or was it something set dynamically by your shell (you > said you changed your PS1 before the upgrade and the title was "fixed" > at vim's exit, so there's evidence for both hypotheses :-) I did come across this: https://unix.stackexchange.com/questions/28500/is-it-possible-to-obtain-the-current-name-of-the-xterm-window There are quite a few tricks that xprop can help with, but there just aren't enough rainy days here to find time to play with them. Cheers, David.
[toc] | [prev] | [next] | [standalone]
| From | <tomas@tuxteam.de> |
|---|---|
| Date | 2021-09-19 22:00 +0200 |
| Message-ID | <CZb8J-2S4-1@gated-at.bofh.it> |
| In reply to | #240172 |
[Multipart message — attachments visible in raw view] — view raw
On Sun, Sep 19, 2021 at 02:36:14PM -0500, David Wright wrote: > On Sun 19 Sep 2021 at 21:27:49 (+0200), tomas@tuxteam.de wrote: > > On Sun, Sep 19, 2021 at 04:21:56PM -0300, Dedeco Balaco wrote: > > > Em 19/09/2021 15:48, tomas@tuxteam.de escreveu: > > > > On Sun, Sep 19, 2021 at 03:06:28PM -0300, Dedeco Balaco wrote: > > > > [...] > > > > > Fine. I understand that you say that i could change my PS1 to always > > > reset the title. > > > > Specifically this is desirable whenever you want the title to show > > a "changing" property (in this case, for example, the current > > working directory). > > > > > But there is something this would hide, and which i did > > > not yet found an explanation for: sometimes, the default title is reset > > > after quitting vim, and sometimes not. > > > > That was my question: did you really observe vim resetting the title at > > program end, or was it something set dynamically by your shell (you > > said you changed your PS1 before the upgrade and the title was "fixed" > > at vim's exit, so there's evidence for both hypotheses :-) > > I did come across this: > > https://unix.stackexchange.com/questions/28500/is-it-possible-to-obtain-the-current-name-of-the-xterm-window > > There are quite a few tricks that xprop can help with, but there > just aren't enough rainy days here to find time to play with them. Yes, I think I mentioned xprop elsethread. I don't yet know how to get the window id of the shell's parent, but hey. It seems xterm has even a better trick up its sleeve: it has a window title /stack/ [1] which you can control via escape sequences. Now it's getting really dangerous: I must resist looking into that -- I have a paying customer I've got to make happy :-D Cheers [1] https://stackoverflow.com/questions/3232655/can-i-get-terminal-title-or-otherwise-restore-old-one - t
[toc] | [prev] | [next] | [standalone]
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Date | 2021-09-19 22:20 +0200 |
| Message-ID | <CZbs5-3eF-1@gated-at.bofh.it> |
| In reply to | #240174 |
On Sun 19 Sep 2021 at 21:51:57 (+0200), tomas@tuxteam.de wrote: > On Sun, Sep 19, 2021 at 02:36:14PM -0500, David Wright wrote: > > On Sun 19 Sep 2021 at 21:27:49 (+0200), tomas@tuxteam.de wrote: > > > On Sun, Sep 19, 2021 at 04:21:56PM -0300, Dedeco Balaco wrote: > > > > Em 19/09/2021 15:48, tomas@tuxteam.de escreveu: > > > > > On Sun, Sep 19, 2021 at 03:06:28PM -0300, Dedeco Balaco wrote: > > > > > > [...] > > > > > > > Fine. I understand that you say that i could change my PS1 to always > > > > reset the title. > > > > > > Specifically this is desirable whenever you want the title to show > > > a "changing" property (in this case, for example, the current > > > working directory). > > > > > > > But there is something this would hide, and which i did > > > > not yet found an explanation for: sometimes, the default title is reset > > > > after quitting vim, and sometimes not. > > > > > > That was my question: did you really observe vim resetting the title at > > > program end, or was it something set dynamically by your shell (you > > > said you changed your PS1 before the upgrade and the title was "fixed" > > > at vim's exit, so there's evidence for both hypotheses :-) > > > > I did come across this: > > > > https://unix.stackexchange.com/questions/28500/is-it-possible-to-obtain-the-current-name-of-the-xterm-window > > > > There are quite a few tricks that xprop can help with, but there > > just aren't enough rainy days here to find time to play with them. > > Yes, I think I mentioned xprop elsethread. I don't yet know how > to get the window id of the shell's parent, but hey. > > It seems xterm has even a better trick up its sleeve: it has > a window title /stack/ [1] which you can control via escape > sequences. > > Now it's getting really dangerous: I must resist looking into > that -- I have a paying customer I've got to make happy :-D > > [1] https://stackoverflow.com/questions/3232655/can-i-get-terminal-title-or-otherwise-restore-old-one Yes, that link is mentioned in the first reference. So that depends on how closely Mate terminal (which I've never seen) follows xterm. OTOH xprop depends on the X server, I presume. So, for the present, try the stack method first, then xprop if it doesn't work. Whether stretch's method is still of interest to you, IDK. Cheers, David.
[toc] | [prev] | [next] | [standalone]
| From | <tomas@tuxteam.de> |
|---|---|
| Date | 2021-09-19 22:10 +0200 |
| Message-ID | <CZbip-3aJ-3@gated-at.bofh.it> |
| In reply to | #240170 |
[Multipart message — attachments visible in raw view] — view raw
On Sun, Sep 19, 2021 at 04:53:09PM -0300, Dedeco Balaco wrote: [...] > The PS1 change i said, i meant, is that i used a changed PS1 since many > years ago [...] Thus, i expected that everything should continue > working as before [...] Yes, definitely: something changed which is breaking your expectations. > So, i do not know if Vim restored the title it received. This is > something that makes sense, since vim always changes the title, when > called from a terminal. > > But, on another path of thought that makes sense, the shell and the > terminal restoring the title every time a command end, it also makes sense. The research up to now shows that both are possible. And that restoring the xterm's title is even possible in (at least) two ways. No idea how your old setup was doing it, honestly :-) And, to make matters even more confusing, my vim setup doesn't set the title (I know it is configurable, but I never made use of it). > In the end, i do not know where exactly it would be better to start > searching. I betted on this list because i imagine here is a good place > to find people that know Debian deeply. And here we are. (: Yeah. Seemed so easy at the beginning. Anyway, the stack (not not sure Mate-terminal supports it, skimming the reference seems to suggest that it's not a widespread feature) seems like made for your use case... Cheers - t
[toc] | [prev] | [next] | [standalone]
| From | Greg Wooledge <greg@wooledge.org> |
|---|---|
| Date | 2021-09-19 16:00 +0200 |
| Message-ID | <CZ5wm-7TD-5@gated-at.bofh.it> |
| In reply to | #240131 |
On Sun, Sep 19, 2021 at 06:49:15AM -0300, Dedeco Balaco wrote: > Is there a log where the previous version of Mate and mate-terminal are > written? It should be in /var/log/dpkg* assuming those didn't get rotated away. I've got files up to dpkg.log.12.gz dated Sep 28, 2020. Try this: zgrep 'upgrade mate-terminal' /var/log/dpkg.log* I don't have that package installed, but for comparison: unicorn:/var/log$ zgrep 'upgrade rxvt-unicode' dpkg.log* dpkg.log.4.gz:2021-05-30 09:14:30 upgrade rxvt-unicode:amd64 9.22-10 9.22-11 dpkg.log.5.gz:2021-04-07 07:19:01 upgrade rxvt-unicode:amd64 9.22-8+b1 9.22-10 dpkg.log.8.gz:2021-01-29 18:05:56 upgrade rxvt-unicode:amd64 9.22-6 9.22-8+b1 This shows me that I upgraded rxvt-unicode from 9.22-6 to 9.22-8+b1 and then to 9.22-10 and then to 9.22-11. There were probably many other upgrades, in logs that I no longer have because they're over a year ago.
[toc] | [prev] | [next] | [standalone]
| From | Mark Neyhart <Mark.Neyhart@akleg.gov> |
|---|---|
| Date | 2021-09-20 22:40 +0200 |
| Message-ID | <CZyf1-lZ-31@gated-at.bofh.it> |
| In reply to | #240126 |
On 9/18/21 5:14 PM, Dedeco Balaco wrote: > Vim is one of these programs. While it is running, the terminal title > shows the name of the file currently being edited, and the number of > files that was opened with it, when it was launched. > > After the upgrade, when i quit vim, the terminal title becomes empty, > instead of returning to the default title "Terminal". > > Why is this happening? A bug in Vim? In mate-terminal? Or in Debian 11? I did not see it mentioned anywhere, but $PROMPT_COMMAND (if it exists) might be setting the terminal title.
[toc] | [prev] | [next] | [standalone]
| From | Dedeco Balaco <dedeco.balaco@yahoo.com> |
|---|---|
| Date | 2021-09-20 22:40 +0200 |
| Message-ID | <CZyf1-lZ-43@gated-at.bofh.it> |
| In reply to | #240211 |
Em 20/09/2021 17:36, Mark Neyhart escreveu: > On 9/18/21 5:14 PM, Dedeco Balaco wrote: >> Vim is one of these programs. While it is running, the terminal title >> shows the name of the file currently being edited, and the number of >> files that was opened with it, when it was launched. >> >> After the upgrade, when i quit vim, the terminal title becomes empty, >> instead of returning to the default title "Terminal". >> >> Why is this happening? A bug in Vim? In mate-terminal? Or in Debian 11? > > I did not see it mentioned anywhere, but $PROMPT_COMMAND (if it > exists) might be setting the terminal title. > Not here, at least, if this variable exists elsewhere. Here, it is not defined.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web