You have built-in camera (and IR emitters optionally) and want to use the Windows Hello™ style facial authentication for openSUSE based on howdy package.
Installing with YaST or Zypper requires logging in as root.
Add the RPM Repository
- Open YaST Control Center, then click Software Repositories.
- Click Add and Next.
- Enter name "dmafanasyev" and set the repository URL according to your version of openSUSE (replace
[leap_version]to 15.0, 15.1, 15.2 & etc.).
According to your version of openSUSE run in terminal:
# sudo zypper addrepo --refresh http://download.opensuse.org/repositories/home:/dmafanasyev/openSUSE_Leap_[leap_version]/ dmafanasyev
# sudo zypper addrepo --refresh http://download.opensuse.org/repositories/home:/dmafanasyev/openSUSE_Tumbleweed/ dmafanasyev
pam-pythonpackage, it is currently not in the official Tumbleweed repository (July 6, 2021). The workaround is to manually download and install the
pam-pythonpackage from the Leap 15.2 repository. Alternately, you can install
pam-pythonfrom a third-party repository. If you do so, you may get a warning when installing howdy that dependencies were not met. If so, you can probably safely ignore them.
- Go to the YaST Control Center and click Software Management.
- View > Repositories > dmafanasyev
- Choose the howdy package
- Press Accept
Run in terminal
# sudo zypper in howdy
Log in as the root user and open the file
/usr/lib64/security/howdy/config.ini using your favorite text editor (e.g. mcedit, nano or vi). For example for mcedit:
# sudo mcedit /usr/lib64/security/howdy/config.ini
Set the parameter
device_path = <the path to the device to capture frames from>
For the simplest case this is path to camera (for your Laptop the index 0 may be different):
device_path = /dev/video0
But it is better to use IR emmiters because it will be work correct in the dark place also. Try different index in the path to find apropriate value. For example this is may be index 2:
device_path = /dev/video2
You can change another parameters according to the comments in config file. For example set:
detection_notice = true
to print that face detection is being attempted.
At the last step add face model using command:
# sudo howdy add
This is good idea to add about 3-5 models for increasing accuracy of face recognition.
Now you need to tell to the Pluggable Authentication Modules (PAM) system to use facial authentication. The directories
/usr/etc/pam.d/ contains the configuration files of authentication for different system services. The most interesting are:
/etc/pam.d/sddm- configuration of login into graphical user interface through SDDM (the login screen after system start up but before desktop environment launch)
/etc/pam.d/login- configuration of login into terminal mode
/usr/etc/pam.d/kde- configuration of screen unlock for KDE (or
/etc/pam.d/kscreenlockerfor Tumbleweed version older than January, 2020)
Log in as the root user, open the configuaration file for service under interest using your favorite text editor (e.g. mcedit, nano or vi), and insert on first line the following string:
auth sufficient pam_python.so /usr/lib64/security/howdy/pam.py
- In some cases howdy does not recognize your face. If this happen during screen unlock or login into terminal mode you could try it again. But in SDDM only one attempt works correct while next time nothing happens. As workaround you could enter "Ctrl + Alt + Backspace" to restart graphical interface and try again.
- Everytime after system update the modifications of authentication configuration files located at
/usr/etc/pam.dare reseted. Hence you need to configure the system services for using the Howdy everytime after packages update (see PAM section).