Documentation
¶
Overview ¶
Package lockclient is the shell's side of locking: it owns the triggers (logind's Lock signal, `lys-shell lock`, lock-on-start, and a lock found held at startup) and answers each by starting `lys-login lock`, the login screen in its lock mode, as a process of its own. The shell links no lock screen code; the lock outlives a shell restart in a scope of its own, and a lock process that dies with the session still locked is started again.
Index ¶
Constants ¶
const ( LockedLine = "locked" // ExitHeld: another lys-login already holds the session locked. ExitHeld = 3 // ExitRefused: the lock never took (disabled, or the compositor // refused it). ExitRefused = 4 )
The `lys-login lock` contract: the line it prints on stdout once the compositor confirms the lock, and its exit codes beyond 0 (unlocked) and 1 (failed).
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client starts and follows the lock process.
func Start ¶
func Start(system *dbus.Conn, current func() *config.Config, onLocked, onUnlocked func()) (*Client, func())
Start runs the triggers for a shell: logind's Lock signal, a lock found held at startup (a lock client that died with the session locked), and lock-on-start once per login session, over the system bus connection system, which stays the caller's (nil leaves logind's triggers off). It returns at once with the client, for `lys-shell lock`, and the stop that ends the logind listener.