Like this guy I have lost the ability to use several core Ubuntu apps - most notably, terminal and gnome-disks. When I try to launch them, I get a spinner for a few seconds and sometimes an entry in the window bar, then nothing. Amazingly, the emergency terminals (TTY?) I can normally depend on to save the day also don't work. If I press ctrl + alt + F*, nothing happens.
By default, my desktop environment auto logs in. I discovered that if I log out, then log back in from the top right menu, Terminal (and the TTY shortcuts) start working. Strangely, gnome-disks from the launcher menu still doesn't, but if I invoke it from the terminal, it launches fine.
When I looked at my logs for a failed gnome-disks invocation, I see this:
[session uid=1000 pid=2863] Activating service name='org.gnome.DiskUtility' requested by ':1.46' (uid=1000 pid=3519 comm="/usr/bin/gnome-shell " label="unconfined")
[session uid=1000 pid=2863] Successfully activated service 'org.gnome.DiskUtility'
Unable to init server: Could not connect: Connection refused
cannot open display: :20
I am working directly on this Ubuntu machine - no SSH involved - but I think these problems may have started when I set up Chrome Remote Desktop. I've tried adding an sshd_config file as others suggested, but no dice.
My theory is that something's broken with the desktop environment (window manager?) and it doesn't know what display it's meant to send stuff to. Terminal somehow does. Any ideas how I can debug further or fix?