Amend systemd template unit usage instructions

Tested on Arch: instead of enabling ly@ttyN, symlinking autovt@ttyN.service to ly@ttyN.service for any N auto-starts ly on ttyN.
No other systemd configuration is necessary.
This commit is contained in:
qbe 2025-12-15 02:18:11 +01:00
commit c041be620f

View file

@ -121,9 +121,15 @@ that Ly will run on, otherwise bad things will happen. For example, to disable `
# systemctl disable getty@tty2.service
```
You can change the TTY Ly will run on by editing the corresponding
service file for your platform, or on systemd, by enabling the service on
different TTYs, as is done above.
On some platforms, getty instances are not enabled for each tty, rather systemd-logind dynamically starts `autovt@.service` when the switch to a new tty occurs. To autostart ly on switch to `tty2`, do not enable any `ly` unit directly, instead symlink `autovt@tty2.service` to `ly@tty2.service` within `/usr/lib/systemd/system/` (analogous for every other tty you want to enable ly on).
The target of the symlink, `ly@tty2.service`, does not actually exist, but systemd nevertheless recognizes that the instanciation of `autovt@.service` with `%I` equal to `tty2` now points to an instanciation of `ly@.service` with `%I` set to `tty2`.
Compare to `man 5 logind.conf`, especially regarding the `NAutoVTs=` and `ReserveVT=` parameters.
On non-systemd systems, you can change the TTY Ly will run on by editing the corresponding
service file for your platform.
### OpenRC