From a6de85650d5818a352e38a8f167e023ea51cf2c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asger=20Geel=20Weirs=C3=B8e?= Date: Wed, 6 May 2026 16:02:37 +0200 Subject: [PATCH] docs: make X11 PAM config instructions unambiguous Replace bare config snippets with actual tee -a commands so there is no way to mistake a file entry for a shell command to run directly. Co-Authored-By: Claude Sonnet 4.6 --- readme.md | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/readme.md b/readme.md index bb07b8f..3326ac5 100644 --- a/readme.md +++ b/readme.md @@ -83,30 +83,29 @@ gtklock -m /usr/lib/gtklock/ahfail-module.so -- --deadzone=860,440,200,200 --- ## Usage Linux - X11 (i3lock, xscreensaver, etc.) -First compile as -Add the PAM module to your screen locker's PAM service file. Use the full path — `$(libdir)/ahfail` is not in PAM's default search path. -**Arch / standard:** -``` -auth optional /usr/lib/ahfail/libahfail_pam.so +Add a line to your screen locker's PAM service file (e.g. `/etc/pam.d/i3lock`). This is a config file entry — use `tee -a` to append it, not `sudo` directly: + +**Arch / standard (`--prefix=/usr`):** +```bash +echo 'auth optional /usr/lib/ahfail/libahfail_pam.so' | sudo tee -a /etc/pam.d/i3lock ``` **Fedora / RHEL (multilib):** -``` -auth optional /usr/lib64/ahfail/libahfail_pam.so +```bash +echo 'auth optional /usr/lib64/ahfail/libahfail_pam.so' | sudo tee -a /etc/pam.d/i3lock ``` **Debian / Ubuntu (multiarch):** -``` -auth optional /usr/lib/x86_64-linux-gnu/ahfail/libahfail_pam.so +```bash +echo 'auth optional /usr/lib/x86_64-linux-gnu/ahfail/libahfail_pam.so' | sudo tee -a /etc/pam.d/i3lock ``` -Common service files: `/etc/pam.d/i3lock`, `/etc/pam.d/xscreensaver`, `/etc/pam.d/lightdm`. +Replace `i3lock` with your locker's service name (`xscreensaver`, `lightdm`, etc.). The full path is required — `$(libdir)/ahfail` is not in PAM's default search path. -Optionally pass the display binary path as an argument if it is not at the default location: - -``` -auth optional /usr/lib/ahfail/libahfail_pam.so display_path=/usr/lib/ahfail/ahfail-display +If the display binary is not at the default location, add `display_path=`: +```bash +echo 'auth optional /usr/lib/ahfail/libahfail_pam.so display_path=/usr/lib/ahfail/ahfail-display' | sudo tee -a /etc/pam.d/i3lock ``` ---