Bug 461085 - CR: Please add an option to disable the SSH manager plugin
Summary: CR: Please add an option to disable the SSH manager plugin
Status: REPORTED
Alias: None
Product: konsole
Classification: Applications
Component: sshmanager (show other bugs)
Version: 22.04.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-27 19:54 UTC by Markus Wernig
Modified: 2023-06-13 14:34 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
attachment-3879017-0.html (1.48 KB, text/html)
2023-06-03 07:16 UTC, tcanabrava
Details
attachment-3879148-0.html (1.16 KB, text/html)
2023-06-03 07:17 UTC, tcanabrava
Details
attachment-3881989-0.html (2.60 KB, text/html)
2023-06-03 08:11 UTC, tcanabrava
Details
attachment-3897034-0.html (4.25 KB, text/html)
2023-06-03 13:02 UTC, tcanabrava
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Wernig 2022-10-27 19:54:48 UTC
SUMMARY
***
The new SSH manager plugin interferes in many ways - some of them unexpected and confusing - with existing SSH shortcuts that users have set up over the years, as well as with ssh commands executed in the konsole terminal.
On the other hand, the SSH manager plugin does not implement all functionality that was available without it (eg. via profiles, keyboard shortcuts, ssh .config file etc.).

I would strongly advocate adding an option to konsole to disable the SSH manager plugin.

Forcing users to tediously adapt themselves to a new way of handling their SSH setup, without any benefit, but with numerous shortcomings, is not good practice. 
***


STEPS TO REPRODUCE
1. Have an existing setup that uses konsole for handling SSH connections

OBSERVED RESULT
SSH manager plugin seemingly parses the command line executed within konsole and triggers certain actions (or blocks them) if that command appears to be ssh-related. This breaks existing setups, and there is no way of disabling the plugin.

EXPECTED RESULT
It should be possible to disable the SSH manager plugin.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.25.5
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.5
Graphics Platform: X11
Comment 1 Nicolai Langfeldt 2023-04-03 06:39:10 UTC
I second this.  I manage hundreds of hosts and ssh manager is just tedious and gets in the way of this.

The main way it gets in the way is that it adds profiles for each host as it goes and the default konsole profile is in all cases "Built-in" rather than "Green".  One thing is the color, the other thing is that "Built-in" has xon/off flow-controll enabled which I in no way need or want: it gets in the way of bash, emacs and other standard programs keybindings.
Comment 2 Nicolai Langfeldt 2023-04-03 06:40:59 UTC
> The main way it gets in the way is that it adds profiles for each host as it goes and the default konsole profile is in all cases "Built-in" rather than "Green".

Even though "Green" is marked as default in the profile manager.
Comment 3 July Tikhonov 2023-06-03 06:00:04 UTC
The plugin is annoying even when it doesn't do anything. It now occupies Ctrl+Shift+F2 shortcut, which I have been happily using for something else, and there is no apparent way to reconfigure plugins' shortcuts.
Comment 4 tcanabrava 2023-06-03 07:16:23 UTC
Created attachment 159424 [details]
attachment-3879017-0.html

Click on the shortcut and change it. It’s there from day one.

On Sat, 3 Jun 2023 at 08:00 July Tikhonov <bugzilla_noreply@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=461085
>
> July Tikhonov <july.tikh@gmail.com> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>                  CC|                            |july.tikh@gmail.com
>
> --- Comment #3 from July Tikhonov <july.tikh@gmail.com> ---
> The plugin is annoying even when it doesn't do anything. It now occupies
> Ctrl+Shift+F2 shortcut, which I have been happily using for something
> else, and
> there is no apparent way to reconfigure plugins' shortcuts.
>
> --
> You are receiving this mail because:
> You are the assignee for the bug.
Comment 5 tcanabrava 2023-06-03 07:17:36 UTC
Created attachment 159425 [details]
attachment-3879148-0.html

Nicolai, the last Konsole version has a tick to ignore profile changes on
the ssh plug-in, are you using the last version?

On Mon, 3 Apr 2023 at 08:41 Nicolai Langfeldt <bugzilla_noreply@kde.org>
wrote:

> https://bugs.kde.org/show_bug.cgi?id=461085
>
> --- Comment #2 from Nicolai Langfeldt <janl@langfeldt.net> ---
> > The main way it gets in the way is that it adds profiles for each host
> as it goes and the default konsole profile is in all cases "Built-in"
> rather than "Green".
>
> Even though "Green" is marked as default in the profile manager.
>
> --
> You are receiving this mail because:
> You are the assignee for the bug.
Comment 6 July Tikhonov 2023-06-03 08:03:13 UTC
(In reply to tcanabrava from comment #4)
> Click on the shortcut and change it. It’s there from day one.
> > --- Comment #3 from July Tikhonov <july.tikh@gmail.com> ---
> > The plugin is annoying even when it doesn't do anything. It now occupies
> > Ctrl+Shift+F2 shortcut, which I have been happily using for something
> > else, and
> > there is no apparent way to reconfigure plugins' shortcuts.

Sorry, I guess I wasn't clear and we aren't talking about the same thing. The plugin indeed provides some kind of changeble shortcut. I do not care about it because until today I was fortunate to not realize that the plugins exist.

But there are also shortcuts to show/hide plugin _panels_, and they appear to be fixed to Ctrl+Shift+F1 and Ctrl+Shift+F2 (for “Quick commands” and “SSH Manager” respectively). They are not listed in Konsole's Settings→Configure Keyboard Shortcuts or anywhere else I have looked. (I am using Konsole 22.13.3.)

Upon consideration, I think I will file another bug, as it is not about SSH Manager, but about plugins in general. Sorry.
Comment 7 tcanabrava 2023-06-03 08:11:05 UTC
Created attachment 159427 [details]
attachment-3881989-0.html

Hello July,

Please take in consideration the time I did put on the plugin system, to
not say things like "I was fortunate to not realize that the plugins
exist", I understand that some frustration can exist, but understand also
that this is helping a lot of people that were used to have a visual aid to
ssh in other systems - such as windows - to migrate to konsole and linux in
general.
You are right that the shortcuts are fixed right now, this is something I
didn't realized while I created the plugins, and I'll do my best to fix for
the next versions.


On Sat, Jun 3, 2023 at 10:03 AM July Tikhonov <bugzilla_noreply@kde.org>
wrote:

> https://bugs.kde.org/show_bug.cgi?id=461085
>
> --- Comment #6 from July Tikhonov <july.tikh@gmail.com> ---
> (In reply to tcanabrava from comment #4)
> > Click on the shortcut and change it. It’s there from day one.
> > > --- Comment #3 from July Tikhonov <july.tikh@gmail.com> ---
> > > The plugin is annoying even when it doesn't do anything. It now
> occupies
> > > Ctrl+Shift+F2 shortcut, which I have been happily using for something
> > > else, and
> > > there is no apparent way to reconfigure plugins' shortcuts.
>
> Sorry, I guess I wasn't clear and we aren't talking about the same thing.
> The
> plugin indeed provides some kind of changeble shortcut. I do not care
> about it
> because until today I was fortunate to not realize that the plugins exist.
>
> But there are also shortcuts to show/hide plugin _panels_, and they appear
> to
> be fixed to Ctrl+Shift+F1 and Ctrl+Shift+F2 (for “Quick commands” and “SSH
> Manager” respectively). They are not listed in Konsole's Settings→Configure
> Keyboard Shortcuts or anywhere else I have looked. (I am using Konsole
> 22.13.3.)
>
> Upon consideration, I think I will file another bug, as it is not about SSH
> Manager, but about plugins in general. Sorry.
>
> --
> You are receiving this mail because:
> You are the assignee for the bug.
Comment 8 July Tikhonov 2023-06-03 08:41:32 UTC
(In reply to tcanabrava from comment #7)
> Hello July,
> 
> Please take in consideration the time I did put on the plugin system, to
> not say things like "I was fortunate to not realize that the plugins
> exist", I understand that some frustration can exist, but understand also
> that this is helping a lot of people that were used to have a visual aid to
> ssh in other systems - such as windows - to migrate to konsole and linux in
> general.
> You are right that the shortcuts are fixed right now, this is something I
> didn't realized while I created the plugins, and I'll do my best to fix for
> the next versions.

Yes, you are right, I am sorry. Got too annoyed by shortcut suddenly failing. Thanks for your work!
Comment 9 Markus Wernig 2023-06-03 11:14:27 UTC
(In reply to tcanabrava from comment #7)

> Please take in consideration the time I did put on the plugin system, to
> not say things like "I was fortunate to not realize that the plugins
> exist", I understand that some frustration can exist, but understand also
> that this is helping a lot of people that were used to have a visual aid to
> ssh in other systems - such as windows - to migrate to konsole and linux in
> general.

Dear @tcanabrava

I did not want to belittle your work. I am sure the plugin was developped with much expertise, diligence and the best intentions.
I also see your point (potentially alleviating the switch to Linux for users of graphical SSH managers like putty or SecureCRT).

But is there not also the point of long-standing Linux users who do not require such alleviation? Is it fair to force them to use the plugin even if they did not choose in any way to install it?

I personally do not think so. Users should have a choice, which software they want to use.

SSH is a central part of my everyday work, and I choose to manage it in a way that best fits my needs. Since the sshmanager plugin cannot be configured to do the same, I do not want to use it.

But that is currently not possible.

Mostly, because you chose to integrate it so tightly with Konsole. It even parses the command line and acts upon that (which, by the way, is something neither putty nor SecureCRT have ever done - and rightly so). I fail to see how that would help any Linux novice, on the contrary. In the best of cases it will make them get used to a way of managing SSH that exists nowhere else and will be useless to them once they switch to another terminal emulator or desktop system. In the worst of cases it will interfere with what they want to do and drive them away.

Have you ever considered a less intrusive way of integrating sshmanager with Konsole? I think if it were more of a standalone application (that could still use the konsole framework, profiles etc.), it would be even more useful - to Linux novices and existing users alike.

For the time being, I stand with my request for a way to disable the plugin. This does not mean, however, that I do not appreciate the great work that you and the other KDE devs are doing!

Currently, I have to do this after every Plasma update: 
chmod 700 /usr/lib64/qt5/plugins/konsoleplugins/konsole_sshmanagerplugin.so
(Which, by the way, also disables the Ctrl-Shift-F2 shortcut).

Best regards
Markus
Comment 10 tcanabrava 2023-06-03 13:02:04 UTC
Created attachment 159437 [details]
attachment-3897034-0.html

Markus,

I did indeed consider a less intrusive way to develop the plugin, but then
I realized that a lot of people that answered my request to "how do you use
profiles in konsole" were using the *profile* manager as a way to interact
with different SSH connections (some of them having over 20 - 40 profiles
that differed only in name and the ssh command. This made me think that a
plugin *for* ssh was needed.

I do understand your concerns and I plan to implement a way to disable /
unload plugins in the future, but time has been complex at the moment so I
ask for a bit of patience (or help on the code).
*I* ould personally accept a patch that allows to unload plugins (such the
one in kate) so people can use the plugins if they want, and not being
forced to.


On Sat, Jun 3, 2023 at 1:14 PM Markus Wernig <bugzilla_noreply@kde.org>
wrote:

> https://bugs.kde.org/show_bug.cgi?id=461085
>
> --- Comment #9 from Markus Wernig <public@wernig.net> ---
> (In reply to tcanabrava from comment #7)
>
> > Please take in consideration the time I did put on the plugin system, to
> > not say things like "I was fortunate to not realize that the plugins
> > exist", I understand that some frustration can exist, but understand also
> > that this is helping a lot of people that were used to have a visual aid
> to
> > ssh in other systems - such as windows - to migrate to konsole and linux
> in
> > general.
>
> Dear @tcanabrava
>
> I did not want to belittle your work. I am sure the plugin was developped
> with
> much expertise, diligence and the best intentions.
> I also see your point (potentially alleviating the switch to Linux for
> users of
> graphical SSH managers like putty or SecureCRT).
>
> But is there not also the point of long-standing Linux users who do not
> require
> such alleviation? Is it fair to force them to use the plugin even if they
> did
> not choose in any way to install it?
>
> I personally do not think so. Users should have a choice, which software
> they
> want to use.
>
> SSH is a central part of my everyday work, and I choose to manage it in a
> way
> that best fits my needs. Since the sshmanager plugin cannot be configured
> to do
> the same, I do not want to use it.
>
> But that is currently not possible.
>
> Mostly, because you chose to integrate it so tightly with Konsole. It even
> parses the command line and acts upon that (which, by the way, is something
> neither putty nor SecureCRT have ever done - and rightly so). I fail to
> see how
> that would help any Linux novice, on the contrary. In the best of cases it
> will
> make them get used to a way of managing SSH that exists nowhere else and
> will
> be useless to them once they switch to another terminal emulator or desktop
> system. In the worst of cases it will interfere with what they want to do
> and
> drive them away.
>
> Have you ever considered a less intrusive way of integrating sshmanager
> with
> Konsole? I think if it were more of a standalone application (that could
> still
> use the konsole framework, profiles etc.), it would be even more useful -
> to
> Linux novices and existing users alike.
>
> For the time being, I stand with my request for a way to disable the
> plugin.
> This does not mean, however, that I do not appreciate the great work that
> you
> and the other KDE devs are doing!
>
> Currently, I have to do this after every Plasma update:
> chmod 700 /usr/lib64/qt5/plugins/konsoleplugins/konsole_sshmanagerplugin.so
> (Which, by the way, also disables the Ctrl-Shift-F2 shortcut).
>
> Best regards
> Markus
>
> --
> You are receiving this mail because:
> You are the assignee for the bug.
Comment 11 Markus Wernig 2023-06-06 21:36:33 UTC
(In reply to tcanabrava from comment #10)

> I did indeed consider a less intrusive way to develop the plugin, but then
> I realized that a lot of people that answered my request to "how do you use
> profiles in konsole" were using the *profile* manager as a way to interact
> with different SSH connections (some of them having over 20 - 40 profiles
> that differed only in name and the ssh command. This made me think that a
> plugin *for* ssh was needed.

OK, so there already *was* a way to manage SSH connections in a graphical interface (albeit not perfect).
From my point of view, this approach only lacked the possibility to separate the connections into groups/categories, else it was quite viable (and less error-prone than the current plugin approach). So a (presumably) lightweight CSS update to the Konsole Profiles widget could have achieved much of the same effect the sshmanager plugin strives for.

I still do not understand how the profile hack people were using to manage SSH lead to the intrusive approach that was taken with the plugin. Even if there was a general need for a SSH plugin, why choose to make it compulsory for all Konsole users and even make it parse the command line (which, in my opinion, was a less than wise design choice)? After all, Konsole is a TERMINAL emulator, not a SHELL. As such, it should respond only to defined control/escape sequences, and nothing else.

> I do understand your concerns and I plan to implement a way to disable /
> unload plugins in the future,

I would very, very much appreciate that! But using that approach would require writing an entire plugin manager for Konsole, which seems rather unlikely to happen (given that there are no more than two "plugins" at the moment). So I would rather suggest a flag to be stored in the global section of konsolesshconfig, which should tell the plugin whether to be active or not:

[Global plugin config]
manageProfile=false
-> enablePlugin=true|false

> *I* ould personally accept a patch that allows to unload plugins (such the
> one in kate) so people can use the plugins if they want, and not being
> forced to.

I have no meaningful experience in graphical widget frameworks more recent than BorlandC and MFC. But I will try to support any of your efforts to remedy the current situation by all means available to me.

Best /m
Comment 12 Markus Wernig 2023-06-06 21:45:37 UTC
(In reply to tcanabrava from comment #10)

> I do understand your concerns and I plan to implement a way to disable /
> unload plugins in the future, but time has been complex at the moment so I
> ask for a bit of patience (or help on the code).
> *I* ould personally accept a patch that allows to unload plugins (such the
> one in kate) so people can use the plugins if they want, and not being
> forced to.

Another suggestion (also viable for me as a Gentoo Linux user) would be a compile-time make or CFLAG to disable compilation of the plugin.
Comment 13 July Tikhonov 2023-06-07 01:30:47 UTC
(In reply to Markus Wernig from comment #12)
> (In reply to tcanabrava from comment #10)
> Another suggestion (also viable for me as a Gentoo Linux user) would be a
> compile-time make or CFLAG to disable compilation of the plugin.

Apparently, such flags already exist. Konsole's CMakeLists.txt has those lines:

option(ENABLE_PLUGIN_SSHMANAGER "Build the SSHManager plugin" ON)
option(ENABLE_PLUGIN_QUICKCOMMANDS "Build the Quick Commands plugin" ON)
Comment 14 Markus Wernig 2023-06-13 14:33:53 UTC
(In reply to July Tikhonov from comment #13)

> Apparently, such flags already exist. Konsole's CMakeLists.txt has those
> lines:
> 
> option(ENABLE_PLUGIN_SSHMANAGER "Build the SSHManager plugin" ON)
> option(ENABLE_PLUGIN_QUICKCOMMANDS "Build the Quick Commands plugin" ON)

Thank you very much!
I was now able to patch the Gentoo ebuild for konsole so that the ssh manager plugin is no longer compiled, and have opened an according change request in the Gentoo bug tracker.
See https://bugs.gentoo.org/show_bug.cgi?id=908444