Bug 395058 - ssh:// link opens konsole with --noclose
Summary: ssh:// link opens konsole with --noclose
Status: CONFIRMED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: git master
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-05 14:58 UTC by tony den haan
Modified: 2018-06-06 18:56 UTC (History)
3 users (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 tony den haan 2018-06-05 14:58:04 UTC
When i follow an ssh:// link in browser konsole opens ssh session to the host, but the --noclose causes it to just hang there after closing the session. I can't really imagine a case where this might be useful, but could it somehow at least be made optional/configurable?
Comment 1 Rex Dieter 2018-06-05 16:26:46 UTC
Triaging to kio, owner of ktelnetservice.cpp that includes the code snippet:

    if (terminal == QLatin1String("konsole")) {
        cmd << QStringLiteral("--noclose");
    }

Unsure of the reasoning or rationale for including that, git history didn't include anything I could find.
Comment 2 Ahmad Samir 2018-06-06 18:39:13 UTC
I tested this a bit (with `kde-open5 ssh://someIPAddress`) and using --noclose sort of makes sense.

Consider the case where you try connecting to an ssh server and the connection fails for whatever reason, without "--noclose" you'll get a konsole window that'll show for a fraction of a second and close; whereas with "--noclose", if the connection fails the window won't go away, but will display an error message, something like:
ssh: Could not resolve hostname 192.168.1.300: Name or service not known

IIUC, this is the intended behaviour.

Since the condition in the code is checking that "konsole" is set as the default terminal emulator, you can tweak the default behaviour from systemsettings5 -> Applications -> Default Applications -> Terminal Emulator, change

"Use Konsole ..."
to
"Use a different terminal program"
and enter /usr/bin/konsole in the edit line box; so you'll still be using konsole but the condition will evaluate to false and "--noclose" won't be used.
Comment 3 tony den haan 2018-06-06 18:56:35 UTC
Aha thanks, that sure makes sense. Yet i'd rather have it drop to local shell, both after closing ssh sesession and on ssh failure. But i suppose that's not for this report.