rharish101 / ReGreet

Clean and customizable greeter for greetd
GNU General Public License v3.0
361 stars 17 forks source link

Fingerprint login support #76

Closed ludg1e closed 1 month ago

ludg1e commented 1 month ago

Hello! Is it possible to login using the fingerprint?

If yes, does it allow to login with the fingerprint without needing to press Enter on the password box?

Thank you

Eliasin commented 1 month ago

Fingerprint logins work but they are a little unergonomic on all greeters/desktop managers that I'm aware of. Generally fingerprint scanner integration leans a lot on setting up pam.d modules correctly. Since the design of pam.d can't really try multiple different login methods at once you'll usually end up with having to press enter to fail a password input before a fingerprint attempt can be made or vice-versa.

Here's an archwiki on the topic that should be helpful https://wiki.archlinux.org/title/fprint

I'm using NixOS but here's my pam auth stack for greetd (/etc/pam.d/greetd)

# Authentication management.
auth sufficient /nix/store/r8618xyrxiaff9bs8z8yvxhskgmbv5x5-fprintd-1.94.2/lib/security/pam_fprintd.so # fprintd (order 11300)
auth optional pam_unix.so likeauth nullok # unix-early (order 11500)
auth optional /nix/store/r75bsfmlfvwmwsfc295h5rajnwidvgy9-gnome-keyring-46.1/lib/security/pam_gnome_keyring.so # gnome_keyring (order 12100)
auth sufficient pam_unix.so likeauth nullok try_first_pass # unix (order 12800)
auth required pam_deny.so # deny (order 13600)

Notice how fprintd is above pam_unix.so, this means my regreet will try a fingerprint then if that fails, ask for my password. You're free to switch the two and that will make it so you can just press enter in the empty password box to proceed to fingerprint (and archwiki reccomends it this way)

ludg1e commented 1 month ago

Many thanks!