Reply to topic

Can you edit the items in 'Power/Session' ( Leave )

interele
Registered Member
Posts
131
Karma
0
OS
Can I edit the items in Power/Session ( openSUSE ) / Leave ( Debian ) so that
I can get rid of everything except logout, shutdown and reboot

Ta

M

PS This is openSUSE 42.2 or Debian 9

Some more - as Logout is between Lock and Switch user students keep missing the 'Logout'
option and accidentally locking the machine
wolfi323
Registered Member
Posts
1128
Karma
11
OS
You cannot edit them per se.
There is a setting "Offer shutdown options" in Systemsettings->Startup and Shutdown->Sessions, but that would only remove Reboot and Shutdown I think.

But it seems to be possible to disable them via KIOSK restrictions, see https://userbase.kde.org/KDE_System_Adm ... troduction.
action/lock_screen
whether the user will be able to lock the screen.
logout
whether the user will be able to logout from KDE.
start_new_session
defines whether the user may start a second X session. See also the documentation on kdm configuration.
switch_user
defines whether user switching via kdm is allowed. See also the documentation on kdm configuration.
(haven't tried them though)

Reboot, Shutdown, Hibernate and Suspend are governed by polkit, you can disable them via polkit rules:
https://wiki.archlinux.org/index.php/Po ... _hibernate
(on openSUSE, you can also add your custom rules like "org.freedesktop.login1.suspend no" to /etc/polkit-default-privs.local and run /sbin/set_polkit_default_privs to generate the corresponding JavaScript snippets)

Actions that are not allowed should disappear from the menu as well...
interele
Registered Member
Posts
131
Karma
0
OS
Many thanks, I will give it a go

Ta

M
interele
Registered Member
Posts
131
Karma
0
OS
lock, hibernate and suspend as per your guide worked a treat.
switch_session didn't seem to do anything or I misunderstood
the guide - I added this to kdeglobals:-

[KDE Action Restrictions][$i]
action/lock_screen=false
switch_user=false


I think it's something to do with sessions being handled by sddm
in Plasma5 but as it stands it killed 75% of the problem :-)

Thanks

M
interele
Registered Member
Posts
131
Karma
0
OS
Bingo !

Seems I took it a bit literally

you have to have:-

[KDE Action Restrictions][$i]
action/lock_screen=false
action/switch_user=false
action/start_new_session=false

and we are cooking with gas !

Many thanks

M

 
Reply to topic

Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], claydoh, farid, Google [Bot], jacksong, joebuckley, koffeinfriedhof, Moldmaker, Section_8, Sogou [Bot], zfazylz