On Tue, 12 Aug 2014 18:33:21 -0500
Canek Peláez Valdés <[email protected]> wrote:
> Assuming you want to disable the functionality for one user, this
> disables both the functionality *AND* the buttons (they show up grayed
> out):
>
> $ cat /etc/polkit-1/rules.d/10-no-restart-shutdown.rules
> polkit.addRule(function(action, subject) {
> if (subject.user == "myuser") {
> if (action.id.match("org.freedesktop.login1.power-off") ||
> action.id.match("org.freedesktop.login1.reboot")) {
> return polkit.Result.NO;
> }
> }
> });
>
> Of course, change "myuser" for the user you want to disable this. You
> can also use groups (subject.isInGroup("group")), or use "suspend" or
> "hibernate" instead of "reboot".
>
That worked. Thank you very much. Now I have disabled (greyed out) the
buttons for certain users. That's what I have looked for.
Bye
Johannes
--
------//--------------------------------------------------------------
// Johannes R. Geiss Mac mini server and
\\ // OpenPandora user
--\X/-----------------------------------------------------------------