Bug 155999 - Tabs auto-labelling not working with nested connections
Summary: Tabs auto-labelling not working with nested connections
Status: RESOLVED INTENTIONAL
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-17 15:32 UTC by Davide Ferrari
Modified: 2008-09-22 04:32 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Davide Ferrari 2008-01-17 15:32:53 UTC
Version:            (using KDE 4.0.0)
Installed from:    Ubuntu Packages

With the new konsole in KDE 4.0 (great work!) there's this neat feature that if you open a shell by default it renames the tab label to inform you where are you logged (server name) and with which user. But if from this connection I ssh to another machine, changes are not reflected in the tab label, which always shows the first host you ssh'ed in.

I open this as a bug because I think it should be the default behaviour as it's more natural. If it was intended this way, please move it to the whishlist.

Thanks!
Comment 1 Robert Knight 2008-01-17 18:26:17 UTC
This is an inherent limitation of the way tab labeling works I'm afraid.  Konsole takes snapshots of the process status file for the terminal's current foreground process.  This means that it can only look at processes that are local.  Once you connect to a remote machine via ssh, Konsole has no idea what you are doing on the remote machine.  If from the remote machine you connect to another (ie. a nested connection) Konsole will still only see the ssh process on the local machine.

If you frequently nest ssh connections then a better option would be to change your remote tab title format (Settings -> Edit Current Profile -> Tabs) to just the window title set by the shell (Click Insert -> "Window title set by shell") instead.  The default window title most shells give is usually something along  the lines of "user@host:current directory$", so you will see the correct user and host on the tab title although the prompt string is usually quite long so you might need to shorten it.  

The only way around this that I see is for the shell process on the remote machine to pass back information about what is going on via some escape code magic.     

Comment 2 Robert Knight 2008-01-18 00:18:37 UTC
Confirming for now, although this mind end up being a WONTFIX given that there isn't really a good solution for the problem.

The only question remaining is whether it would be better to switch to the window title set by the shell automatically when ssh is started (ie. Remote tab title format defaulting to '%w') rather than trying to get the username and host.
Comment 3 Davide Ferrari 2008-01-18 10:23:42 UTC
Thanks for your answer. Yes, I do think as well that it would be better to default to '%w' in the remote tab title bar setting.
Comment 4 Robert Knight 2008-09-22 04:32:58 UTC
Closing as WONTFIX for now since this is a limitation that we can't easily work around with current shells and most feedback that I have had is that people like the auto-tab name feature despite this problem.