pub struct Greetd { /* private fields */ }Expand description
greetd, from cx.greetd(). A clone is cheap and shares it.
A greeter makes a session for a user with
create_session, answers each question in
state with respond, and once it is
Authenticated starts it with
start_session, then exits so greetd can.
Implementations§
Source§impl Greetd
impl Greetd
Sourcepub fn state(&self) -> ReadSignal<GreetState>
pub fn state(&self) -> ReadSignal<GreetState>
Where the session being made stands.
Sourcepub fn messages(&self) -> ReadSignal<Vec<GreetMessage>>
pub fn messages(&self) -> ReadSignal<Vec<GreetMessage>>
The informative and error messages greetd sent since the last
create_session, oldest first. They need no
answer: each is acknowledged as it comes.
Sourcepub fn create_session(&self, user: &str)
pub fn create_session(&self, user: &str)
Makes a session for user and starts authenticating them, ending
any session being made before.
Sourcepub fn respond(&self, answer: &str)
pub fn respond(&self, answer: &str)
Answers greetd’s question. Unless the state is
Asking, the answer is dropped and that is
logged. The answer is never logged, and its bytes are zeroed once
written.
Sourcepub fn start_session(&self, command: Vec<String>, env: Vec<String>)
pub fn start_session(&self, command: Vec<String>, env: Vec<String>)
Starts the authenticated session with command, such as
["sway"], and env lines such as XDG_SESSION_TYPE=wayland
added to what PAM sets. greetd joins command with spaces and runs
the line with sh(1), so an entry holding spaces or shell characters
needs quotes of its own, and one entry may be a whole shell line. It starts once the greeter exits. Unless the
state is Authenticated, nothing is
sent and that is logged.