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.
const CallTimeout = 5 * time.Second
CallTimeout is how long one call to logind may take: callers on a path that must not hang give their calls this deadline.
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) under ctx; every call and signal match uses its real path.
func SystemClient ¶
SystemClient connects to logind on the system bus under ctx, logging (not failing) when it is unavailable, as what without it is optional; what names the user of the client in the log line. The connection outlives ctx once made.
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, waiting no longer than ctx.
func (*Client) Path ¶
func (l *Client) Path() dbus.ObjectPath
Path is the resolved session object path.
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. |