Ctrl+Alt+F1
sudo apt-get install ubuntu-session
sudo apt-get install ubuntu-desktop
sudo apt-get -f install
sudo dpkg-reconfigure ubuntu-desktop
sudo reboot
sudo apt-get install gnome-session
sudo apt-get install lightdm
sudo apt-get install unity-greeter
sudo apt-get install ubuntu-desktop(安装到这一步,reboot尝试可以登入界面,不行就执行下面命令)
Sudo apt-get install python-ntdb
Sudo apt-get install libntdb1:amd64
Sudo apt-get install libupstart1:amd64
然后到/home/username 账户下,会有个.xsession-errors 的文件,
看里面报什么错误,根据错误提示去解决问题,比如 .profile 文件设置错误等,都有可能引起上述现象
sudo rm -r .Xauthoritysudo reboot //重启
可惜,不明白为什么删除.Xauthority就ok的原因。
关于.Xauthority:startx的脚本文件
Xserver 启动时,读文件~/.Xauthority,读入对应其display的记录.当一个需要显示的客户程序启动调用XOpenDisplay()也读这个文 件,并把找到的mag