This is surprisingly easy...basically following Arch Wiki:
https://wiki.archlinux.org/index.php/Howdy
After some investigation, here is step by step and preferences
https://github.com/boltgolt/howdy
https://aur.archlinux.org/packages/howdy/
yay -S --editmenu howdy
yay is an AUR helper
on 2019/10/30, I need to edit PKGBUILD
, removing --yes USE_AVX_INSTRUCTIONS
to get it compiled
mpv /dev/video2
# see if this device is IR camera
# it might be /dev/video0, /dev/video1, /dev/video{N}...
mpv is a video playback application
sudo vim /lib/security/howdy/config.ini
[core]
# Print that face detection is being attempted
detection_notice = true
# ...
[video]
# The certainty of the detected face belonging to the user of the account
# On a scale from 1 to 10, values above 5 are not recommended
certainty = 4.5
# ...
# The path of the device to capture frames from
# Should be set automatically by an installer if your distro has one
device_path = /dev/video2
# ...
# Because of flashing IR emitters, some frames can be completely unlit
# Skip the frame if the lowest 1/8 of the histogram is above this percentage
# of the total
# The lower this setting is, the more dark frames are ignored
dark_threshold = 100
where device_path = /dev/video{N}
is the IR camera device we found using mpv
above
sudo howdy add # follow its instructions
explore by
sudo howdy --help
, you will learn to list, remove faces
sudo vim /etc/pam.d/kde # for KDE lock screen
sudo vim /etc/pam.d/sudo # for sudo, obviously
add this line to kde
and sudo
files before system-auth
line:
auth sufficient pam_python.so /lib/security/howdy/pam.py
# original system-auth setting
auth include system-auth
detection_notice = true
above will make lock screen showingAttempting face detection
dismiss_lockscreen =
above will prevent IR camera from keeping scanning after unlock (kind of loop?)
And run this to allow using howdy
:
sudo chmod -R 755 /lib/security/howdy
Reboot to ensure PAM setting is taking place
https://wiki.archlinux.org/index.php/Howdy#GStreamer_warnings_in_shell
vim ~/.xprofile
add this line:
export OPENCV_LOG_LEVEL=ERROR
Then reboot or re-login
Just sudo ...
, howdy
will start
Leave password empty and press enter, howdy
should start
SDDM is display manager that authenticates only when laptop just boots up and login, while lock screen asks for authentication much more often
add auth sufficient pam_python.so /lib/security/howdy/pam.py
to /etc/pam.d/sddm
will make it to authenticate using howdy
, leave password empty and press enter
But this will result some drawbacks:
- when failed, SDDM's password input box seems to be freezed..
- will be unable to unlock KDE Wallet automatically on login and ask password to unlock KDE Wallet for Wifi credentials...Arch Wiki Link
actually, i dont know 😅 i want this behavior as well