Hi,
I need some tips configuring virtual consoles and on which of them graphical login will run.
Currently after several upates I noticed that:
environment variable DISPLAY changed from “:0” to “:1”
the graphical login runs on 2(two) tty’s: tty2 and tty7 (“ctrl-alt-F2” and cntrl-alt-F7" send me to plasma desktop)
Typically, graphical login and plasma desktop run on tty7. I have no clue what caused the changes. I just noticed because some of my cron jobs failed (because of change in DISPLAY var).
In old days there was file /etc/inittab where I could specify which virtual consoles to span, but now it is gone. Everything is managed by systemd and therefore is much less transparent …
How I can reconfigure to have only one “graphical” tty ?
I can confirm it on current TW with gdm/GNOME. gdm runs on tty7, but user session is started on different tty (in my case it is tty3 currently). I suspect it is actually started on the first “free” tty - before logging in in GNOME I switched to tty2 and it caused auto-spawn of login so tty2 was not available.
Looks like gdm needs two tty’s to run - tty2 for UID 1000 (that’s me) and tty7 for UID 292 (gdm).
I wonder if it is a “feature” or misconfiguration?
The fact that gdm is running is confusing because for a long time it was sddm. Only after a recent update login screen has changed. At that time I attributed that fact to a change in of plasma theme (breeze) version.
p.s.
in /etc/sysconfig/displaymanager sddm is set as display manager:
DISPLAYMANAGER=“sddm”
Displaymanager is not set anymore by /etc/sysconfig in Tumbleweed, it is set by
update-alternatives: http://openmafia.org/~osf/Screenshots/Auswahl_245.jpg
Its an Screenshot, because Clipboard on this Maschine is not working…
Typically, you have virtual consoles running on tty1-tty6 and you graphical desktop or login on tty7. You can switch between them Ctrl-Alt-F1, Ctrl-Alt-F2, etc. The number of those tty’s (6 in this example) could be set in /etc/inittab file. It is not used anymore, but this is how you the relevant lines look like:
You can span 2 or you can span 9 virtual consoles, as many as you want. The consoles use some fonts and back(fore)ground colors and those are configurable too.
My problem is that I sort of understood how it was done in the past but with the advent of systemd and “alternatives” I am no more.
Wrong. The number of ttys is set by kernel and is actually fixed (63). /etc/inittab defined how many ttys would get login process on system start. It does not mean you could not use other ttys.
My problem is that I sort of understood how it was done in the past but with the advent of systemd and “alternatives” I am no more.
It is still not clear what is “it” that “was done in the past”. You want to start login on tty2 on system boot and not on demand? Run “systemctl enable getty@tty2.service”. But how tty login is related to your original question of why second X server is started?
Interesting that there is no SUSE documentation on this, much less openSUSE.
It’s my understanding…
tty7 is <always> the default graphical console in all Linux distros, both in the past and currently.
A big difference with systemd is that tty are not running automatically and already to use on boot. Tty are “generated” and started up on demand.
Although there are numerous references to tty1-6 for serial consoles, in systemd those are only the tty that can be automatically invokable. You can configure numerous additional tty but they just can’t be automatically started up.
There are differences between distros, so you have to be careful which documentation you may be reading. Example, I doubt that Arch with its use of agetty and related services and utilities applies to SUSE/openSUSE (but who knows? I may learn something).
So,
I guess bottom line is that for anyone who <really> wants to dig deeply into this should start with the standard documentation that’s included, eg the getty MAN pages and be wary of applying anything learned on another distro.
FWIW -
The following Lennart Poettering blog article on tty should be good reading… It also includes some comment about multiple X tty in GNOME which may or may not also apply to other environments.
Sometimes I loose graphical desktop and need to continue my work. That happened with kernels 4.9.* when nvidia driver would not compile, nouveau driver crapped out and the stock kernel driver was veeeery slow (Ihave 2560x1600 screen). In situation like this I need as many virtual consoles/terminals as possible.
Wrong. Indeed when you boot typical linux install you will find /dev/tty1-/dev/tty63. This is an initial, minimal set of tty’s that will be created on boot. Now run this:
mknod /dev/tty72 c 4 72
It will create /dev/tty72. The major number “4” can be different on your box, but you can find it its value from “ls -l /dev/tty1”. All /dev/ttyN will have same major number.
I think even the authoritative blog post reference I provided supports what I wrote.
And, it’s important to know that these are what has changed in systemd compared to SysVinit.