Skip to content

Latest commit

 

History

History
20 lines (13 loc) · 2.17 KB

systemd.rst

File metadata and controls

20 lines (13 loc) · 2.17 KB

Systemd Setup

On a machine that employs systemd-logind to manage user login sessions, some setup is required for each user that will be running :doc:`termy-server <server>`. This setup ensures that the user's :term:`persistent server <persistent user server>` is socket activated via the systemd user manager, and that it keeps running even when the user logs out.

Note

This setup is specific to machines on which a systemd user manager is run for each logged in user. This setup is not required for machines that only use systemd as the system manager, PID 1.

This setup consists of the following tasks:

Complicating the situation is the fact that these commands, particularly :manpage:`loginctl(1)`, must be run from within a fully formed systemd login session. Shells launched via :manpage:`sudo(8)` or :manpage:`su(1)` do not always meet this requirement, nor do terminals on an existing persistent user server (a terminal on a :term:`transient local server`, however, is OK). The presence of the :envvar:`XDG_SESSION_ID` environment variable indicates that a session exists. When in doubt, use :command:`ssh` or :command:`machinectl login` to log in as the user and perform the setup from there, since this always results in a clean session.

:program:`termy-server` ships with an interactive setup script, :doc:`termy-setup <man/setup>`, which can be used to run the above commands. This script can be run from the :doc:`Setup Tasks dialog <dialogs/setup-tasks>` which is displayed when :program:`qtermy` is launched for the first time.