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://blog.csdn.net/wangjia55/article/details/51516404
[2]https://askubuntu.com/questions/300682/what-is-the-xauthority-file

猜你喜欢

转载自blog.csdn.net/yangyangrenren/article/details/79244749
今日推荐