fix: add polkit rule to allow greeter user to reboot and shutdown
The greetd greeter session is inactive in logind, so polkit defaults require admin authentication for power actions. This rule grants the greeter user permission for reboot and power-off without authentication.
This commit is contained in:
parent
324dda0548
commit
fcac91b540
12
defaults/etc/polkit-1/rules.d/50-moongreet-power.rules
Normal file
12
defaults/etc/polkit-1/rules.d/50-moongreet-power.rules
Normal file
@ -0,0 +1,12 @@
|
||||
// ABOUTME: Allow the greeter user to reboot and power off without authentication.
|
||||
// ABOUTME: Required because greetd's greeter session is inactive in logind.
|
||||
|
||||
polkit.addRule(function(action, subject) {
|
||||
if (subject.user === "greeter" &&
|
||||
(action.id === "org.freedesktop.login1.reboot" ||
|
||||
action.id === "org.freedesktop.login1.reboot-multiple-sessions" ||
|
||||
action.id === "org.freedesktop.login1.power-off" ||
|
||||
action.id === "org.freedesktop.login1.power-off-multiple-sessions")) {
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
});
|
||||
Loading…
x
Reference in New Issue
Block a user