After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 319996 - Tab title does not revert to default when logging out of a remote host
Tab title does not revert to default when logging out of a remote host
Status: RESOLVED NOTABUG
Product: gnome-terminal
Classification: Core
Component: general
2.12.x
Other All
: Normal normal
: ---
Assigned To: GNOME Terminal Maintainers
GNOME Terminal Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-10-27 16:54 UTC by Chris Petersen
Modified: 2005-11-20 20:17 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12



Description Chris Petersen 2005-10-27 16:54:11 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:
Comment 1 Olav Vitters 2005-11-20 13:29:09 UTC
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.
Comment 2 Chris Petersen 2005-11-20 20:17:21 UTC
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).