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:
1 parent
0db0af8b76
commit
381d4625a3
1 file changed
+12
@@ -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;
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user