Bug 280138 - Remote tab format "%h : %u" makes tab title become ":" when connecting to some remote host through ssh
Summary: Remote tab format "%h : %u" makes tab title become ":" when connecting to som...
Status: RESOLVED WORKSFORME
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 2.6.2
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-15 18:18 UTC by Thomas Damgaard
Modified: 2012-08-28 11:16 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screendump (85.87 KB, image/png)
2012-03-06 10:11 UTC, Thomas Damgaard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Damgaard 2011-08-15 18:18:05 UTC
Version:           2.6.2 (using Devel) 
OS:                Linux

In Konsole, the remote tab title is set to: "%h : %u", however, the title becomes " : " when I ssh to a remote host. 


Reproducible: Always

Steps to Reproduce:
Open a new tab.
Press ctrl+alt+S to open tab title dialog.
Set remote tab title to "%h : %u : %w" or similar
ssh to another host.


Actual Results:  
title becomes "ssh : " or something like that.


Expected Results:  
title should be "ssh somehost : someuser" or similar
Comment 1 Jekyll Wu 2011-08-15 23:18:54 UTC
What is the exact form of ssh command used in step 4?
Comment 2 Thomas Damgaard 2011-08-16 05:07:51 UTC
That varies as I ssh to several different hosts. One example is: ssh tdn@syrah

Other times I just use an alias like this:
alias syrah='ssh tdn@syrah.vineyard.sikkerhed.org'

In such cases, I just type syrah.

Neither of the above examples work.



Med venlig hilsen/Kind regards
Thomas



2011/8/16 Jekyll Wu <adaptee@gmail.com>:
> https://bugs.kde.org/show_bug.cgi?id=280138
>
>
> Jekyll Wu <adaptee@gmail.com> changed:
>
>           What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                 CC|                            |adaptee@gmail.com
>
>
>
>
> --- Comment #1 from Jekyll Wu <adaptee gmail com>  2011-08-15 23:18:54 ---
> What is the exact form of ssh command used in step 4?
>
> --
> Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You reported the bug.
>
Comment 3 Jekyll Wu 2011-08-28 16:09:36 UTC
I failed to find any way to reproduce the reported problem. If there is really a  bug in such an frequently used feature, it should have been reported by many users. 

Could you check this again, say, by using a newly-created local account?
Comment 4 Thomas Damgaard 2011-08-28 22:18:43 UTC
2011/8/28 Jekyll Wu <adaptee@gmail.com>:
> I failed to find any way to reproduce the reported problem. If there is really
> a  bug in such an frequently used feature, it should have been reported by many
> users.

About the same time, I reported the bug, I recall speaking to some
people on #kde on freenode that experienced the same problem.


> Could you check this again, say, by using a newly-created local account?

I just did. Created new user. Logged in. Opened ssh session to remote
host. Tab title became " : ".

Screenshots are here:
http://bayimg.com/caJMCAAdM
http://bayimg.com/cajMdAADM
Comment 5 Kurt Hindenburg 2012-02-04 23:07:37 UTC
What OS are you running Konsole on?  If it non-Linux then that might make sense.
Comment 6 Jekyll Wu 2012-02-09 20:11:39 UTC
Well, the reporter seems to be using Linux...

@Thomas

I really have no idea where the thing goes wrong and I never managed to reproduce it myself.

It would be nice and helpful if you could :

1). check this issue using newer version( you were using 2.6.2 or devel? )

2). check whether the problem happens with any combination of local/remote machines. If not, try to find the common patten for reproducing.

Regards
Jekyll
Comment 7 Jekyll Wu 2012-02-12 15:59:03 UTC
Changing report status...
Comment 8 Thomas Damgaard 2012-02-12 18:13:34 UTC
I use Kubuntu. Most recent version.

I experience this on several different Kubuntu systems.
Comment 9 Jekyll Wu 2012-02-12 19:05:47 UTC
(In reply to comment #8)
> I use Kubuntu. Most recent version.
> 
> I experience this on several different Kubuntu systems.

You mean "having the problem on several Kubuntu systems as your local machines"? 

Then what about the remote machine ? Does it happens:

1). for the combination of those Kubuntu systems with any remote machine?

2). only for the combination of those Kubuntu systems with ONE specific remote machine ?

I do have Kubuntu installed on one partition in my system. So if you could provide more information for above questions, I would like to give it another try.
Comment 10 Thomas Damgaard 2012-02-13 07:03:02 UTC
The remote machine can be anything of these:
 - Debian Lenny
 - Debian Squeeze
 - Ubuntu 10.04 LTS
 - Ubuntu 11.10
 - Ubuntu 11.04
 - Gentoo


Remote shell is almost always zsh, but sometimes bash.


Med venlig hilsen/Kind regards
Thomas



2012/2/12 Jekyll Wu <adaptee@gmail.com>:
> https://bugs.kde.org/show_bug.cgi?id=280138
>
>
>
>
>
> --- Comment #9 from Jekyll Wu <adaptee gmail com>  2012-02-12 19:05:47 ---
> (In reply to comment #8)
>> I use Kubuntu. Most recent version.
>>
>> I experience this on several different Kubuntu systems.
>
> You mean "having the problem on several Kubuntu systems as your local
> machines"?
>
> Then what about the remote machine ? Does it happens:
>
> 1). for the combination of those Kubuntu systems with any remote machine?
>
> 2). only for the combination of those Kubuntu systems with ONE specific remote
> machine ?
>
> I do have Kubuntu installed on one partition in my system. So if you could
> provide more information for above questions, I would like to give it another
> try.
>
> --
> Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You reported the bug.
Comment 11 Jekyll Wu 2012-02-13 07:08:55 UTC
OK, I will try it again sometime later
Comment 12 Jekyll Wu 2012-03-03 03:55:14 UTC
I tried again using Kubuntu and still no success in reproducing.

Looking at the related code again, there are two possible explanation for the reported problem

1). the code in Konsole for parsing the full "ssh ...." command is not good enough to parse some strange forms. But that doesn't explain the scrennshots in comment #4 where the "ssh ..." command is quite normal and definitely should work and works for me.

2). For some reason, Konsole can't get the needed info from /proc/<ssh-pid>/cmdline. In that case, Konsole will print some warning messages like "Could not read process info" or "Could not read arguments" onto stderr.

So please start konsole from command line in xterm, and check whether Konsole prints those waning messages when the reported problem happens. Before doing this, it is better to run "kdebugdialog"  to ensure that debug output is enabled for konsole.

If you have some knowledge of C++ and Qt, you can also try to debug this problem yourself since you can reproduce it easily. The related code is within SSHProcessInfo::SSHProcessInfo() and SSHProcessInfo::format().  The latest code can be obtained from here: https://projects.kde.org/projects/kde/kde-baseapps/konsole/repository
Comment 13 Thomas Damgaard 2012-03-06 10:11:25 UTC
Created attachment 69324 [details]
Screendump

I just tried the described.
Konsole did not log, however.

This is what I did:
1: kdebug -> enable debug logging for Konsle, Apply, Close
2: Then I closed all Konsole windows.
3: Started Xterm from krunner
4: Started Konsole by typing "konsole" in xterm
5: SSH to localhost
6: Checked for output in xterm. Saw nothing.
Comment 14 Kurt Hindenburg 2012-03-08 03:32:54 UTC
I can't reproduce - although I'm using 4.7x.

I don't recall if the ssh titles worked in 4.6.x
Comment 15 Jekyll Wu 2012-05-16 08:08:30 UTC
More information? 

This report has been open for 9 months. All the comments are from the reporter and developers. No CCs from other users. There isn't any duplicate report.

So the reporter seems to be the only one who has and can reproduce the problem. I don't know how your system is setup, but there must be some special and rare condition which triggers this problem. Otherwise, there should have been tons of comments, CCs and duplicate reports for such a basic and widely used feature.

So to get it fixed, the reporter needs to do more homework to find out what that special condition is.
Comment 16 Jekyll Wu 2012-06-14 21:58:27 UTC
Close it for now since it is not reproducible for developers so far. 

Do not hesihate to reopen this report when you find a reliable way that can be used by other people to reproduce the problem .
Comment 17 Thomas Damgaard 2012-08-28 11:16:42 UTC
I think this is fixed in the version of KDE/Konsole that is included in Kubuntu 12.04.