Bug 287922

Summary: Tab Title for remote sessions fails when using wrapper around ssh
Product: [Applications] konsole Reporter: JT Moree <jtmoree>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED NOT A BUG    
Severity: normal CC: adaptee
Priority: NOR    
Version: 2.6.4   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

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.