2

In fact I have 2 questions> to get the TTYs for all F1..F12 keys. But how? Also they have to be with a text mode, not VGA. or atleast it should be switchable on the fly!

The default font is very tiny and I could not even set to a proper text mode.

No screen or tmux alike utilities please as suggestions. Just do not deprecate the same function which was possible with old old linux versions!

I have just used 10 years and happy with that Mandriva that it allows to use the screen with text mode and all F12 keys for terminals which allows eyes to rest in the text mode for reading. With newer ubuntu releases trouble is that in every new release forces the VGA modes, tiny fonts, and it is difficult to change to text mode, becouse every time these tricks (configuration files) are hidden to a new place.

thank you?

alex
  • 21
  • 1
  • I have answered the question from the title. Please follow "one issue – one question" rule. The issue with font size should have it's own question (post). I advice you to remove this second issue from the current question ([edit] the question) and ask a separate one. As a new contributor you may also want to take our short [tour] to learn how the site works. – Kamil Maciorowski Nov 01 '18 at 19:18

1 Answers1

2

Edit /etc/systemd/logind.conf and set NAutoVTs= to the desired value (e.g. 12).

From man 5 logind.conf:

NAutoVTs=
Takes a positive integer. Configures how many virtual terminals (VTs) to allocate by default that, when switched to and are previously unused, "autovt" services are automatically spawned on. These services are instantiated from the template unit autovt@.service for the respective VT TTY name, for example, autovt@tty4.service. By default, autovt@.service is linked to getty@.service. In other words, login prompts are started dynamically as the user switches to unused virtual terminals. Hence, this parameter controls how many login "gettys" are available on the VTs. If a VT is already used by some other subsystem (for example, a graphical login), this kind of activation will not be attempted. Note that the VT configured in ReserveVT= is always subject to this kind of activation, even if it is not one of the VTs configured with the NAutoVTs= directive. Defaults to 6. When set to 0, automatic spawning of "autovt" services is disabled.

After restarting systemd-logind.service you will get your virtual terminals. Unfortunately systemctl restart systemd-logind.service will probably log you out of the current graphical session, if any (the service doesn't accept reload); so instead of doing this consider adding new VTs by hand this one time: systemctl start autovt@tty7.service, systemctl start autovt@tty8.service etc.

After the next reboot your new settings will kick in and all the VTs will be available to you automatically.

Kamil Maciorowski
  • 69,815
  • 22
  • 136
  • 202
  • Sounds promising, but doesn't work for me on Ubuntu bionic. When I hit `fn-alt-f3`, nothing visibly changes except the keyboard and mouse go dead until I switch back to the default desktop with `fn-alt-f2`. And I see odd stuff in syslog, like `event2 - Power Button: device removed` and `systemd-logind: got pause for 13:75` How can I query how each autovt service is configured, what its status is, whether it is running etc? – nealmcb Oct 31 '19 at 19:44
  • @nealmcb Comments are not for solving additional issues months later. My advice: [ask a new question](https://superuser.com/questions/ask) after making sure it's not a duplicate of some existing one. Include a link to this question or my answer if you think it provides context. Even if I could help you in two minutes, it's better not to do this in comments. These comments will not help future users with similar problems, they won't be able to find them. A separate question may be useful for the community. This is what Stack Exchange is about. – Kamil Maciorowski Oct 31 '19 at 20:01