Documentation
¶
Overview ¶
Package logind is systemd-logind on the system bus as lys-shell uses it: the user's session resolved without the environment, and logging out of it.
Index ¶
Constants ¶
const ( Service = "org.freedesktop.login1" ManagerPath = dbus.ObjectPath("/org/freedesktop/login1") ManagerIf = "org.freedesktop.login1.Manager" SessionIf = "org.freedesktop.login1.Session" )
The logind service, its manager object, and its interfaces.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the caller's logind session on the system bus.
func NewClient ¶
NewClient resolves the user's session object once (Session); every call and signal match uses its real path.
func SystemClient ¶
SystemClient connects to logind on the system bus, logging (not failing) when it is unavailable, as what without it is optional; what names the user of the client in the log line.
func (*Client) Listen ¶
Listen delivers the session's Lock and Unlock signals until ctx ends or the bus drops. The callbacks run on the listener goroutine.
func (*Client) LockedHint ¶
LockedHint reads the session's LockedHint property.
func (*Client) Path ¶
func (l *Client) Path() dbus.ObjectPath
Path is the resolved session object path.
func (*Client) SetLockedHint ¶
SetLockedHint tells logind whether the session is locked.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package logindtest is a fake systemd-logind on a private bus, seen from a caller outside any login session: a shell the systemd user manager started.
|
Package logindtest is a fake systemd-logind on a private bus, seen from a caller outside any login session: a shell the systemd user manager started. |