diff options
author | Olivier Duchateau <olivierd@FreeBSD.org> | 2015-08-09 14:53:33 +0000 |
---|---|---|
committer | Olivier Duchateau <olivierd@FreeBSD.org> | 2015-08-09 14:53:33 +0000 |
commit | 4c6205c6222f3f70fa27d2aef5c84b508ba192db (patch) | |
tree | 1fd78fb353f215221d859c566c4c2c77625cbaa7 /x11-wm/xfce4-session | |
parent | 4e4d1e47651a979eefd393ccc5e8e7d6f1a4145a (diff) | |
download | ports-4c6205c6222f3f70fa27d2aef5c84b508ba192db.tar.gz ports-4c6205c6222f3f70fa27d2aef5c84b508ba192db.zip |
Notes
Diffstat (limited to 'x11-wm/xfce4-session')
-rw-r--r-- | x11-wm/xfce4-session/files/pkg-message.in | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/x11-wm/xfce4-session/files/pkg-message.in b/x11-wm/xfce4-session/files/pkg-message.in index a1c60f2d274a..64308c860d19 100644 --- a/x11-wm/xfce4-session/files/pkg-message.in +++ b/x11-wm/xfce4-session/files/pkg-message.in @@ -1,26 +1,20 @@ -To be able to shutdown or reboot your system, you'll have to add a .pkla file -in %%LOCALBASE%%/etc/polkit-1/localauthority/50-local.d directory. Which looks +To be able to shutdown or reboot your system, you'll have to add .rules +files in %%LOCALBASE%%/etc/polkit-1/rules.d directory. Which looks like this (replace PUTYOURGROUPHERE by your group): -[Restart] -Identity=unix-group:PUTYOURGROUPHERE -Action=org.freedesktop.consolekit.system.restart -ResultAny=yes -ResultInactive=yes -ResultActive=yes - -[Shutdown] -Identity=unix-group:PUTYOURGROUPHERE -Action=org.freedesktop.consolekit.system.stop -ResultAny=yes -ResultInactive=yes -ResultActive=yes +polkit.addRule(function (action, subject) { + if (action.id == "org.freedesktop.consolekit.system.restart" || + action.id == "org.freedesktop.consolekit.system.stop" + && subject.isInGroup("PUTYOURGROUPHERE")) { + return polkit.Result.YES; + } +}); For those who have working suspend/resume: -[Suspend] -Identity=unix-group:PUTYOURGROUPHERE -Action=org.freedesktop.upower.suspend -ResultAny=yes -ResultInactive=yes -ResultActive=yes +polkit.addRule(function (action, subject) { + if (action.id == "org.freedesktop.consolekit.system.suspend" + && subject.isInGroup("PUTYOURGROUPHERE")) { + return polkit.Result.YES; + } +}); |