When I login on a Fedora 31 workstation and run the ps command, I see the below output;
for an X session:
PID TT CMD
...
1 ? /usr/lib/systemd/systemd --switched-root --system --deserialize 29
...
820 ? /usr/sbin/gdm
1305 ? gdm-session-worker [pam/gdm-password]
1346 tty2 /usr/libexec/gdm-x-session --run-script /usr/bin/gnome-session
1348 tty2 /usr/libexec/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -background none -noreset -keeptty -verbose 3
1444 tty2 /usr/libexec/gnome-session-binary
1465 ? /usr/bin/ssh-agent /bin/sh -c exec -l /bin/bash -c "/usr/bin/gnome-session"
...
1316 ? /usr/lib/systemd/systemd --user
1322 ? (sd-pam)
...
1531 ? /usr/bin/gnome-shell
...
for a Wayland session:
PID TT CMD
...
1 ? /usr/lib/systemd/systemd --switched-root --system --deserialize 29
...
825 ? /usr/sbin/gdm
1309 ? gdm-session-worker [pam/gdm-password]
1351 tty2 /usr/libexec/gdm-wayland-session /usr/bin/gnome-session
1356 tty2 /usr/libexec/gnome-session-binary
...
1321 ? /usr/lib/systemd/systemd --user
1327 ? (sd-pam)
...
1492 ? /usr/bin/gnome-shell
...
As I understand, graphical logins via a display manager like gdm executes an X/Wayland session directly after authenticating a user, instead of executing a login shell. I see that both X and Wayland sessions are started on a virtual terminal (tty2), and what the Xorg(1) says about the vt option is: 'This option applies only to platforms that have virtual terminal support, such as Linux, BSD, OpenSolaris, SVR3, and SVR4.' Is starting X/Wayland sessions with a controlling tty done merely to provide the ability to switch to other virtual terminals while running a graphical shell in one, or is it a constraint of X/Wayland? Is it possible to start an X/Wayland session without a controlling tty on Linux, and is this up to gdm, X/Wayland, or systemd? And what would be an example of a system that runs Xorg and doesn't have virtual terminals at all unlike the systems listed in Xorg(1)?