KDE - How to disable the Switch User and Lock in Leave Menu ?

Zaiwen Gong zgong at bnl.gov
Wed Mar 14 16:11:57 GMT 2018


Hi,

I have got it to work with the help from KDE enterprise developer!

First, the relevant file should be whatever kdeglobals file the command 
"kde4-config --path config" lists.

Second, need to set the config to:

     switch_user=false

*as well as*

     action/switch_user=false

It is a bug in the underlying code, one of the many things that got 
fixed properly when they redid everything in Plasma5. It's much improved 
in this area.


In my case, what I did was:

1.  "*kde4-config --path config*" returns:

~/home/zaiwen/.kde/share/config/:/etc/kde/:/usr/share/kde-settings/kde-profile/default/share/config/:/usr/share/config/

2. Go through all the folders and find two kdeglobals files:

~/home/zaiwen/.kde/share/config/kdeglobals
/usr/share/kde-settings/kde-profile/default/share/config/kdeglobals

3. Update *~/home/zaiwen/.kde/share/config/kdeglobals* with:

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

4. Update 
*/usr/share/kde-settings/kde-profile/default/share/config/kdeglobals*. 
In this file, it contains one line which doesn't allow users to change 
KDE Action. Remove this line:

*[KDE Action Restrictions][$i]*

Now when I login, "Switch User" and "Lock" are removed from the Leave menu!

Thanks a lot!

Zaiwen



On 03/13/18 10:04, Zaiwen Gong wrote:
>
> Hi Kevin and René J.V. Bertin,
>
> I did some tests.
>
> With Plasma 5 (plasma-desktop-5.10.5-1.fc27.x86_64), I got it to work 
> by appending the following lines to my "*$HOME/.config/kdeglobals*":
>
>     [KDE Action Restrictions]
>     action/start_new_session=false
>     action/switch_user=false
>     action/lock_screen=false
>
> But I can't get it to work with Plasma 4.10. I tried 
> $HOME/.config/kdeglobals", $HOME/.kde/share/config/kdeglobals, 
> ksmserverrc, plasma-desktoprc,  plasma-desktop-appletsrc, none is 
> working.
>
> Not sure if it is not supported in Plasma 4 or is it because I don't 
> install plasma 4 correctly?
>
> Thanks,
>
> Zaiwen
>
>
>
> On 03/13/18 05:36, Kevin Krammer wrote:
>> On Dienstag, 13. März 2018 10:30:53 CET René J.V. Bertin wrote:
>>> On Monday March 12 2018 10:05:46 Kevin Krammer wrote:
>>>
>>> Hi,
>>>
>>> [...]
>>>
>>>> You could also try ksmserverrc or plasmarc
>>>>
>>>> Also consider asking at the KDE Enterprise mailinglist
>>>>
>>>> https://mail.kde.org/mailman/listinfo/enterprise
>>>>
>>>> It is used by sysadmins who manage KDE deployments and often discuss action
>>>> restrictions.
>>> I've often tried to configure the "Leave" menu so it never includes the
>>> Suspend-to-Disk option. Same advice, or is that something I should address
>>> at a level below KDE?
>> I would say generally same advice (ask on kde-enterprise), but if you want to
>> disable it globally then there might indeed be a system level option.
>>
>> Zaiwen's problem was a bit different since only specific accounts should have
>> the options disabled.
>>
>> Cheers,
>> Kevin
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde/attachments/20180314/c5e62b8e/attachment.htm>


More information about the kde mailing list