startx failed, get "Oh no, something has gone wrong"
gnome-session: 3.34.2
I reported this issue on gnome-settings-daemon#499 (closed).
When run command startx, because there is no environment variable XDG_SESSION_TYPE, the gnome-session falls back to non-systemd startup procedure.
gnome-session will start all the applications in Entry RequiredComponent= of file '/usr/share/gnome-session/sessions/gnome.session'. These applications include org.gnome.SettingsDaemon.XSettings
.
But because systemd user service gsd-xsettings.service
starts up, org.gnome.SettingsDaemon.XSettings
starts unsuccessfully, then gnome-session crashes and we get error "Oh no, something has gone wrong".
Now I understand why gsd-xsettings.service
starts up. That's because of this commit gnome-shell@8adfc5b1, gnome-shell will start gsd-xsettings.service
.
So now the gsd-xsettings.service
will be started by gnome-shell, the org.gnome.SettingsDaemon.XSettings
can be removed from '/usr/share/gnome-session/sessions/gnome.session'. Then when gnome-session falls back to non-systemd startup procedure, gnome-session will not crash.