diff --git a/i18n/cs/cosmic_greeter.ftl b/i18n/cs/cosmic_greeter.ftl index 0f16321..752b814 100644 --- a/i18n/cs/cosmic_greeter.ftl +++ b/i18n/cs/cosmic_greeter.ftl @@ -2,7 +2,7 @@ accessibility = Přístupnost .screen-reader = Čtečka obrazovky .magnifier = Lupa .high-contrast = Vysoký kontrast - .invert-colors = Převrátit barvy + .invert-colors = Inverze barev cancel = Zrušit caps-lock = Caps Lock je aktivní. enter-user = Zadat jméno ručně... diff --git a/i18n/da/cosmic_greeter.ftl b/i18n/da/cosmic_greeter.ftl index 877d130..71244ce 100644 --- a/i18n/da/cosmic_greeter.ftl +++ b/i18n/da/cosmic_greeter.ftl @@ -1,4 +1,4 @@ -cancel = Annuller +cancel = Afbryd restart = Genstart caps-lock = Skiftelås er aktiv. enter-user = Indtast navn manuelt... diff --git a/src/greeter.rs b/src/greeter.rs index 6431496..4a6063f 100644 --- a/src/greeter.rs +++ b/src/greeter.rs @@ -363,6 +363,9 @@ pub enum Message { Common(common::Message), OutputEvent(OutputEvent, WlOutput), Auth(Option), + /// Non-fatal error message from PAM (`PAM_ERROR_MSG`), reported by greetd as an auth + /// message of type `Error`. Unlike [`Message::Error`] the conversation stays alive. + AuthError(String), ConfigUpdateUser, DialogCancel, DialogConfirm, @@ -1493,6 +1496,13 @@ impl cosmic::Application for App { self.authenticating = true; self.send_request(Request::PostAuthMessageResponse { response }); } + Message::AuthError(error) => { + // The conversation continues, so acknowledge like any other + // non-interactive auth message rather than cancelling the session. + self.common.error_opt = Some(error); + self.authenticating = false; + self.send_request(Request::PostAuthMessageResponse { response: None }); + } Message::Login => { self.common.prompt_opt = None; self.common.error_opt = None; diff --git a/src/greeter/ipc.rs b/src/greeter/ipc.rs index d3f1e45..4e92afe 100644 --- a/src/greeter/ipc.rs +++ b/src/greeter/ipc.rs @@ -115,7 +115,8 @@ pub fn subscription() -> Subscription { .await; } greetd_ipc::AuthMessageType::Error => { - _ = sender.send(Message::Error(auth_message)).await; + // PAM_ERROR_MSG: a failed attempt, not a dead session. + _ = sender.send(Message::AuthError(auth_message)).await; } }, greetd_ipc::Response::Error {