I'm having the same issue found here (and tried to suggested solution, but that didn't help any):
https://askubuntu.com/questions/556873/unable-to-log-in-gui-mode-in-ubuntu
But it won't let me comment on that one, says I don't have enough reputation. I used to be able to use the GUI all the time, but then after applying some patches a few months ago, it stopped letting me log-in to the GUI. I hoped it was a temporary bug that would eventually get fixed, but it's still a problem, and preventing me form using the desktop GUI (and thus some programs).
The CLI works fine, but in the GUI, I select my user name, put in the password, it acts like it's logging in, then the screen goes black, and eventually it goes back to the log-in screen.
I'm running "Ubuntu 16.04.1 LTS" and have tried applying the latest patches with "apt upgrade", but the problem persists.
The only error message I see when logging in on the CLI:
[ ##.######] systemd-login[1742]: Failed to start user service, ignoring: Unknown unit: user@1000.service
I put #'s in there because that number seems to change every time.
Thanks in advance for any suggestions or help.
If I login to the CLI, then run "startx", it does basically the same thing, dumping me back to the CLI.
Here's the only error message I see in the output:
xinit: connection to X server lost
sudo apt-get install --reinstall ubuntu-desktop
or modify to suit your desktop version. – George Udosen Jan 03 '17 at 06:05user@.service
into/lib/systemd/system
or whatever. – Velkan Jan 03 '17 at 08:22