This forum has been archived. All content is frozen. Please use KDE Discuss instead.

locking konsole

Tags: None
(comma "," separated)
St??phane ANCELOT
Registered Member
Posts
35
Karma
0
OS

locking konsole

Tue May 17, 2016 7:11 am
I have not found a way to disallow konsole access .
Is there a way ???
Regards
steph
Don Jajo
Registered Member
Posts
67
Karma
0
OS

Re: locking konsole

Tue May 17, 2016 8:42 am
This way is kinda rough, edit the current profile and change the Command to

Code: Select all
/bin/false


Save and Konsole will stop opening. Edit the profile viewtopic.php?f=21&t=78963 and change back
wolfi323
Registered Member
Posts
1129
Karma
11
OS

Re: locking konsole

Wed May 18, 2016 12:10 pm
It is possible to disable shell access via KIOSK restrictions, by adding this to /etc/kde5rc (or maybe /etc/xdg/kdeglobals?):
Code: Select all
[KDE Action Restrictions][$i]
action/shell_access=false

(the [$i] will make it impossible to override it in the user config files)

See https://userbase.kde.org/KDE_System_Adm ... troduction for more information about KIOSK, although that's a bit outdated (it should still apply more or less though).

There is a bug that you can still open Konsole from dolphin then, but it has been fixed today:
https://quickgit.kde.org/?p=dolphin.git ... 528ec714e8

And of course it also won't protect against running an xterm (or any other terminal application) from the application menu.
Running Konsole should not be possible though, unless there is another bug.

See also https://mail.kde.org/pipermail/plasma-d ... 53133.html

Haven't tried that myself though.
wolfi323
Registered Member
Posts
1129
Karma
11
OS

Re: locking konsole

Wed May 18, 2016 2:21 pm
I tried it myself and noticed 2 things:
- It should actually be:
Code: Select all
[KDE Action Restrictions][$i]
shell_access=false

Sorry.

- It doesn't work in Plasma5 unfortunately it seems. Though other restrictions do work (e.g. action/file_new=false and action/file_open=false).
Probably worth a bug report.
It does work in KDE4 (Plasma1), though you need to add it to /etc/kde4rc in this case of course.

You didn't specify which version you are using...
wolfi323
Registered Member
Posts
1129
Karma
11
OS

Re: locking konsole

Thu May 19, 2016 9:42 pm
wolfi323 wrote:- It doesn't work in Plasma5 unfortunately it seems. Though other restrictions do work (e.g. action/file_new=false and action/file_open=false).
Probably worth a bug report.


PS: this commit (will be in KDE Frameworks 5.23.0, going to be released at the beginnining of June) looks like it would fix it:
https://quickgit.kde.org/?p=kconfig.git ... d86f21a116

So, a workaround would therefore be to remove the "TryExec" line from /usr/share/applications/org.kde.konsole.desktop and the restriction should work with older kconfig versions too.
I just tried that (with Plasma 5.5.4 and KF 5.22.0) and it works, it even hides the konsole entry completely in the application menu.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]