One user can't start Xorg session from GDM

, ,

After upgrading Windows 7 to 11 without disconnecting my other SSD containing a boot, Fedora 38 root and home partition, one of the users in that home partition (me) can no longer start Xorg sessions from GDM. The other user can start Xorg and both users can start Wayland from GDM.

When booting in text mode, the roles seem to be reversed. I can successfully startx after getting error messages (.serverauthXXXX does not exist), the other user can’t get into Xorg that way.

/tmp/.X11-unix is owned by root:root

Its current contents (my (rj) Wayland session after trying Xorg from GDM, while the other user (sa) is logged in under Xorg) are

srwxr-xr-x@ 0 rj  29 Jun 13:14 X0
srwxr-xr-x@ 0 rj  29 Jun 13:14 X1
srwxrwxrwx@ 0 sa  29 Jun 13:39 X2
srwxr-xr-x@ 0 gdm 29 Jun 13:11 X1024
srwxr-xr-x@ 0 gdm 29 Jun 13:11 X1025

After quite an ordeal I figured out that it had nothing to do with Windows, I simply happened to have introduced an error into my .profile file right beforehand. For whatever reason that prevented me from starting Xorg sessions from GDM, but not from CLI, and it didn’t prevent starting Wayland sessions.

In particular I used the syntax export FOO=bar rather than

export FOO

Those should be equivalent. You probably fixed something else too, maybe without noticing.

Depending upon whether one is using bash, sh, zsh, or other shells the syntax is differing.
From the command line with bash those are normally equivalent, but one should note that in /etc/profile one sees several differing variables defined and at the end there is

This is because the shell used by the system is not the same as the shell used by the user.
The second form should work in almost all shells but it truly depends upon the shell used. Commands like that run by the system should always have the shown 2-line form.

Defining the variable makes it available in the current process. Exporting it stores it in the users environment and it becomes globally defined.