From f3e9de242547f6e099fb6e48cf884c53b5ebc90d Mon Sep 17 00:00:00 2001 From: Hojjat Date: Thu, 18 Dec 2025 17:59:55 -0700 Subject: [PATCH] fix: ACK so greetd doesn't wait forever on systems with fingerprint scanner Also show info messages from PAM mainly "Place your finger on the fingerprint reader" --- src/greeter.rs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/greeter.rs b/src/greeter.rs index 30ae39e..82b1a16 100644 --- a/src/greeter.rs +++ b/src/greeter.rs @@ -898,9 +898,10 @@ impl App { } } None => { - column = column.push( - widget::button::custom("Confirm").on_press(Message::Auth(None)), - ); + // `value_opt == None` is used for non-interactive auth messages + // (e.g. PAM_TEXT_INFO via greetd). This is where fingerprint + // prompts typically come through, so show the message to the user. + column = column.push(widget::text(prompt)); } } } @@ -1193,6 +1194,15 @@ impl cosmic::Application for App { fn update(&mut self, message: Self::Message) -> Task { match message { Message::Common(common_message) => { + // In greetd's IPC protocol, the greeter must acknowledge auth messages by + // sending PostAuthMessageResponse. For non-interactive "info" messages + // (fingerprint prompts typically come through here), the correct response + // is `None`. If we don't ACK, greetd will wait forever and the UI will + // appear "stuck" on the last info message. + if let common::Message::Prompt(_, _secret, None) = &common_message { + self.send_request(Request::PostAuthMessageResponse { response: None }); + } + return self.common.update(common_message); } Message::OutputEvent(output_event, output) => {