After an apt-get update for Ubuntu 18.0.4 in Q3/Q4 2020, the currently logged in user session might corrupt.
In our case the issue was a dbus-configure- and gnome.shell start error and restart forever, that consumed 85% to 99% of the system resources.
Aug 22 22:28:50 dom1 systemd: Starting GNOME Shell on X11...
Aug 22 22:28:50 dom1 gsd-media-keys: Failed to grab accelerators: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.gnome.Shell” on object at path /org/gnome/Shell
Aug 22 22:28:51 dom1 gsd-media-keys: Failed to grab accelerators: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.gnome.Shell” on object at path /org/gnome/Shell
What didn't work . . .
- Removing gnome-desktop with purge option interestingly doesn't work. Upon reinstall, the same issue for that user occurs again.
- Using gsettings reset org.gnome.shell <key> didn't work for the disabled keys because dconf couldn't run since that current user session was hung/in race condition.
Ironically, what worked perfectly was the following, using the login "userid" which would be the broken Gnome login/user.
1. Start a remote session to the workstation/server.
$ ssh firstname.lastname@example.org
2. Verify the current session is the correct ID and the home directory.
3. Manually remove the current user's configuration for Gnome:
userid@server:~$ rm -rf .gnome .gnome2 .gconf .gconfd .metacity .cache .dbus .dmrc .mission-control .thumbmails ~/.config/dconf/user ~.compiz*
At this point, you'll see the hung window cycle as the last loop crashes and X11 starts again, and the login prompt is visible. Alternately, if that current user is set to auto-login to a workstation, after the screen flash, the desktop will appear in a second or so.