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"
This commit is contained in:
parent
4acdc099f4
commit
f3e9de2425
1 changed files with 13 additions and 3 deletions
|
|
@ -898,9 +898,10 @@ impl App {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
None => {
|
None => {
|
||||||
column = column.push(
|
// `value_opt == None` is used for non-interactive auth messages
|
||||||
widget::button::custom("Confirm").on_press(Message::Auth(None)),
|
// (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<Message> {
|
fn update(&mut self, message: Self::Message) -> Task<Message> {
|
||||||
match message {
|
match message {
|
||||||
Message::Common(common_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);
|
return self.common.update(common_message);
|
||||||
}
|
}
|
||||||
Message::OutputEvent(output_event, output) => {
|
Message::OutputEvent(output_event, output) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue