SYSTEMD-LOGIND.SERVICE(8)
๐ SYSTEMD-LOGIND.SERVICE(8) ๐
okay bestie, sit down, hydrate, and let me tell you about systemd-logind.service / systemd-logind โ the Login manager ๐
(yes that's the NAME section, we're doing this properly)
โจ SYNOPSIS โจ
systemd-logind.service
/usr/lib/systemd/systemd-logind
๐ธ DESCRIPTION ๐ธ
so. systemd-logind is a system service that manages user logins. it's the main character of logins, no cap. here's everything it's responsible for, and I mean everything, we're not skipping a single one:
- keeping track of users and sessions, their processes, and their idle state. and how does it do that? it allocates a systemd slice unit for each user below
user.slice, plus a scope unit below that for each concurrent session of a user. ALSO, a per-user service manager gets started as a system service instance ofuser@.servicefor each logged-in user. yes, that's a lot. she's organized. ๐ฅ - generating and managing session IDs. if auditing is available and an audit session ID is already set for a session, then that ID gets reused as the session ID. otherwise, an independent session counter is used. either way, you're getting an ID, bestie. ๐
- providing polkit[1]-based access for users for operations such as system shutdown or sleep ๐
- implementing a shutdown/sleep inhibition logic for applications ๐ซ
- handling of power/sleep hardware keys โจ๏ธ
- multi-seat management ๐ช
- session switch management ๐
- device access management for users ๐
- automatic spawning of text logins (gettys) on virtual console activation and user runtime directory management ๐ฅ๏ธ
- scheduled shutdown โฐ
- sending
"wall"messages ๐ข
user sessions are registered with logind via the pam_systemd(8) PAM module. that's the plug-in that connects your login to the vibe.
see logind.conf(5) for information about the configuration of this service. ๐
see sd-login(3) for information about the basic concepts of logind such as users, sessions and seats. (iykyk)
see org.freedesktop.login1(5) and org.freedesktop.LogControl1(5) for information about the D-Bus APIs systemd-logind provides. ๐ฆ
in addition to the D-Bus interface, systemd-logind also provides a Varlink interface io.systemd.Shutdown for shutting down or rebooting the system. it supports PowerOff, Reboot, Halt, KExec, and SoftReboot methods. each method accepts an optional skipInhibitors boolean parameter to bypass active block inhibitors (matching the SD_LOGIND_SKIP_INHIBITORS flag of the D-Bus interface). and if you wanna peek at it, the interface can be queried with varlinkctl introspect /run/systemd/io.systemd.Login io.systemd.Shutdown. periodt. โจ
for more information see Inhibitor Locks[2]. ๐
if you are interested in writing a display manager that makes use of logind, please have look at Writing Display Managers[3]. if you are interested in writing a desktop environment that makes use of logind, please have look at Writing Desktop Environments[4]. go build something iconic, babe ๐
๐ SIGNAL ๐
SIGHUPโ reloads the service configuration file. that's it. that's the whole section. short queen. ๐
๐ SEE ALSO ๐
systemd(1), systemd-user-sessions.service(8), loginctl(1), logind.conf(5), pam_systemd(8), sd-login(3), org.freedesktop.login1(5)
๐ NOTES ๐
- polkit https://www.freedesktop.org/wiki/Software/polkit
- Inhibitor Locks https://systemd.io/INHIBITOR_LOCKS
- Writing Display Managers https://systemd.io/WRITING_DISPLAY_MANAGERS
- Writing Desktop Environments https://systemd.io/WRITING_DESKTOP_ENVIRONMENTS
and that's the whole page, bestie, we ate and left no crumbs ๐ this was systemd 262.1, dated SYSTEMD-LOGIND.SERVICE(8) โ log off and touch some grass, but like, through logind, obviously ๐โจ
๐ฆ where this page comes from
- arch rolling: systemd 262.1-1 ยท LGPL-2.1-or-later AND CC0-1.0 AND GPL-2.0-or-later AND MIT-0
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms