GDM does not clear wayland socket on session switch
On Fedora 33, if I login into a Wayland session, then switch to a Xorg session, several flatpaks do not start any more, with an error similar to:
flatpak run com.github.johnfactotum.Foliate
Unable to init server: Could not connect: Connection refused
EGLDisplay Initialization failed: EGL_NOT_INITIALIZED
Portal call failed: Failed to start command: Failed to execute child process “dict” (No such file or directory)
Portal call failed: Failed to start command: Failed to execute child process “sdcv” (No such file or directory)
Unable to init server: Could not connect: Connection refused
(com.github.johnfactotum.Foliate:2): Gtk-WARNING **: 11:22:57.766: cannot open display:
I reported the bug on FlatHub, and they think it is GDM not cleaning up the Wayland socket on session switch. Please see:
https://github.com/flathub/flathub/issues/1985#issuecomment-742073311
Thank you. Val