A better fingerprint library than libfprint
libfprint
does not support Chromebook fingerprint readerslibfprint
seems to not support fingerprint readers with their own built-in matchinglibfprint
is written in C, not Rustlibfprint
is hard to use
- Support enrolling fingerprints through a GUI and CLI
- Support authenticating with fingerprints with PAM
- Be easy to develop new drivers, even if you just have 1 test device and it's the same device that you're using to code
- Support Chromebook fingerprint sensors
- Be modular and easy to use in non-Linux environments (such as RedoxOS)
- Be easy to set up a development environment to build and edit the code
- Provide high quality auto-complete in code editors
- Be as close to 100% Rust as possible with minimal non-Rust dependencies
Currently, rust-fp
supports Chromebook fingerprint readers. Other people can add drivers for their own fp sensors.
Desktop Environment | Status | Comments |
---|---|---|
KDE Plasma | Working | Works by replacing libfprint PAM module with rust-fp PAM module |
GNOME | Not working | Just replacing libfprint PAM module with rust-fp PAM module doesn't work. See #3 |
COSMIC | Planned | Since COSMIC is written in Rust 🦀, it shouldn't be too hard to add nice support for rust-fp unlock. Maybe even skip PAM entirely and directly add rust-fp integration to COSMIC. Once COSMIC is officially released and I switch to COSMIC, I'll work on this. |
If you get this working with another DE, create a PR adding it to the table.
In your flake.nix
, add the following input:
rust-fp.url = "github:ChocolateLoverRaj/rust-fp";
Then destructure the input:
{ self, nixpkgs, rust-fp, ... }@inputs:
Then use the default module:
rust-fp.nixosModules.default
Example of using rust-fp
on Jinlon
git clone https://github.com/ChocolateLoverRaj/rust-fp
Install Rust 🦀
Even if you're not on NixOS, you can probably install Nix
on any distro and just get everything you need with nix develop
.
Or you can find the packages that your distribution provides and install them with your other package manager. You probably need pam
, and maybe clang
.
Run
cargo b --release
That should build everything. If you are testing changes to the code, then just run cargo b
to build in debug mode.
sudo cp dbus-interface/org.rust_fp.RustFp.conf /usr/share/dbus-1/system.d
sudo cp target/release/rust-fp-dbus-interface /usr/local/bin
Create a file /etc/systemd/system/rust-fp-dbus-interface.service
:
[Unit]
Description=Gives normal user access to enrolling and matching fingerprints
[Service]
ExecStart=/usr/local/bin/rust-fp-dbus-interface
Type=exec
[Install]
WantedBy=multi-user.target
You can start it with
sudo systemctl enable --now rust-fp-dbus-interface
Copy the PAM module to the location where PAM modules belong
sudo cp target/release/librust_fp_pam_module.so /lib64/security
Depending on the distro, the folder might be /lib
or /lib64
. On Fedora it's /lib64
.
Create / modify the file /etc/pam.d/kde-fingerprint
:
auth sufficient librust_fp_pam_module.so
account sufficient librust_fp_pam_module.so
sudo cp target/release/rust-fp /usr/local/bin
All you really need to do is enroll some fingerprints with the rust-fp
CLI. Depending on your Chromebook, you will a maximum number of templates that can be loaded onto the fingerprint sensor at a time. It's probably 5. Just typing rust-fp
will show the help page. Run rust-fp enroll
to enroll your fingerprints. Then lock the screen and you should be able to unlock with either your password or an enrolled fingerprint.
- See the list of known issues.
- Try restart the systemd service
- Try clearing stored templates with
rust-fp clear
and then enrolling new ones.