Ubuntu 16.04 LTS will automatically log out

It kills all the opened applications and processes and then automatically logs out, and then goes into the log-in UI. But after I relog-in, the mounted drives are still mounted. Is there any related settings, or is this a bug? Thanks!


Similar problem happened to my friend because somehow he corrupted the .Xautority file.

Log into a tty (Ctrl+Alt+F6) and after typing your username and password:

sudo rm -v .Xauthority

.Xauthority file can be found in /home/, which is where the terminal's default working path also usually is. If you use a tty to sign in as one user to delete another's .Xauthority file, make sure you've cd'd to the right directory first.

Then restart lightdm with:

sudo service lightdm restart

The system will recreate the .Xautority file. Hope it helps.


I installed Chrome Remote Desktop on my Ubuntu and after reboot, this problem happened.

From the terminal Ctrl+Alt+F6, I uninstalled Chrome Remote Desktop by:

sudo apt-get remove chrome-remote-desktop/stable

The problem solved...


I have faced similar issues. Then realized that the problem was in the way I lock my system.

On windows, we lock using shortcut ALT + Ctrl + Del, and then press Enter.

But in Linux, it is logoff shortcut. It's written clearly on the prompted window, but most of the time, people like me, won't read it at all.

On Ubuntu, shortcut to lock the system is ALT + Ctrl + L.

So before trying something, make sure you are not doing the same.

Hope it helps!


I just experienced this issue today on my fully updated Ubuntu 16.04. I tried all the methods mentioned above but failed.

Fortunately, I solved the problem myself 4 hours later (sigh).

It turned out to be my disk didn't have enough free space. In this case, at the login screen, ALT + Ctrl + F1 to a terminal, login to your account, delete some unimportant files in your home directory, and try to login with GUI mode again.