Bug 93375

Summary: konsole title gets screwed up after ssh
Product: [Applications] konsole Reporter: Nicolas Wack <wackes>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED NOT A BUG    
Severity: normal    
Priority: NOR    
Version: 1.4.1   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: screenshot when logging in
screenshot when logging out

Description Nicolas Wack 2004-11-16 17:49:13 UTC
Version:           1.4.1 (using KDE 3.3.1,  (3.1))
Compiler:          gcc version 3.3.5 (Debian 1:3.3.5-2)
OS:                Linux (i686) release 2.6.9-1-686

When I log in through ssh to a host with a 4-level domain name (ex: sauron.aules.upf.edu), I get my '\u@\h:\w' string in the konsole title (which is nice), and it gets updated when I cd into a directory, except that it won't go away after logout. This doesn't happen if I ssh in a machine with a 3-level name (ie: www.upf.es), in which case the title doesn't change at all.

So I don't know which way is correct (either to display the host & path, or not to display anything), but it should be consistent. I'd say that displaying the path is a good idea, if the session has not been renamed before.

for info, I use bash and my PS1='\n\[\e[34;1m\]\u@\h:\w\$ \[\e[0m\]'
Comment 1 Stephan Binner 2004-11-16 20:18:29 UTC
Use same PS1 on all machine to SSH to.
Comment 2 Nicolas Wack 2004-11-22 11:09:56 UTC
I do, and it doesn't change anything.
Also, I tried to change my PS1 on machines with 3-level names, and it works like a charm. The problem doesn't seem to come from the PS1.
Maybe there's some misunderstanding : I'm not talking about the prompt of the shell, but of the title of the window, which is specific to konsole (as it doesn't occur with eterm, for instance).
I attach 2 screenshots to illustrate my problem.
Comment 3 Nicolas Wack 2004-11-22 11:11:00 UTC
Created attachment 8364 [details]
screenshot when logging in
Comment 4 Nicolas Wack 2004-11-22 11:11:21 UTC
Created attachment 8365 [details]
screenshot when logging out
Comment 5 Nicolas Wack 2004-11-22 11:12:27 UTC
reopened bug (forgot to do it before :o)
Comment 6 Waldo Bastian 2004-11-22 16:56:08 UTC
Hi Nicolas,

We understand your problem but this is not something that we can fix in konsole. Konsole sets the title in response to a so-called escape sequence. 
Try for example: echo -e "\e]0;Hello World\a"

Your problem is that some servers send such escape sequence when you login and some other servers do not. Often such escape sequence is send as part of the shell prompt, controlled by PS1. If you browse through Konsole's "Tip Of The Day" section you will find an example how to correct this on those servers where you encounter problems by setting PS1.
Comment 7 Nicolas Wack 2004-11-23 11:51:32 UTC
Ok thanks a lot for the explanation, I had no idea about escape sequences before.
Sorry for being so insistant, but it was for the good of kde ;) keep up the good work!