From 0fff052767335f33018c0896390e528aa6ec3dd3 Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Wed, 13 May 2026 13:43:28 +0100 Subject: fix(sway): call doas with absolute paths for reboot/poweroff MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit doas matches the 'cmd' rule literally against argv[0], not against the resolved PATH lookup. With 'cmd /usr/bin/poweroff' in doas.conf, 'doas poweroff' is denied silently — works only as 'doas /usr/bin/poweroff'. The interactive shell aliases sudo->doas and was hiding the issue when typing the bare command in a terminal (PATH expansion happens in the shell before doas sees argv[0]... only when explicitly typed with absolute path). --- dot_config/sway/config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dot_config/sway') diff --git a/dot_config/sway/config b/dot_config/sway/config index 5c9e767..93fd4be 100644 --- a/dot_config/sway/config +++ b/dot_config/sway/config @@ -124,8 +124,8 @@ bindsym $mod+Shift+c reload bindsym $mod+Shift+e exec swaynag -t warning -m 'Session' \ -B 'Lock' 'playerctl -a pause; swaylock -f -e -c 282828' \ -B 'Logout' 'swaymsg exit' \ - -B 'Reboot' 'doas reboot' \ - -B 'Poweroff' 'doas poweroff' + -B 'Reboot' 'doas /usr/bin/reboot' \ + -B 'Poweroff' 'doas /usr/bin/poweroff' # ── Personal keybinds ───────────────────────────────────────────────────────── -- cgit v1.3.1