No description
Find a file
chris-010 935891e36b fix(greeter): do not cancel the session on a non-fatal PAM error message
greetd delivers PAM_ERROR_MSG as an auth message of type Error, and ipc.rs
turned that into Message::Error, which cancels the greetd session. But such a
message describes the current attempt, not the end of the conversation:
pam_fprintd reports "Failed to match fingerprint" this way and then retries
until max-tries is reached.

The consequence at the login screen is that a single failed fingerprint press
ends the conversation. The greeter reconnects and immediately creates a new
session, whose PAM worker calls fprintd's Claim 14 ms later while the previous
worker still holds it, so the claim is denied and no fingerprint prompt ever
appears again. The previous worker only exits when it next tries to talk to the
greeter, which can be arbitrarily far in the future, so delaying the new session
does not help either.

Per the greetd protocol every auth message has to be acknowledged with
PostAuthMessageResponse, and for a non-interactive one the response is None,
which is what the Info arm already does. Route the Error message to its own
Message::AuthError that shows the text and acknowledges it. Message::Error and
the Response::Error path stay as they are, so a failed authentication still
cancels the session.

Drafted with AI assistance (Claude Code); the change and the measurements behind
it were reviewed and tested by me on real hardware.

Signed-off-by: chris-010 <10660568+chris-010@users.noreply.github.com>
2026-08-25 02:33:15 +02:00
.github Add pull request template 2026-02-13 12:35:27 -07:00
.zed chore: add rustfmt config 2026-04-29 00:20:17 +02:00
cosmic-greeter-config chore: add rustfmt config 2026-04-29 00:20:17 +02:00
daemon chore: add rustfmt config 2026-04-29 00:20:17 +02:00
dbus Add daemon to proxy user backgrounds 2024-02-06 15:03:07 -07:00
debian feat: enable JPEG-XL and AVIF image support 2026-08-18 18:58:39 +02:00
examples chore: add rustfmt config 2026-04-29 00:20:17 +02:00
i18n i18n: translation updates from weblate 2026-08-22 19:35:58 +02:00
res Update fallback background 2024-08-02 09:42:34 -06:00
src fix(greeter): do not cancel the session on a non-fatal PAM error message 2026-08-25 02:33:15 +02:00
.gitattributes Update fallback background 2024-08-02 09:42:34 -06:00
.gitignore Add daemon to proxy user backgrounds 2024-02-06 15:03:07 -07:00
build.rs Fix vergen generation 2025-03-25 15:13:50 -06:00
Cargo.lock feat: enable JPEG-XL and AVIF image support 2026-08-18 18:58:39 +02:00
Cargo.toml feat: enable JPEG-XL and AVIF image support 2026-08-18 18:58:39 +02:00
cosmic-greeter-start.sh chore: cleanup logs 2025-09-12 23:47:22 +02:00
cosmic-greeter.toml feat: introduce cosmic-greeter-start for state cleanup 2025-08-12 10:59:29 -05:00
i18n.toml Add localization 2024-05-07 10:07:48 -06:00
justfile fix(justfile): bash syntax error if SOURCE_GIT_HASH was set 2026-06-24 17:03:08 +02:00
LICENSE Initial commit 2023-09-29 09:23:23 -06:00
README.md docs: Add note about vendored build commands 2025-11-12 19:03:55 -07:00
rust-toolchain.toml chore: update dependencies 2026-04-29 00:20:17 +02:00
rustfmt.toml chore: add rustfmt config 2026-04-29 00:20:17 +02:00

cosmic-greeter

libcosmic greeter for greetd, which can be run inside cosmic-comp

Development

This project uses just as a command runner.

Available Commands

Building

  • just build-debug - Compile with debug profile
  • just build-release - Compile with release profile (default)
  • just build-vendored - Compile release profile with vendored dependencies
    • Requires vendoring first, which can be done with just vendor

Testing & Development

  • just mock - Run greeter in a windowed compositor for quick testing (builds and runs the mock server example)
  • just run - Run with debug logs (RUST_LOG=debug and RUST_BACKTRACE=full)

Code Quality

  • just check - Run clippy linter with pedantic warnings
  • just check-json - Run clippy with JSON output format

Installation

  • just install - Install all files (binary, daemon, D-Bus config, systemd files)
  • just install-debian - Install only Debian package required files
  • just uninstall - Remove all installed files

Cleanup

  • just clean - Run cargo clean
  • just clean-dist - Run cargo clean and remove vendored dependencies

Vendoring

  • just vendor - Vendor dependencies locally and create vendor.tar
  • just vendor-extract - Extract vendored dependencies from vendor.tar