Ask Your Question

Documentation for exact behavior of switching virtual terminals?

asked 2017-01-25 13:25:54 -0500

astfgl gravatar image

updated 2017-01-25 14:00:06 -0500

I would like to know where can I find the documentation of the exact behavior for switching between virtual terminals in Fedora. Is it described somewhere?

I am curious about this, because I feel that this behavior changed since I upgraded from Fedora 23 to Fedora 25.

This is how it is right now:

  • CTRL + ALT + F3-6: switches to the corresponding virtual terminal (tty3-6)
  • CTRL + ALT + F2: switches to the gnome session where I am currently logged in (when I'm logged in)
  • CTRL + ALT + F1: switches to the gnome login screen, as if I am not logged in (I can log in there as well)

If I recall correctly, it was only the first virtual terminal providing the graphical stuff before the upgrade. Has this behavior changed? Can anyone reproduce this? What's the rationale behind this behavior?

A thing that I find odd, is the inconsistency of the behavior. When I log in on tty1, then switch away and back again, I am confronted with the login screen again (not the lock screen). When I log in there again, the session is there. In contrast, when I log in on tty2 (which seems to be the default), and switch back and forth, I'm not required to log in / unlock.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-02-01 15:21:31 -0500

astfgl gravatar image

I did not find a source providing exact documentation of this behavior, but a description and a bit of a rationale.

In this gnome bugreport it is explained:

GDM's behavior was changed in 3.16 so that instead of running one X server on the login screen which is then transformed into the user's session, we now start a new X session from within the user's session, which means that we need to start the user's session on another TTY/VT.

Note that when using fast user switching, you effectively got this behavior as well, with each user on a different TTY/VT. We just extended it to the first user to log in as well.

Knowing this, I notice that one gdm-wayland-session providing the login screen is running as user gdm on tty1, one as user astfgl on tty2, and one as user tmp (that I made up for testing) on tty5, as expected:

$ ps aux |  grep wayland
gdm       1325  0.0  0.2 449768 10420 tty1     Ssl+ 19:07   0:00 /usr/libexec/gdm-wayland-session gnome-session --autostart /usr/share/gdm/greeter/autostart
gdm       1779  0.0  1.1 254360 46236 tty1     Sl+  19:07   0:00 /usr/bin/Xwayland :1024 -rootless -noreset -listen 4 -listen 5 -displayfd 6
astfgl    4144  0.0  0.2 449768 10552 tty2     Ssl+ 19:13   0:00 /usr/libexec/gdm-wayland-session gnome-session
astfgl    4249  0.6  2.3 327828 91532 tty2     Sl+  19:13   1:14 /usr/bin/Xwayland :0 -rootless -noreset -listen 4 -listen 5 -displayfd 6
tmp       5171  0.0  0.2 449768 10620 tty5     Ssl+ 19:31   0:00 /usr/libexec/gdm-wayland-session gnome-session
tmp       5269  0.0  1.3 260048 51136 tty5     Sl+  19:31   0:07 /usr/bin/Xwayland :1 -rootless -noreset -listen 4 -listen 5 -displayfd 6

In that thread it is explained that

Previously, we launched one X server as root, and then when you logged in, we "morphed" it into the session X server. If you went to fast user switching, we then launched a second X server on-demand.

For security reasons, and Wayland porting reasons, we now launch the X server and Wayland server within the user's session, instead of starting one as root.

The way that we do this is that we launch two X servers, one for the gdm greeter session, and for the session user.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2017-01-25 13:25:54 -0500

Seen: 501 times

Last updated: Feb 01 '17