{"id":21722163,"url":"https://github.com/chocolateloverraj/rust-fp","last_synced_at":"2025-04-12T21:41:23.388Z","repository":{"id":230430430,"uuid":"772119091","full_name":"ChocolateLoverRaj/rust-fp","owner":"ChocolateLoverRaj","description":"Fingerprint library, dbus interface, CLI, and PAM module for unlocking Linux with fingerprint sensors. Currently for Chromebooks.","archived":false,"fork":false,"pushed_at":"2025-01-19T03:33:39.000Z","size":259,"stargazers_count":15,"open_issues_count":8,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T15:48:16.088Z","etag":null,"topics":["chromebook","cli","fingerprint","kde","nixos","pam","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ChocolateLoverRaj.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-14T15:14:23.000Z","updated_at":"2025-02-12T00:38:19.000Z","dependencies_parsed_at":"2024-03-29T17:48:57.678Z","dependency_job_id":"e3266dab-95c0-45b4-b279-76730b4d88c2","html_url":"https://github.com/ChocolateLoverRaj/rust-fp","commit_stats":null,"previous_names":["chocolateloverraj/cros-fp-pam"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChocolateLoverRaj%2Frust-fp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChocolateLoverRaj%2Frust-fp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChocolateLoverRaj%2Frust-fp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChocolateLoverRaj%2Frust-fp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ChocolateLoverRaj","download_url":"https://codeload.github.com/ChocolateLoverRaj/rust-fp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248637832,"owners_count":21137538,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chromebook","cli","fingerprint","kde","nixos","pam","rust"],"created_at":"2024-11-26T02:22:20.348Z","updated_at":"2025-04-12T21:41:23.359Z","avatar_url":"https://github.com/ChocolateLoverRaj.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `rust-fp`\nA better fingerprint library than `libfprint`\n\n## Why\n- `libfprint` does not support Chromebook fingerprint readers\n- `libfprint` seems to not support fingerprint readers with their own built-in matching\n- `libfprint` is written in C, not Rust\n- `libfprint` is hard to use\n\n## Goals\n- Support enrolling fingerprints through a GUI and CLI\n- Support authenticating with fingerprints with PAM\n- 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\n- Support Chromebook fingerprint sensors\n- Be modular and easy to use in non-Linux environments (such as RedoxOS)\n- Be easy to set up a development environment to build and edit the code\n- Provide high quality auto-complete in code editors\n- Be as close to 100% Rust as possible with minimal non-Rust dependencies\n\n## Status\n### Drivers\nCurrently, `rust-fp` supports Chromebook fingerprint readers. Other people can add drivers for their own fp sensors.\n\n### Integration with desktop environments\nDesktop Environment | Status      | Comments\n--------------------|-------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\nKDE Plasma          | Working     | Works by replacing libfprint PAM module with rust-fp PAM module\nGNOME               | Not working | Just replacing libfprint PAM module with rust-fp PAM module doesn't work. See https://github.com/ChocolateLoverRaj/rust-fp/issues/3\nCOSMIC              | 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.\n\nIf you get this working with another DE, create a PR adding it to the table.\n\n## Installation\n### NixOS\nIn your `flake.nix`, add the following input:\n```nix\nrust-fp.url = \"github:ChocolateLoverRaj/rust-fp\";\n```\nThen destructure the input:\n```nix\n{ self, nixpkgs, rust-fp, ... }@inputs:\n```\nThen use the default module:\n```nix\nrust-fp.nixosModules.default\n```\n[Example of using `rust-fp` on Jinlon](https://github.com/ChocolateLoverRaj/nixos-system-config/blob/main/flake.nix)\n\n### Manually, in normal mutable Linux distros\n#### Get the code\n```sh\ngit clone https://github.com/ChocolateLoverRaj/rust-fp\n```\n\n#### Install [Rust 🦀](https://www.rust-lang.org/)\n\n#### Install the build dependency package\n##### With Nix\nEven if you're not on NixOS, you can probably install [`Nix`](https://nixos.org/download/) on any distro and just get everything you need with `nix develop`.\n##### Without Nix\nOr you can find the packages that your distribution provides and install them with your other package manager. You probably need `pam`, and maybe `clang`.\n\n#### Build everything\nRun\n```sh\ncargo b --release\n```\nThat should build everything. If you are testing changes to the code, then just run `cargo b` to build in debug mode.\n\n#### Install D-Bus config\n```sh\nsudo cp dbus-interface/org.rust_fp.RustFp.conf /usr/share/dbus-1/system.d\n```\n\n#### Install `rust-fp-dbus-interface`\n```sh\nsudo cp target/release/rust-fp-dbus-interface /usr/local/bin\n```\n\n#### Create the systemd service\nCreate a file `/etc/systemd/system/rust-fp-dbus-interface.service`:\n```\n[Unit]\nDescription=Gives normal user access to enrolling and matching fingerprints\n\n[Service]\nExecStart=/usr/local/bin/rust-fp-dbus-interface\nType=exec\n\n[Install]\nWantedBy=multi-user.target\n```\nYou can start it with\n```bash\nsudo systemctl enable --now rust-fp-dbus-interface\n```\n\n#### Configure KDE fingerprint PAM\nCopy the PAM module to the location where PAM modules belong\n```bash\nsudo cp target/release/librust_fp_pam_module.so /lib64/security\n```\nDepending on the distro, the folder might be `/lib` or `/lib64`. On Fedora it's `/lib64`.\n\nCreate / modify the file `/etc/pam.d/kde-fingerprint`:\n```\nauth    sufficient    librust_fp_pam_module.so\naccount sufficient    librust_fp_pam_module.so\n```\n\n#### Install the CLI\n```bash\nsudo cp target/release/rust-fp /usr/local/bin\n```\n\n## Usage\nAll 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.\n\n## Troubleshooting\n- See [the list of known issues](https://github.com/ChocolateLoverRaj/rust-fp/labels/bug).\n- Try restart the systemd service\n- Try clearing stored templates with `rust-fp clear` and then enrolling new ones.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchocolateloverraj%2Frust-fp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchocolateloverraj%2Frust-fp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchocolateloverraj%2Frust-fp/lists"}