setup polkit rules for passwordless suspend.target
This commit is contained in:
parent
f688067e92
commit
bdaf87974a
2 changed files with 4 additions and 1 deletions
2
debian/postinst
vendored
2
debian/postinst
vendored
|
|
@ -3,3 +3,5 @@
|
|||
mkdir -p /etc/greetd
|
||||
update-alternatives --install /etc/greetd/config.toml greetd /usr/share/greetd/pogmom/config.toml 30 --force
|
||||
update-alternatives --install /etc/greetd/environments greetd_envs /usr/share/greetd/pogmom/environments 30 --force
|
||||
chown root:polkitd /usr/share/polkit-1/rules.d/pogmom-desktop.rules
|
||||
systemctl reload polkit.service || true
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
polkit.addRule(function(action, subject) {
|
||||
if (action.id == "org.freedesktop.login1.suspend" &&
|
||||
if (action.id == "org.freedesktop.systemd1.manage-units" &&
|
||||
action.lookup("unit") == "suspend.target" &&
|
||||
subject.isInGroup("users")) {
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue