Add ahfail, a screen locker of its own

ahfail locks the screen itself instead of hooking another locker: Wayland
through ext-session-lock-v1 (gtk-session-lock), X11 through an input grab.
It authenticates against its own PAM service, /etc/pam.d/ahfail, so a
package never has to edit another package's PAM file.

One command for every platform: ahfail (lock), ahfail test (the effect
without locking) and ahfail doctor (what is missing, with the fix).
Enter is handled directly and the entry uses no input method, since the
Wayland text-input IM swallowed Return. Sprites avoid the password box
in window coordinates, and placement gets 100 tries instead of 10.

Claude-Session: https://claude.ai/code/session_012LCTmU2ewo8tnM1dByYAoG
This commit is contained in:
Asger Geel Weirsøe
2026-09-30 19:18:21 +02:00
parent 18c5c05be1
commit 37e6c36aee
13 changed files with 1174 additions and 1 deletions
Generated
+15
View File
@@ -8,6 +8,21 @@ version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
[[package]]
name = "ahfail"
version = "0.10.0"
dependencies = [
"ahfail-ui",
"cc",
"gdk",
"glib",
"gstreamer",
"gstreamer-player",
"gtk",
"libc",
"pkg-config",
]
[[package]]
name = "ahfail-display"
version = "0.1.0"