I fought with this on and off for a few days after upgrading from 16.04 to 18.04. What a pain!
So, the extended story here is that Ubuntu switched to a "Wayland" desktop in this release, rather than continuing to use "Xorg". Then, after a "failed experiment" with that, they switched back! Personally, I upgraded again to 18.10, hoping that would magically fix it, since they began the trek back to XOrg as the default, but no luck...
If you follow the post of @Adeynack, you can most likely start Ubuntu by choosing the "Wayland" option at the login screen via the gear. That worked for me. (At first, I was terrify that my credentials didn't work at all, and I was locked out of my machine. Thank god that wasn't the case!) You may well find, however, that all of your XOrg options (i.e. "Ubuntu", "Mate", etc.) will silently fail and loop you back to the login.
This might be good enough for many of you. But, it was not for me, because native screen sharing over VNC doesn't work! In fact, I read that hardly any of the third party screen sharing utilities work on Wayland either, or they have problems at best.
After a lot of Googling and fiddling... I fixed this Xorg issue on my machine by editing a basic XServer config file:
sudo vi /etc/X11/Xwrapper.config
Here I found this text:
allow_users=anybody
allowed_users=console
Apparently, allow_users
is not a valid key (who knows how it got there!), so I simply changed it to this:
allowed_users=anybody
allowed_users=console
Viola! The XOrg options worked after that! I went with the new default "Ubuntu" choice, which is what I'd recommend if you don't know which option to choose.
Next, as you'll find in other places online, you might want to entirely disable Wayland. Open the boot config which controls that:
sudo vi /etc/gdm3/custom.conf
In the [daemon]
section, uncomment WaylandEnable=false
. Now, you'll not even have the Wayland desktop option, and you'll be living back in pure XOrg land again.
Finally, I found that when I made the switch back to XOrg all my icons looked funky. It turns out that is just the new standard theme / icon set using "Yaru". Well, I didn't like it. If you search for "GNOME Tweaks" in the Activities search (and install the app if you don't have it), then choose "Appearance", you'll be able to switch back to "Unity" icons, or select from a solid collection of others, plus more extended options to alter the UI.