Chapter 2. logind
logind(or more specifically
systemd-logind) is a system service that manages user logins. This service is responsible for the following:
- keeping track of users and sessions, their processes and their idle states,
- creating control groups for user processes,
- providing PolicyKit-based access for users to 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, and device access management for users,
- automatic spawning of text logins (gettys) on virtual terminal (console) activation and user runtime directory management.
logindservice is deeply integrated with
systemd, the new initialization system in Red Hat Enterprise Linux 7, and replaces the
upstartinitialization system from Red Hat Enterprise Linux 6. With this change comes a number of new features and functions. The following is a summary of those most significant:
ConsoleKitframework is deprecated in Red Hat Enterprise Linux 7. Equivalent functionality is now provided by
logindare services for tracking the currently running user sessions.
ConsoleKithad the ability to run arbitrary shell scripts any time the active session on the system changed (using virtual terminal switching). This functionality is no longer provided.
- the /var/log/ConsoleKit/history file
ConsoleKitwas sending log files to
/var/log/ConsoleKit/history, which the present
loginddoes not support. The file has been replaced by the traditional
utmpfiles which now keep track of all logins and logouts on the system.
/var/log/ConsoleKit/historyprovided similar information as the
wtmpfile, though in a different format. Given the overlap in functionality,
logindonly adopted the
- seat.d scripts
ConsoleKitis no longer in use,
seat.dscripts no longer complement the
ConsoleKitframework, and have been replaced by
- the ck-list-sessions command
ck-list-sessionscommand, which returned extended information about recent users, not only regular users but also GUI access with
GDM. The comparable result can now be reached by running the
- multi-seat support
GDMprovide the multi-seat feature with which the user can attach another monitor, mouse, or keyboard to their machine. Doing so, an additional login screen appears and the user can log in as if they were using another machine.To list seats that are available on the system, run the following command:
loginctl list-seatsTo show the status of a specific seat on the system, run the following command:
loginctl seat-status seatwhere seat is the name of the seat, for example
seat0.To assign specific hardware to a particular seat, run the following command:
loginctl attach seat devicewhere seat is the name of the seat, for example
seat1, and device is the device name specified with the
/sysdevice path, for example
/sys/devices/pci0000:00/0000:00:02.0/drm/card0.To change the assignment, assign the hardware to a different seat, or use the
Getting More Information
systemd-logind.service(8) – The man page for
logindprovides more information on the
logindusage and features. It also covers the APIs
systemd-logindprovides (logind D-Bus API documentation).
logind.conf(5) – The man page for
logind.confdiscusses the login manager configuration file.
loginctl(1) – The man page for the
systemdlogin manager includes more information on the multi-seat feature.