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

2 Answers 2

2

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.

0

You can change the banner displayed after the login changing the content of the file /etc/motd.

1
  • 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 Commented Jan 6, 2020 at 13:38

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.