ubuntu16.04登录界面输入用户名密码后又回到登录界面

来源:互联网 发布:java数组的逆序输出 编辑:程序博客网 时间:2024/05/21 08:04

原因有以下几种:

最好先查看log,即/var/log/Xorg.0.log .

1,磁盘空间不够了。

解决办法:字符界面登录,删除一些文件,腾出一些空间,重启即可。

2,/home/username文件夹的权限问题。

解决办法:# chown username:username /home/username -R

3,/tmp文件夹的权限问题。

解决办法:改成如下所示的权限即可。

$ ls / -lt
total 280
drwxrwxrwt  30 root root 155648 Aug 19 19:47 tmp

4, ~/.Xauthority 文件权限问题

解决办法:1>, 删除该文件

            或者2>, # chown username:username ~/.Xauthority

同时可以查看log 文件  ~/.xsession-errors

5,造成循环登陆的原因还可能是.profile 或者profile 被改坏了

解决办法:从其他ubuntu系统中拷贝一个该文件。

$ cat ~/.profile 
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.


# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022


# if running bash
if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
    fi
fi


# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi


6, 如果之前装过nvidia的显卡驱动,可以重新安装一下该显卡驱动(可能是该显卡驱动没完全安装成功,导致该显卡驱动的配置文件部分损坏,从而导致无法进入桌面)。

解决办法:重新安装一下该显卡驱动


以上所列也只是常见的几种情况,欢迎大家在comments里补充!

0 0
原创粉丝点击