From 0f6827bdd11a16f09b0bb7e00bd803b735d6c458 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 29 Nov 2023 12:19:53 +0100 Subject: [PATCH] man: document the expanded catalogue of session classes --- man/pam_systemd.xml | 57 ++++++++++++++++++++++++++++++++---- man/sd_session_is_active.xml | 15 +++++----- 2 files changed, 59 insertions(+), 13 deletions(-) diff --git a/man/pam_systemd.xml b/man/pam_systemd.xml index c9a3ccbb5f2..2c3bbec5d81 100644 --- a/man/pam_systemd.xml +++ b/man/pam_systemd.xml @@ -90,11 +90,58 @@ class= - Takes a string argument which sets the session class. The XDG_SESSION_CLASS - environment variable (see below) takes precedence. One of user, greeter, - lock-screen or background. See - sd_session_get_class3 for - details about the session class. + Takes a string argument which sets the session class. The + XDG_SESSION_CLASS environment variable (see below) takes precedence. See + sd_session_get_class3 + for a way to query the class of a session. The following session classes are defined: + + + Session Classes + + + + + + Name + Explanation + + + + + user + A regular interactive user session. This is the default class for sessions for which a TTY or X display is known at session registration time. + + + user-early + Similar to user but sessions of this class are not ordered after systemd-user-sessions.service, i.e. may be started before regular sessions are allowed to be established. This session class is the default for sessions of the root user that would otherwise qualify for the user class, see above. (Added in v256.) + + + greeter + Similar to user but for sessions that are spawned by a display manager ephemerally and which prompt the user for login credentials. + + + lock-screen + Similar to user but for sessions that are spawned by a display manager ephemerally and which show a lock screen that can be used to unlock locked user accounts or sessions. + + + background + Used for background sessions, such as those invoked by cron and similar tools. This is the default class for sessions for which no TTY or X display is known at session registration time. + + + background-light + Similar to background, but sessions of this class will not pull in the user@.service of the user, and thus possibly have no services of the user running. (Added in v256.) + + + manager + The user@.service service of the user is registered under this session class. (Added in v256.) + + + manager-early + Similar to manager, but for the root user. Compare with the user vs. user-early situation. (Added in v256.) + + + +
diff --git a/man/sd_session_is_active.xml b/man/sd_session_is_active.xml index e69ef59fd0e..747fab4c68f 100644 --- a/man/sd_session_is_active.xml +++ b/man/sd_session_is_active.xml @@ -214,14 +214,13 @@ free3 call after use. - sd_session_get_class() may be used to - determine the class of the session identified by the specified - session identifier. The returned string is one of - user, greeter, - lock-screen, or background - and needs to be freed with the libc - free3 - call after use. + sd_session_get_class() may be used to determine the class of the session + identified by the specified session identifier. The returned string is one of user, + user-early, greeter, lock-screen, + background, background-light, manager or + manager-early and needs to be freed with the libc free3 call after + use. sd_session_get_desktop() may be used to determine the brand of the desktop running on the session -- 2.39.2