ubuntu界面登录死循环

Ubuntu14.04系统
GUI方式登录,输入了正确的用户名与密码之后,然后又是回到了登录界面,一直无法显示登录后的桌面。改成命令提示符方式登录,是可以登录成功。按照链接1中的方法修改~/.Xauthority的文件权限,可以看到~/.Xauthority的owner以及grouper已经是root了,修改登录用户名以及所属组,即可。

cd ~
ll
sudo chown username  .Xauthority
sudo chgrp username  .Xauthority
ls -alh | grep .Xauthority
sudo reboot

the .Xauthority (not .xAuthority) file can be found in each user home directory and is used to store credentials in cookies used by xauth for authentication of X sessions. Once an X session is started,the cookie is used to authenticate connections to that specific display. You can find more info on X authentication and X authority in the xauth man pages (type man xauth in a terminal). So,if you are not the owner of this file you can’t login since you can’t store your credentials there.
This situation usually arises when you execute a GUI application (for instance nautilus) with root permissions by typing sudo nautilus. You can avoid it (for 12.10 and older versions) by invoking the app with gksudo nautilus,or in any version using sudo -H nautilus.

参考链接
[1]http://www.jb51.cc/article/p-hkdpazmv-oo.html
[2]https://askubuntu.com/questions/300682/what-is-the-xauthority-file

相关文章

目录前言一、创建Hadoop用户二、更新apt和安装Vim编辑器三、...
原文连接:https://www.cnblogs.com/yasmi/p/5192694.html ...
电脑重启后,打开VirtualBox,发现一直用的虚拟机莫名的消失...
参见:https://blog.csdn.net/weixin_38883338/article/deta...
Ubuntu 18.04 LTS 已切换到 Netplan 来配置网络接口。Netpla...
介绍每个 Web 服务都可以通过特定的 URL 在 Internet 上访问...