.TL Automatically Launch Applications on tty .AU tropf .AB Rundown on how to start an interactive console application automatically on boot using systemd. Useful for unattended Raspberry Pis. .AE .DA . .NH 1 General Idea .PP By default the service .CW "getty" is launched. That will do the magic that opens a login prompt on any tty. . .PP To automatically launch an application instead of that login prompt, one has to .I "simply" overwrite that behaviour. .NH 1 Create A New Service .PP Create a file named .CW "/etc/systemd/system/mytui@.service" "." . .CB [Unit] Description=Custom user interface on %I Documentation=https://unix.stackexchange.com/a/318336/5132 Conflicts=getty@%I.service Before=getty.target [Service] ExecStart=/usr/local/bin/mytui StandardInput=tty StandardOutput=tty Restart=always RestartSec=1 UtmpIdentifier=%I TTYPath=/dev/%I TTYReset=yes TTYVHangup=yes TTYVTDisallocate=yes SendSIGHUP=yes [Install] WantedBy=multi-user.target .CE . .PP Obviuosly adjust the filename and the .CW "ExecStart" parameter. . .NH 1 Start Your New Service On Boot .NH 2 Enablind The Service .PP Simply enable your new service: .CB systemctl enable mytui@tty1.service .CE . .PP .CW "tty1" works for debian. It also has to be .CW "tty1" as this is the one that will be selected by default. . .PP Launching on .CW "tty2" would require switching to that tty after boot, and that would be the opposite of "unattended". . .NH 2 Preventing The Default Behaviour .PP Prevent systemd from starting the .CW "getty" .I "at the same time on the same tty" ":" .CB systemctl mask getty@tty1.service .CE