Hyprland (hyprlock)
Gaze integrates with hyprlock, the Hyprland screen locker, via a dedicated PAM service. The gaze-hyprlock package installs /etc/pam.d/hyprlock-gaze, leaving the distro's own /etc/pam.d/hyprlock untouched.
You opt in by pointing hyprlock.conf at the Gaze PAM service.
Install
The one-line installer auto-installs gaze-hyprlock and edits ~/.config/hypr/hyprlock.conf when it detects a Hyprland session or the hyprlock binary.
Manual install:
sudo apt-get install gaze-hyprlocksudo dnf install gaze-hyprlockyay -S gaze-hyprlock-binEnable
Add to ~/.config/hypr/hyprlock.conf:
general {
pam_module = hyprlock-gaze
}Restart hyprlock or lock the session again. Face unlock runs first; if it fails or times out, hyprlock falls back to the password prompt.
Simultaneous mode
For password-and-face authentication in parallel (type your password while the camera matches your face; whichever succeeds first unlocks), use:
general {
pam_module = hyprlock-gaze-simultaneous
}This uses pam_gaze_grosshack.so, a PAM shim that lets Gaze run alongside the password prompt instead of blocking it.
How it works
hyprlock-gaze is a PAM service that stacks pam_gaze.so on top of your system password stack (system-auth on RPM/Arch, common-auth on Debian/Ubuntu). The auth flow:
- hyprlock calls PAM with service name
hyprlock-gaze pam_gaze.soruns as the logged-in user, claims the camera via thegazedDBus service, and runs face verification- On match →
PAM_SUCCESS, hyprlock unlocks - On no enrolled faces or daemon unavailable →
PAM_IGNORE, hyprlock proceeds to password - On no match →
PAM_AUTH_ERR, hyprlock proceeds to password
No gazed configuration changes are required. The DBus policy already permits unprivileged users to claim the camera and run verification against their own enrolled templates.
Prerequisites
gazeddaemon running (systemctl status gazed)- At least one enrolled face:
gaze add-face default - Working camera (test with
gaze auth)
Disable
Remove the pam_module line from hyprlock.conf (or set it to hyprlock's default, hyprlock). Uninstall the package if you do not plan to use it again:
sudo apt-get remove gaze-hyprlocksudo dnf remove gaze-hyprlockyay -R gaze-hyprlock-binTroubleshooting
- Falls back to password every time: daemon may not be running, or no faces enrolled for the current user. Check
systemctl status gazedandgaze list-faces. - Camera busy: another Gaze client (GUI, GNOME extension) may hold the camera. Close it and retry.
- PAM error in logs: check
journalctl -u gazedandjournalctl --user -t hyprlock.