Bug 287922 - Tab Title for remote sessions fails when using wrapper around ssh
Summary: Tab Title for remote sessions fails when using wrapper around ssh
Status: RESOLVED NOT A BUG
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 2.6.4
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-30 16:39 UTC by JT Moree
Modified: 2012-01-01 23:49 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 JT Moree 2011-11-30 16:39:20 UTC
Version:           2.6.4 (using KDE 4.6.5) 
OS:                Linux

Konsole does not realize I am in remote shells when using wrapper scripts around ssh.  Due to this it sets the title tab to the local settings instead of remote.  The title is correct by using the ssh command directly.

I have a script called sshr (autossh is rumored to have this problem also).  The only thing sshr does is append 'ssh root@' in front of the arg i send it and execute it.
    sshr server => ssh root@server

Is there any way that Konsole can be made smarter.  It needs to look for ssh running within the tab instead of just looking for the top level launching command to be 'ssh'.



Reproducible: Always

Steps to Reproduce:
* Change format for local and remote tab titles to be different (normally the default?)

jtmoree@jt-ubuntu:~$ printf '#!/bin/bash\nssh root@$1\n' > testremote
jtmoree@jt-ubuntu:~$ chmod a+x testremote 
jtmoree@jt-ubuntu:~$ ssh user@host

* Watch Tab Title Change
[user@host ~]$ exit

jtmoree@jt-ubuntu:~$ ./testremote host
* Watch Tab Title Change to Local Title 


Actual Results:  
Tab title is local format instead of remote

Expected Results:  
Want the tab title to be remote format when using ssh in wrapper script

BTW, there is a delay on changing the title so I can login with ssh and see the title change.  Then exit and log in with my wrapper and watch the title change to the local title format.

It's trivial to see but may not be trivial to fix so I'm leaving it as Normal Severity.
Comment 1 Kurt Hindenburg 2012-01-01 23:49:56 UTC
I get the same results which are the expected results.  There's no way for Konsole to know to use the ssh command and not the wrapper.  Konsole always uses the top most process id for titles.
Re-open if you know of a way programmatically to handle this.