modular session management daemon
Something went wrong. Try again.
Configuration #
sessiond reads TOML configuration from /etc/sessiond.toml by default.
Use sessiond --config <path> to load a different file.
Example #
[management]
user = "root"
group = "root"
[users.alice]
linger = true
runtime-dir = "/run/user/{uid}"
[users.alice.env]
DBUS_SESSION_BUS_ADDRESS = "unix:path={runtime-dir}/bus"
[power]
reboot = ["/run/current-system/sw/bin/reboot"]
poweroff = ["/run/current-system/sw/bin/poweroff"]
suspend = ["/run/current-system/sw/bin/zzz", "-z"]
hibernate = ["/run/current-system/sw/bin/zzz", "-Z"]
Top-level Fields #
management: access rules for session management operations. Defaults toroot:root.users: per-user session defaults, keyed by user name.power: commands used bysessionctl reboot,sessionctl poweroff,sessionctl suspend, andsessionctl hibernate.
Unknown fields are rejected.
Management Access #
management.user and management.group grant privileged session management
access. Management access can modify users and can run power commands
even when other users have active sessions.
Both fields default to root.
Users #
User entries are keyed by login name:
[users.alice]
linger = true
runtime-dir = "/run/user/{uid}"
[users.alice.env]
DBUS_SESSION_BUS_ADDRESS = "unix:path={runtime-dir}/bus"
Supported fields:
linger: create the user state and runtime directory whensessiondstarts, before the user has an active session. Defaults tofalse.runtime-dir: runtime directory template. Defaults to/run/user/{uid}.env: extra environment variables sent to newly created sessions.
Values in runtime-dir and env may use these placeholders:
{uid}: numeric user ID.{runtime-dir}: the resolved runtime directory. This placeholder is only expanded inenvvalues.
Power Commands #
Power command fields are arrays where the first element is the program and the remaining elements are arguments:
[power]
suspend = ["/run/current-system/sw/bin/loginctl", "suspend"]