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

2018-03-14 Thread Zaiwen Gong

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






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

2018-03-13 Thread Zaiwen Gong

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




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

2018-03-13 Thread Kevin Krammer
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
-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring


signature.asc
Description: This is a digitally signed message part.


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

2018-03-13 Thread René J . V . Bertin
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?

R.


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

2018-03-12 Thread Zaiwen Gong

Hi Kevin,

Thank you very much for the reply.

I tried several files (kdeglobals, ksmserverrc, plasma-desktoprc, 
plasma-desktop-appletsrc) with two formats, but none is working.


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


   [KDE Action Restrictions]
   lock_session=false
   switch_user=false

I will ask at the KDE Enterprise mailing list.

||

Thanks,

Zaiwen


On 03/12/18 05:05, Kevin Krammer wrote:

Hi,

On Freitag, 9. März 2018 21:55:52 CET Zaiwen Gong wrote:

Hi,

I am using KDE 4.10.

I would like to find out how to disable the Switch User and Lock in
Leave Menu.

I don't want to disable Switch User and Lock button in the Leave Menu at
system level.

Instead, I would like to do it at user level. That is, I would like to
configure a special user's .kde/share/config file and when this special
user logins, he will not see the Switch User and Lock button in the
Leave Menu.

I tried to put below contents in .kde/share/config/kdeglobals of
intended user.

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.

Cheers,
Kevin




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

2018-03-12 Thread Kevin Krammer
Hi,

On Freitag, 9. März 2018 21:55:52 CET Zaiwen Gong wrote:
> Hi,
> 
> I am using KDE 4.10.
> 
> I would like to find out how to disable the Switch User and Lock in
> Leave Menu.
> 
> I don't want to disable Switch User and Lock button in the Leave Menu at
> system level.
> 
> Instead, I would like to do it at user level. That is, I would like to
> configure a special user's .kde/share/config file and when this special
> user logins, he will not see the Switch User and Lock button in the
> Leave Menu.
> 
> I tried to put below contents in .kde/share/config/kdeglobals of
> intended user.

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.

Cheers,
Kevin
-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring


signature.asc
Description: This is a digitally signed message part.


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

2018-03-09 Thread Zaiwen Gong

Hi,

I am using KDE 4.10.

I would like to find out how to disable the Switch User and Lock in 
Leave Menu.


I don't want to disable Switch User and Lock button in the Leave Menu at 
system level.


Instead, I would like to do it at user level. That is, I would like to 
configure a special user's .kde/share/config file and when this special 
user logins, he will not see the Switch User and Lock button in the 
Leave Menu.


I tried to put below contents in .kde/share/config/kdeglobals of 
intended user.


[KDE Action Restrictions]
lock_session=false
switch_user=false

Then I restart the session and check again, but it doesn't work.

Please advise how to do this in KDE?


Thanks,
Zaiwen