Skip to main content
Topic: Disable additional TTYs (3 to 6) (Read 889 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Disable additional TTYs (3 to 6)

How can I disable TTYs 3 to 6 so that only the early getty (tty1) and agetty-tty2 are on?

I've tried manually editing /etc/s6/sv/getty/contents and removing agetty-tty3 through 6, but I couldn't find instructions on how to recompile the boot bundle so that it takes effect, and regardless of how many times I reboot ttys 3 to 6 are still present.

When I first installed artix I was able to do that but I forgot how (and I forgot if I had to use the live s6 ISO or if I had to do it from the installation itself (don't know how this affects live vs compiled)).

Is there a way to do that?

Re: Disable additional TTYs (3 to 6)

Reply #1
You could use the s6-rc-bundle-update script for this.

For example, "s6-rc-bundle-update delete boot agetty-tty3". The problem with this approach is that when the s6-rc-db-update hook gets triggered again the gettys will be added back to the boot bundle so you would have to disable it again. I've never had someone ask to disable the gettys before, but I suppose I could think of a way to make this configurable. The s6-scripts package is basically hardcoded to install gettys 2-6.

Re: Disable additional TTYs (3 to 6)

Reply #2
Will reinstalling a package that has a "-s6" suffix trigger the post installation hook causing the database to be rebuilt again? Because I think that's the only way to get this to work right now.

Re: Disable additional TTYs (3 to 6)

Reply #3
You can always just manually execute the script. It's in /usr/share/libalpm/scripts/s6-rc-db-update-hook

Re: Disable additional TTYs (3 to 6)

Reply #4
Looks like that solves this problem for now, until there's an official way to do it.

Re: Disable additional TTYs (3 to 6)

Reply #5
I implemented this in the latest version of s6-scripts (20201123). /etc/s6/s6.conf now comes with a GETTYS variable which you can remove/add ttys to. Every individual agetty-tty{2-6} service now checks to make sure that the tty is defined in GETTYS before launching itself. If the tty is not there, then it just does nothing (i.e. the service goes up and no getty is spawned). It's in testing right now. It'll make its way to stable later.