41228605ad
Update PKGBUILD version / update-pkgver (push) Successful in 6s
Reboot/shutdown buttons always failed: power.rs called `loginctl reboot|poweroff`, but loginctl has no such verbs (systemd 260) — those belong to systemctl. moonlock/moonset already used systemctl; moongreet was the outlier. Switch to `systemctl --no-ask-password reboot|poweroff`. The multi-monitor greeter gave Exclusive keyboard only to the first monitor's window, so a user focused on any other output could not type the password. Drop the per-monitor loop + hotplug; create one window on the focused output (no set_monitor) with Exclusive keyboard. Polkit rule kept as a harmless safety net (it was never the blocker; CanReboot returns yes). The missing journal errors were not a logging bug — they were lost to a hard power-cut before journald synced.
13 lines
593 B
Plaintext
13 lines
593 B
Plaintext
// ABOUTME: Allow the greeter user to reboot and power off without authentication.
|
|
// ABOUTME: Safety net for the agent-less greeter session — no askpass/polkit agent to answer a challenge.
|
|
|
|
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;
|
|
}
|
|
});
|