Face + gesture authentication layer for Linux PAM, built on top of Howdy.
Authentication succeeds when the user's face is recognized and the correct hand gesture is detected simultaneously. Optionally, gesture-only mode can be enabled to skip face recognition.
- Arch Linux
uv— Python package manager (sudo pacman -S uv)gcc,git,cmake— build tools (sudo pacman -S gcc git cmake)- A compatible infrared or regular webcam
git clone https://github.com/Palm-Pass/tfg.git
cd tfg
makepkg -simakepkg -si builds the package, installs it via pacman, and runs the post-install hook which:
- Creates a Python virtual environment at
/usr/lib/howdy/.venvand installs all dependencies viauv - Downloads the required dlib face recognition models
sudo howdy configSet at minimum:
[video]
device_path = /dev/video2 # adjust to your camera device
timeout = 10To find your camera device:
ls /dev/video*If frames are too dark or black, try a different device path (/dev/video0, /dev/video1, etc.) or reduce the dark_threshold value.
sudo howdy -U $USER addVerify it works:
sudo howdy -U $USER testsudo howdy-gesture-config rock # available: rock, paper, scissorsAdd pam_gesture.so to the relevant PAM config file. The line must go at the top of the auth block.
For sudo:
sudo cp /etc/pam.d/sudo /etc/pam.d/sudo.bak
sudo nano /etc/pam.d/sudoFor login (display manager / TTY):
sudo cp /etc/pam.d/system-auth /etc/pam.d/system-auth.bak
sudo nano /etc/pam.d/system-authIn both cases, add this line at the top:
auth sufficient pam_gesture.so
Note: Modifying
system-authaffects all PAM-aware services that include it (login, screen lock, su, etc.). Always keep a backup and a root shell open while testing.
Once PAM is configured, authentication is automatic when running sudo or any PAM-protected action:
- A desktop notification appears showing the gesture to perform (requires a notification daemon)
- Look at the camera and perform the gesture
- Authentication succeeds when your face is recognized and the gesture matches
To authenticate using only the gesture (no face recognition required):
sudo howdy-gesture-only trueTo re-enable combined face + gesture authentication:
sudo howdy-gesture-only falseAuthentication fails instantly
- Check the camera device path:
ls /dev/video* - Verify the config:
sudo howdy config→device_path - Check logs:
journalctl -xe | grep TFG-LOG
Face not recognized
- Re-add your face model:
sudo howdy -U $USER add - Increase
timeoutin the config to give more time
AVX2 / SIGILL error (virtual machines)
- MediaPipe requires AVX2 CPU instructions. In VMs without AVX2, gesture recognition is automatically disabled and authentication falls back to face-only mode.