hi, i don't run Debian but could i please point you to this bug which has irritated me for years? http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=575795 version 0.4.3, 0.4.5, 0.4.6 are versions i've tested recently which exhibit this bug. the old (also buggy but bearable) behaviour in 0.2.6 was that from title 'Untitled' ..the first vim enter and exit resulted in 'Terminal' ..the next 'Terminal - Terminal' ..but that was as far as it went. a vim build with the '--with-x' flag is required to trigger this bug. without this flag there is no such issue (and stock builds don't seem to use it now despite the fact it's the only way to enable copying to the registers that point to the X11 clipboard). 'vim --version | grep xterm_clipboard' will tell you whether the flag was used in your build or not (+xterm_clipboard as opposed to -xterm_clipboard). i assume that the OP of the bug had too many moving parts (using a system that has dependency tracking) and possibly updated vim to a version built with 'without-x' at the same time as moving to 0.4.5, thus the move to 0.4.5 looked like it had fixed the problem when in fact it hadn't. the reason i've assumed that this bug is 'Terminal' and not 'VIm' related is that tab title interaction with VIm works fine elsewhere (i.e konsole). cheers, Pete.
Created attachment 3634 screenshot
Issue still present in terminal 0.6.3 - as a workaround you can set 'dynamically set title' to 'replaces initial title', but the root issue should still be fixed.
This doesnt seem to depend on the shell behaviour as this is on OpenBSD, and with zsh or ksh. Maybe a dumb sprintf somewhere, or vim doing something funky with the existing term title ?
The issue seems to be in xfce4-terminal and not in vte, because with sakura (another vte term) running and exiting vim doesnt multiply the title prefix/suffix. Interestingly it seems sakura and xfce4-terminal share the vte settings, since setting the prefix/dynamic title position in xfce4-terminal also sets the behaviour for sakura (which uses vte3).
*** Bug 9337 has been marked as a duplicate of this bug. ***
Looking at the code, the string handling/appending/prepending is done here: https://git.xfce.org/apps/xfce4-terminal/tree/terminal/terminal-screen.c#n1828. Will dig with some debug
So, after having opened a file in vim, vte_title has the previous "full" value of the title. with this: @@ -1823,6 +1823,8 @@ terminal_screen_get_title (TerminalScreen *screen) "title-initial", &tmp, NULL); initial = terminal_screen_parse_title (screen, tmp); + g_warning ("Initial is %s, vte_title is %s", initial, vte_title); + g_free (tmp); initial status: (xfce4-terminal:98566): xfce4-terminal-WARNING **: Initial is Terminal, vte_title is (null) after the shell is open, first title is set: (xfce4-terminal:98566): xfce4-terminal-WARNING **: Initial is Terminal, vte_title is landry@spud (ttyp3) - /home/landry/src/xfce/xfce4-terminal open file in vim, the title is set to whatever vim sets : (xfce4-terminal:98566): xfce4-terminal-WARNING **: Initial is Terminal, vte_title is Makefile (~/src/xfce/xfce4-terminal) - VIM exit vim, vte_title gets the *full* previous value : (xfce4-terminal:98566): xfce4-terminal-WARNING **: Initial is Terminal, vte_title is Terminal - landry@spud (ttyp3) - /home/landry/src/xfce/xfce4-terminal Igor, any idea ?
Landry, I'm seeing different behavior. After exiting vim, vte_title is indeed "full" but it immediately changes to the value that it had before running vim. I.e.: initial="Terminal", vte_title="igor@ziv:~/xfce4-terminal3" <-- started initial="Terminal", vte_title="NEWS (~/xfce4-terminal3) - VIM" <-- run vim initial="Terminal", vte_title="Terminal - igor@ziv:~/xfce4-terminal3" <-- exit vim initial="Terminal", vte_title="igor@ziv:~/xfce4-terminal3" <-- immediate change What is your vte version? Mine here is 0.46.0+5+g398a3f8.
vte3-0.44.2 (last stable, 0.46 isnt released) here. Interesting... here, after exiting vim, the title isnt immediately changed. Would be interesting to find out what triggers that other terminal_screen_get_title() call.
Same behaviour with 0.46.0, which i saw was released.
Or it might have something to do with the shell. Running openbsd's ksh here, if i switch to bash in the term (ie start bash from ksh), the title isnt changed at all.
Ok, that definitely seems to be related to something configured in my shell. With bash, or ksh with a default/empty config, i cant reproduce the 'broken' behaviour.
With: $ bash --version | head -1 GNU bash, version 4.3.42(1)-release (x86_64-redhat-linux-gnu) $ xfce4-terminal --version | head -1 xfce4-terminal 0.8.1git-20161031git3cc680d (Xfce 4.12) $ vim --version | head -1 VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jun 2 2016 10:02:17) it works as expected.
(In reply to Landry Breuil from comment #12) > Ok, that definitely seems to be related to something configured in my shell. > With bash, or ksh with a default/empty config, i cant reproduce the 'broken' > behaviour. AFAIK, vte is using $PROMPT_COMMAND for the terminal title; and it's setting its value from /etc/profile.d/vte.sh (on Arch). So, if your shell config modify $PROMPT_COMMAND, it may affect the title.
$PROMPT_COMMAND is a bash thing. On OpenBSD's ksh, title is set by that kind of printf voodoo with escape codes: ILS='\033]1;'; ILE='\007' WLS='\033]2;'; WLE='\007' function ilabel { print -n "${ILS}$*${ILE}">/dev/tty; } function label { print -n "${WLS}$*${WLE}">/dev/tty; } alias stripe='label "$USER@$HOST ($tty) - $PWD"' alias istripe='ilabel "$USER@$HOST ($tty)"' and stripe is called at the shell startup (i think)
Landry, can you also check gnome-terminal under OpenBSD? If you'll see the same behavior as for xfce4-terminal, then it's most probably a vte-on-BSD thing.
I see this problem on Xubuntu 16.04 when PS1 is set a particular way. When PS1 is setup by the default skeleton bashrc code, I don't see the problem. bash-4.3$ echo $PS1 \[\e]0;\u@\h: \w\a\]\s-\v\$ When PS1 is left at it's default setting, I get the "Terminal - Terminal" growing title problem. bash-4.3$ echo $PS1 \s-\v\$ My versions: bash-4.3$ bash --version | head -1 GNU bash, version 4.3.46(1)-release (x86_64-pc-linux-gnu) bash-4.3$ xfce4-terminal --version | head -1 xfce4-terminal 0.6.3 (Xfce 4.12) bash-4.3$ vim --version | head -1 VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Nov 24 2016 16:44:48) Cheers, Jason
(In reply to Jason from comment #17) > I see this problem on Xubuntu 16.04 when PS1 is set a particular way. > > When PS1 is setup by the default skeleton bashrc code, I don't see the > problem. > > bash-4.3$ echo $PS1 > \[\e]0;\u@\h: \w\a\]\s-\v\$ > > When PS1 is left at it's default setting, I get the "Terminal - Terminal" > growing title problem. > > bash-4.3$ echo $PS1 > \s-\v\$ > > My versions: > > bash-4.3$ bash --version | head -1 > GNU bash, version 4.3.46(1)-release (x86_64-pc-linux-gnu) > bash-4.3$ xfce4-terminal --version | head -1 > xfce4-terminal 0.6.3 (Xfce 4.12) > bash-4.3$ vim --version | head -1 > VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Nov 24 2016 16:44:48) Jason, thanks for the update. However, I cannot reproduce it with your $PS1 on 0.8.3. Can you try xfce4-terminal 0.8.3 on your system?
(In reply to Igor from comment #18) > Can you try xfce4-terminal 0.8.3 on your system? I'm seeing the same behavior with 0.8.4 and vte 0.46.1 (Debian sid/amd64). Of course, this requires making sure that the shell doesn't reset the title on its own (mucking with $PS1 in bash's case).
(In reply to Frédéric Brière from comment #19) > (In reply to Igor from comment #18) > > Can you try xfce4-terminal 0.8.3 on your system? > > I'm seeing the same behavior with 0.8.4 and vte 0.46.1 (Debian sid/amd64). > Of course, this requires making sure that the shell doesn't reset the title > on its own (mucking with $PS1 in bash's case). Could you give an example of mucked $PS1?
(In reply to Igor from comment #20) > Could you give an example of mucked $PS1? PS1='$ ' should do just fine. :)
-- GitLab Migration Automatic Message -- This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/apps/xfce4-terminal/-/issues/2. Please create an account or use an existing account on one of our supported OAuth providers. If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev