Loading

ArchLinux开启面部解锁功能

github:https://github.com/boltgolt/howdy

archwiki: https://wiki.archlinux.org/title/Howdy_(简体中文)

安装 Howdy

yay -S howdy

修改 Howdy 目录权限

sudo chmod -R 755 /lib/security/howdy

添加红外传感器

可以在诸如 cheesefswebcamAUR 或者 v4l-utils 的程序里找到并确定能连接到红外传感器的正确 /dev/videoX 文件,

以内置于 v4l-utils 软件包的工具为例:

$ v4l2-ctl --list-devices
Integrated_Webcam_HD: Integrate (usb-0000:00:14.0-11):
        /dev/video0
        /dev/video1

修改配置文件 sudo vim /lib/security/howdy/config.ini 也可以使用 sudo howdy config 修改

 修改以下内容
- device_path = none
+ device_path = /dev/video0

测试配置是否成功

sudo howdy test

添加人脸模型

sudo howdy add

查看添加的人脸模型

sudo howdy list

面部验证

为了能识别用户,必须对 Howdy 需要用到的 PAM 配置文件做一些小修改,任取其一加入:

建议放在 PAM 配置第一行

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

sudo

sudo vim /etc/pam.d/sudo

image-20220524134900307

测试

sudo visudo

SDDM

sudo vim /etc/pam.d/system-login
或
sudo vim  /etc/pam.d/sddm

polkit-1 KDE代理验证程序

sudo vim /etc/pam.d/polkit-1

取消拍照

Howdy 会在识别用户时拍照,然后保存到 /lib/security/howdy/snapshots

sudo vim /lib/security/howdy/config.ini

[snapshots]
capture_failed = false
capture_successful = false

常见问题

终端里有 GStreamer warnings

已经让 Howdy 正常工作,但是在终端里收到警告:

[ WARN:0@0.234] global /build/opencv/src/opencv-4.5.5/modules/videoio/src/cap_gstreamer.cpp (2401) handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module source reported: Could not read from resource.
[ WARN:0@0.234] global /build/opencv/src/opencv-4.5.5/modules/videoio/src/cap_gstreamer.cpp (1356) open OpenCV | GStreamer warning: unable to start pipeline
[ WARN:0@0.234] global /build/opencv/src/opencv-4.5.5/modules/videoio/src/cap_gstreamer.cpp (862) isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created
Identified face as lzscxb

添加 opencv log 日志等级环境变量 sudo vim /etc/profile

export OPENCV_LOG_LEVEL=ERROR
posted @ 2022-06-06 16:34  白日醒梦  阅读(592)  评论(0编辑  收藏  举报