Remote desktop broken in 3.33.9 or later
Env:
openSUSE Tumbleweed 20191119 snapshot (gdm 3.34.1) or Fedora 31
Steps:
- Disable Wayland by adding
WaylandEnable=false
incustom.conf
- Configure Tumbleweed as an xvnc or XDMCP server then reboot the server
- Connect to the server from another client OS via vncviewer or Xephyr. And you can get a remote gdm greeter on the client.
- Input the password and hit enter, the gdm greeter in under vncviewer didn't jump to gnome-shell. Instead, the greeter turned into grey. Meanwhile, the server switched to gnome-shell in a new VT.
This is a regression issue caused by: !69 (merged) I tried to revert this commit on OBS and this issue could be fixed.
We have two gdm sessions in the above scenario:
- c1 (the local session on the server with SEAT=seat0)
- c2 (the remote session created by the vnc connection with SEAT=null)
But now gdm_find_display_session_for_uid
will search the sessions from newest to oldest, and take the oldest one as the session_id (i.e. c1). So the remote session's seat_id will be wrongly set to seat0
.
Some clues in the log:
gdm[1820]: GdmManager: trying to open new session
gdm[1820]: Finding a graphical session for user 460
gdm[1820]: Considering session 'c2'
gdm[1820]: Considering session 'c1'......
gdm-password][2516]: GdmSessionWorker: Set PAM environment variable: 'XDG_SEAT=seat0'
gdm[1820]: GdmSession: type (null), program? no, seat seat0
gdm-password][2516]: GdmSessionWorker: session display mode set to new-vt
I also found some complaints about multi-seat with similar descriptions but not sure if they are the same issue: #526 (closed)