session-migration
Migrate a process session to another machine
SYNOPSIS
session-migration is typically invoked internally by systemd services (e.g., systemd-logind.service) or login managers at user login/logout, rather than directly by users from the command line. It does not possess a standard user-facing command-line synopsis with explicit options or arguments.
PARAMETERS
N/A
As an internal system component, session-migration typically does not accept direct user-defined command-line parameters. Its behavior is dictated by system configuration and the context in which systemd-logind operates.
DESCRIPTION
The session-migration component, often implemented as a script or service within the systemd ecosystem, is crucial for managing and migrating user sessions on Linux systems. Its primary role is to ensure a smooth transition and proper registration of user sessions with systemd-logind, especially during system upgrades or when moving from older session management systems (like ConsoleKit) to logind.
It handles the complexities of session lifecycle, associating a user's login with a specific control group (cgroup) and ensuring correct permissions for devices, power management, and other system resources. This is vital for modern desktop environments to function correctly, allowing features like suspending the system, managing display settings, and accessing hardware devices securely. Unlike many standard Linux commands, session-migration is typically invoked internally by systemd services (e.g., systemd-logind.service) or by display managers (e.g., GDM, LightDM) at login, rather than being a command-line utility directly executed by end-users. Its operation is largely transparent to the user, acting as a behind-the-scenes orchestrator for session integrity.
CAVEATS
session-migration is an internal system component and should not be manually executed by users. Improper invocation could lead to broken user sessions, incorrect cgroup assignments, or issues with device access and power management. Its exact implementation details may vary slightly across different Linux distributions and systemd versions.
ROLE IN USER SESSIONS
This utility is vital for the correct functioning of modern desktop environments by ensuring that each user session is properly registered with systemd-logind. This registration enables critical functionalities such as:
• Device Permissions: Granting the logged-in user proper access to devices (e.g., sound cards, graphics cards).
• Power Management: Allowing the user to initiate actions like suspend, hibernate, or shutdown.
• Session Tracking: Keeping track of active user sessions, which is crucial for multi-user systems and for enforcing resource limits via cgroups.
HISTORY
The concept behind session-migration evolved with the adoption of systemd and its logind component as the primary session manager in many Linux distributions. Prior to logind, session management was often handled by systems like ConsoleKit. As distributions transitioned to systemd, a mechanism was needed to ensure backward compatibility and a smooth migration path for existing sessions, as well as to properly integrate new sessions with logind's cgroup-based session tracking, device management, and power management capabilities. This component addresses that need, ensuring modern desktop environments and services correctly interact with the system's session infrastructure.
SEE ALSO
systemd(1), logind(8), systemd-logind.service(8), systemctl(1), X(7)