GNOME Bugzilla – Bug 319996
Tab title does not revert to default when logging out of a remote host
Last modified: 2005-11-20 20:17:21 UTC
Please describe the problem: I didn't experience this with 2.10 in fedora, but when I recently installed ubuntu with 2.12, I noticed the following: Tab titles default to Terminal instead of my login prompt (eg. user@localhost) ssh'ing to a remote host changes the prompt correctly to user@remotehost ssh'ing from there to another remote host changes correctly to user@remotehost2 disconnect from remotehost2 resets the prompt to user@remotehost disconnect from remotehost... and the prompt stays user@remotehost instead of (preferably) changing to user@localhost or even reverting to Terminal. 2.10 worked perfectly. 2.12 doesn't. Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
What command do you use to change the title? Should be one of: echo -ne "\033]0;Some title\007"; sleep 5 echo -ne "\033]1;Some title\007"; sleep 5 echo -ne "\033]2;Some title\007"; sleep 5 I suspect one of the $PS1 / $PROMPT_COMMAND things are not using '\033]0;' (etc, the 0 is the important part), but either the 1 (window title) or the 2 (icon title). Vte was fixed to support these xterm codes correctly. It is just highlighting a bug in your PS1 / PROMPT_COMMAND. I suspect that either the window title (what you see in the title of the window -- where the maximize/minimize/close buttons are) or the icon title (shows buttons for each program in the panel) is correctly updated. If this is not the case, please provide the PS1 and PROMPT_COMMAND of each host.
When I try your examples on my fedora box (2.10 -- can't test 2.12 on the weekend), 0 and 2 work, and set all titles, 1 doesn't do anything. From the .bashrc on BOTH machines (the one that works and the one that doesn't): PS1='\[\033[0;34m\]\u\[\033[36m\]@\[\033[34m\]\h\[\033[0m\]: \[\033[32m\]\w\[\033[0m\] > ' If I change it to: PS1='\033]0;\[\033[0;34m\]\u\[\033[36m\]@\[\033[34m\]\h\[\033[0m\]: \[\033[32m\]\w\[\033[0m\] > ' I get some funny characters (]0;) at the beginning of each prompt, but the title still doesn't shift to match my prompt like it does on the fedora box. Mind you, no matter which machine I connect FROM, it's the machine I'm connected TO that makes the difference... connected to an ubuntu or gentoo box with 2.12 doesn't set the tab title to my prompt, but to fedora running 2.10 or earlier works fine. The PS1 is identical on all boxes, which is why I submitted this as a bug, however, you are probably right in closing the bug, as I think the "from" vs "to" problem indicates that it's an issue with the bash setup on the boxes, not the prompt itself (since 2.10 doesn't work when I connect to the ubuntu/gentoo boxes, either).