0

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??

0

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 getty@.service, 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.

0

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/issue file lets me show a message but its the same for each tty . I would like a custom message for each tty – Alan Dsilva Jan 6 at 13:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.