Bug 340097 - using switch_user=false with kiosk has no effect when screen is locked
Summary: using switch_user=false with kiosk has no effect when screen is locked
Status: RESOLVED NOT A BUG
Alias: None
Product: ksmserver
Classification: Unmaintained
Component: lockscreen (other bugs)
Version First Reported In: unspecified
Platform: Debian stable Linux
: NOR minor
Target Milestone: ---
Assignee: David Edmundson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-18 15:56 UTC by Francesco Florian
Modified: 2015-02-15 15:56 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Francesco Florian 2014-10-18 15:56:41 UTC
putting 


in /usr/share/kde4/config/kdeglobals should disable user switching; it does the right thing as long as the session is active, but the "switch user" button in the unlock window (when screen is locked) continues to work.

Reproducible: Always

Steps to Reproduce:
1. edit /usr/share/kde4/config/kdeglobals adding the following section:
[KDE Action Restrictions][$i]
start_new_session=false
switch_user=false

2. lock screen
3. click the "switch user" button

Actual Results:  
a new login screen is shown

Expected Results:  
The button should disappear (or at least have no effect): user switching should be disabled

the workaround is not easy (using gnome-screensaver)
Comment 1 Sven Hertle 2014-12-11 15:24:39 UTC
I have the same problem using KDE platform version 4.14.2 on Debian testing.
Comment 2 Martin Flöser 2015-02-10 09:05:04 UTC
I just investigated and conclude that the code is correct. These are actions and thus the correct restriction must be:

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

At least under Plasma 5 with this action restriction in a global kdeglobas the lock screen does not offer new session or session switching. I assume the same should be the case on Plasma 4.

In addition I verified the usage with our code search:
http://lxr.kde.org/search?_filestring=&_string=start_new_session

In each case KAuthorized::authorizeKAction is used which according to the documentation is prepending an "action/". Also given the documentation under https://techbase.kde.org/KDE_System_Administration/Kiosk/Introduction#KDE_Action_Restrictions I conclude that it needs to be with "action/" prefix as the specific restrictions are called "actions".

If you know of a case where it works without the "action/" prefix, please let me know.
Comment 3 Francesco Florian 2015-02-15 15:56:31 UTC
it works without 'action/' in plasma 4 menus (it hides all buttons), debian stable and ubuntu; however it doesn't hide or disable the 'new session' button in the screen locker.

it does *not* work at all with 'action/' in plasma 4, ubuntu
i didn't try in plasma 5 yet

according to the documentation under https://techbase.kde.org/KDE_System_Administration/Kiosk/Keys#Session_Capability_Restrictions it seems that 'start_new_session' and 'switch_user' don't require 'action/', while 'new_session' (without start) does (https://techbase.kde.org/KDE_System_Administration/Kiosk/Keys).

looking at the code these are definitely used as actions, but are not working with the prepended 'action/' (maybe this has something to do with http://lxr.kde.org/source/kde/kdelibs/kdecore/doc/README.kiosk ?)