Open source face authentication for Linux. Unlock your screen with your face automatically, while keeping your password as the safe fallback.
- IR sensor support with automatic detection
- Falls back to regular webcam if no IR sensor is available
- Camera activates only when the lockscreen wakes
- Automatic screen unlock on face recognition
- Per-user face registration
faceauthctlcommand for status, diagnostics, camera testing, and re-enrollment- Safer runtime token storage under
/run/user/<uid>/faceauth - Camera scan timeout and retry cooldown
- Sleep/resume recovery hook
- Safe uninstall script
- Best-effort support across major Linux distributions
git clone https://github.com/NEESCHAL-3/FaceAuth.git
cd FaceAuth
bash install.shA reboot is usually not required. After installation, lock your screen and test FaceAuth.
- Fedora
- Ubuntu
- Arch Linux
- Any GNOME based Linux distribution
- KDE Plasma (with SDDM or plasma-login)
- Any Linux distribution using GDM or SDDM as the display manager
FaceAuth runs a lightweight background daemon that monitors for lockscreen events. When the lockscreen wakes, the selected camera activates and scans for your registered face.
Once your face is recognized, FaceAuth writes a short-lived runtime token and sends an unlock signal. The unlock signal targets the screensaver D-Bus interface matching your desktop (org.gnome.ScreenSaver on GNOME, org.freedesktop.ScreenSaver / org.kde.screensaver on KDE Plasma), with loginctl unlock-sessions as a fallback. The PAM helper verifies the token and allows the unlock.
If no face is recognized within the configured scan timeout, the camera turns off automatically. If the lockscreen is still awake, FaceAuth waits for a cooldown period and then retries scanning.
For security reasons, FaceAuth may require your password once after a full restart, shutdown, or first boot. After that first password unlock, FaceAuth works normally for lockscreen unlocks and sleep/resume unlocks.
FaceAuth installs a control command:
faceauthctlUseful commands:
faceauthctl status
faceauthctl doctor
faceauthctl logs
faceauthctl list-cameras
faceauthctl test-camera
faceauthctl set-camera <index>
faceauthctl enrollDefault behavior:
- Maximum face scan time: 30 seconds
- Retry cooldown while lockscreen is still awake: 20 seconds
- Password remains available as the fallback unlock method
- Reboot, shutdown, or first boot may require password once for security
User configuration is stored at:
~/.faceauth/config.jsonImportant config options:
ir_camera: camera index used for face unlocktolerance: face matching strictnessmax_scan_seconds: how long the camera scans before stoppingscan_retry_cooldown_seconds: how long FaceAuth waits before retrying while the lockscreen is still awakedesktop: detected desktop (gnomeorkde), used to pick the right unlock signaldisplay_manager: detected display manager (gdm,sddm, ...), used for PAM setup
- Linux with GNOME or KDE Plasma desktop
- GDM (GNOME) or SDDM or plasma-login (KDE Plasma) recommended for automatic PAM setup
- Webcam or IR sensor
- Python 3.8 or higher
- sudo access for installation
./uninstall.shTo remove FaceAuth and delete local FaceAuth user data:
./uninstall.sh --purgeCheck service status:
systemctl status faceauth --no-pagerCheck logs:
journalctl -u faceauth -e --no-pagerRun diagnostics:
faceauthctl doctorIf FaceAuth does not unlock immediately:
- Make sure the selected camera works with
faceauthctl test-camera - Try better lighting
- Re-register your face with
faceauthctl enroll - Check logs with
faceauthctl logs - Log out and log back in
- Reboot only as a last fallback
FaceAuth does not remove your password login. Your password remains the fallback method.
FaceAuth uses a short-lived runtime token stored under /run/user/<uid>/faceauth. The token is permission-restricted and consumed after successful use.
For security reasons, password unlock may be required once after reboot, shutdown, or first boot before FaceAuth becomes active for normal lockscreen use.
Pull requests are welcome. For major changes please open an issue first.
MIT