I use Arch linux with i3 and xfce4 desktop environment. I have configured tty1 to open i3-gaps and tty2 to open xfce4. Is there a way to display a custom message on each tty saying that the current tty will open i3 window manager etc. I know about the /etc/issue file to show a message, but i would like to have a separate message for each tty before login. Is this possible??
2 Answers
If you want to display the contents of /etc/issue2 when opening tty2, run systemctl edit getty@tty2, and paste the following contents:
[Service]
ExecStart=
ExecStart=-/sbin/agetty --issue-file /etc/issue2 -o '-p -- \\u' --noclear %I $TERM
This modifies [email protected], but only for tty2. See systemctl cat getty@ for the un-modified service file.
With this drop-in snippet, the first ExecStart= line means "discard any ExecStart line that was present in the original service file", and the second ExecStart= line is the one I found in systemctl cat getty@, but I've added --issue-file /etc/issue2 so tty2 will use a different issue file than the other ttys.
You can change the banner displayed after the login changing the content of the file /etc/motd.
-
Sorry but i need to show a message before login. Is there a way to edit system files? The
/etc/issuefile lets me show a message but its the same for each tty . I would like a custom message for each ttyAlan Dsilva– Alan Dsilva2020-01-06 13:38:42 +00:00Commented Jan 6, 2020 at 13:38