Skip to content

Latest commit

Β 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 

Repository files navigation

πŸ‘οΈ Howdy β€” IR Facial Recognition on Ubuntu 24.04

Windows Hello for Linux β€” Complete Setup Guide

Ubuntu Howdy Python Solved with Claude


πŸ“Έ Demo

πŸ“· Capture


βš™οΈ πŸš€Processing / Output


βš™οΈ setup

---

🧠 What Is This?

Howdy brings Windows Hello-style facial recognition to Linux. It uses your laptop's built-in IR (Infrared) camera β€” the small dark oval on the webcam strip β€” to authenticate you at login, sudo prompts, and more. No password needed, just look at the camera.

⚠️ Disclaimer: This is not created by me β€” just a setup guide by a clueless kid learning how to set up Howdy on Ubuntu. Use at your own risk.


πŸ“· Camera Options & Trade-offs

βœ… Regular RGB Webcam (/dev/video1)

  • βœ”οΈ Works with Howdy
  • βœ”οΈ Easier to set up
  • ❌ Can be fooled by a photo of your face
  • ❌ Affected by lighting changes (too dark = fails)
  • ❌ Less accurate overall

βœ… IR Camera (/dev/video3) β€” RECOMMENDED

  • βœ”οΈ Can't be fooled by photos
  • βœ”οΈ Works in complete darkness (IR emitter lights your face invisibly)
  • βœ”οΈ More accurate and faster recognition
  • βœ”οΈ What Windows Hello uses

πŸ’‘ Recommendation: Use the IR camera for best results. It's more secure and reliable.


βš™οΈ System Requirements

Item Details
OS Ubuntu 24.04 LTS
IR Camera Any IR webcam (e.g. Integrated_Webcam_FHD)
Python 3.12+
Howdy 2.6.1

πŸš€ Setup Guide

Step 1 β€” Install Python Dependencies

Ubuntu 24.04 uses PEP 668 which blocks system-wide pip installs by default.
Always use --break-system-packages flag:

sudo pip install --break-system-packages \
  dlib \
  face_recognition \
  opencv-python \
  ffmpeg-python \
  numpy --ignore-installed

⚠️ If numpy throws a conflict error, add --ignore-installed β€” it's already installed via apt and works fine.


Step 2 β€” Add Howdy PPA & Install

sudo add-apt-repository ppa:boltgolt/howdy
sudo apt update
sudo apt install howdy

πŸ’‘ If install gets interrupted, fix with:

sudo dpkg -i --force-all /var/cache/apt/archives/howdy_2.6.1_all.deb
sudo dpkg --configure -a

Step 3 β€” Create Howdy Alias

Howdy 2.6.1 on Ubuntu installs as a PAM module only β€” no binary in PATH.
Create an alias to use it like a normal command:

echo 'alias howdy="sudo python3 /usr/lib/security/howdy/cli.py"' >> ~/.bashrc
source ~/.bashrc

Now howdy add, howdy config, howdy list all work.


Step 4 β€” Fix Python 3 Compatibility Bug

Howdy's pam.py uses the Python 2 module name ConfigParser which doesn't exist in Python 3:

sudo sed -i 's/import ConfigParser/import configparser as ConfigParser/g' \
  /usr/lib/security/howdy/pam.py

Step 5 β€” Find Your IR Camera

v4l2-ctl --list-devices

Test each device visually β€” IR camera will look grey/monochrome:

ffplay /dev/video0    # regular webcam β€” shows color
ffplay /dev/video2    # IR camera β€” shows grey/infrared

Your IR camera is usually /dev/video2.


Step 6 β€” Configure Howdy

howdy config

Change these settings:

[video]
device_path = /dev/video2      # your IR camera device
certainty = 4.5                # lower = stricter (1-10)
timeout = 10                   # seconds before giving up
recording_plugin = opencv      # more stable than ffmpeg for IR
force_mjpeg = true             # fixes IR frame decoding issues
dark_threshold = 50            # handles IR lighting

[snapshots]
capture_failed = false         # disable to avoid permission errors
capture_successful = false

Step 7 β€” Add Your Face

howdy add
  • Look directly at the IR camera (dark oval β€” not the regular webcam)
  • Enter a label like zang when prompted
  • Stay still and well-lit while frames are captured

Step 8 β€” Set Up PAM Integration

Check if Howdy is already in PAM:

cat /etc/pam.d/common-auth | grep howdy

If empty (nothing returned), add it manually:

sudo nano /etc/pam.d/common-auth

Add this as the very first line:

auth sufficient /usr/lib/security/pam_python.so /usr/lib/security/howdy/pam.py

πŸ’‘ Find the correct pam_python.so path with:

find / -name "pam_python.so" 2>/dev/null

Step 9 β€” Fix GStreamer & DeprecationWarning Noise

Suppress OpenCV GStreamer warnings:

echo 'export OPENCV_LOG_LEVEL=ERROR' >> ~/.bashrc
source ~/.bashrc

Fix Python deprecation warning in compare.py:

sudo sed -i 's/datetime.datetime.utcnow()/datetime.datetime.now(datetime.timezone.utc)/g' \
  /usr/lib/security/howdy/compare.py

Fix snapshot permission error:

sudo chmod 777 /usr/lib/security/howdy/snapshots

Step 10 β€” Test It

sudo -k
sudo ls

Look at the IR camera. You should see:

Identified face as zang

πŸ› Problems & Solutions

Problem Cause Fix
Nala already running instance Ctrl+Z suspended a previous install Kill PIDs + clear lock files
howdy: command not found No binary installed β€” PAM module only Create alias pointing to cli.py
half-installed (iHR) Install was interrupted sudo dpkg -i --force-all howdy_*.deb
externally-managed-environment Ubuntu 24.04 PEP 668 Add --break-system-packages to pip
ConfigParser module not found Python 2 vs 3 naming sed patch on pam.py
PAM not triggering face scan Howdy never added to PAM Manually add to common-auth
pam_python.so not found Wrong path in PAM config find / -name pam_python.so
AttributeError: 'int' has no isdigit Bug in ffmpeg recorder Switch to recording_plugin = opencv
GStreamer warnings in terminal OpenCV verbose logging export OPENCV_LOG_LEVEL=ERROR
permission denied on snapshots Wrong folder permissions sudo chmod 777 howdy/snapshots
Face not recognized Low certainty or bad lighting Set certainty = 4.5, re-add model

πŸ“‹ Useful Commands

howdy add        # add a new face model
howdy list       # list saved models
howdy remove     # remove a model
howdy enable     # enable Howdy
howdy disable    # disable Howdy temporarily
howdy config     # edit configuration

πŸ€– Configured with Claude

This entire setup β€” every error, every fix, every config tweak β€” was debugged live with Claude by Anthropic.

  ╔══════════════════════════════════════════╗
  β•‘                                          β•‘
  β•‘        ✦  Claude by Anthropic  ✦        β•‘
  β•‘                                          β•‘
  β•‘     AI that guided this setup from       β•‘
  β•‘     first error to final working         β•‘
  β•‘     facial authentication β€” live.        β•‘
  β•‘                                          β•‘
  β•‘          https://claude.ai               β•‘
  β•‘                                          β•‘
  β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

Made with ❀️ on Ubuntu 24.04 Β β€’Β  Debugged with Claude (Anthropic)


About

Setup for seamless facial recognition authentication system on Linux, comparable in reliability and user experience to Windows Hello

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors