Module smithay::backend::session::logind [−][src]
Expand description
Implementation of the Session
trait through the logind dbus interface.
This requires systemd and dbus to be available and started on the system.
How to use it
Initialization
To initialize a session just call LogindSession::new
.
A new session will be opened, if the call is successful and will be closed once the
LogindSessionNotifier
is dropped.
Usage of the session
The session may be used to open devices manually through the Session
interface
or be passed to other objects that need it to open devices themselves.
The LogindSession
is clonable
and may be passed to multiple devices easily.
Examples for those are e.g. the LibinputInputBackend
(its context might be initialized through a Session
via the
LibinputSessionInterface
).
Usage of the session notifier
The notifier might be used to pause device access, when the session gets paused (e.g. by
switching the tty via LogindSession::change_vt
)
and to automatically enable it again, when the session becomes active again.
It is crucial to avoid errors during that state. Examples for object that might be registered
for notifications are the Libinput
context or the DrmDevice
.
The LogindSessionNotifier
is to be inserted into
a calloop event source to have its events processed.
Structs
Session
via the logind dbus interface
Notifier for the logind dbus interface
Enums
Errors related to logind sessions