卡在 Ubuntu 登录屏幕

卡在 Ubuntu 登录屏幕

当我尝试登录我的帐户时,屏幕变黑一秒钟,然后返回登录屏幕。显然这是一个相当常见的问题,但到目前为止,我尝试过这个网站上以前提出的问题,但都没有奏效。

我尝试过的:

使用 gdm 而不是 lightdm

sudo apt-get upgrade 和 sudo apt-get update

将 .bashrc 恢复为默认版本

chown 用户名:用户名.Xauthority

重新安装 ubuntu-desktop

创建一个新的登录账户(它只是做同样的事情)

可能有帮助或没帮助的事情:

当我按 Cntl+Alt+F2 并进行文本登录时,出现一堆错误:

Command 'lesspipe' is available in the following places
* /bin/lesspipe
* usr/bin/lesspipe
The command could not be located because 'usr/bin:/bin' is not included in the 
PATH environment variable.
lesspipe: command not found
Command 'dircolors' is available in '/usr/bin/dircolors'
The command could not be located because '/usr/bin' is not included in the PATH
environment variable.
dircolors: command not found
Command 'uname' is available in '/bin/uname/'
The command could not be located because '/bin' is not included in the PATH  
environment variable.
uname: command not found
-bash: [: =: unary operator expected
Command 'sed' is available in '/bin/sed'
The command could not be located because '/bin' is not included in the PATH 
environment variable.
sed: command not found
Command 'ls' is available in '/bin/ls'
The command could not be located because '/bin' is not included in the PATH 
environment variable.
ls: command not found

在将 /bin 和 /usr/bin 导出到路径之前,我无法使用大多数命令(如 ls 和 sudo)。

当我在 /var/log 中执行“ls -ltr”时,最后修改的日志文件是:

系统日志

认证日志

最后日志

Xorg.0.log

lightdm(目录)

Xorg.0.log.old

我没有在其中任何一个中找到任何明显的错误消息。

有人能帮我诊断一下问题吗?

编辑:这是 auth.log:

    Jun 21 13:36:25 melissa-ThinkPad-T430 sshd[551]: Server listening on 0.0.0.0 port 22.
Jun 21 13:36:25 melissa-ThinkPad-T430 sshd[551]: Server listening on :: port 22.
Jun 21 13:36:35 melissa-ThinkPad-T430 lightdm: pam_unix(lightdm:session): session opened for user lightdm by (uid=0)
Jun 21 13:36:35 melissa-ThinkPad-T430 lightdm: pam_ck_connector(lightdm:session): nox11 mode, ignoring PAM_TTY :0
Jun 21 13:36:42 melissa-ThinkPad-T430 lightdm: pam_succeed_if(lightdm:auth): requirement "user ingroup nopasswdlogin" not met by user "melissa"
Jun 21 13:36:43 melissa-ThinkPad-T430 dbus[827]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.32" (uid=104 pid=1715 comm="/usr/lib/indicator-datetime/indicator-datetime-ser") interface="org.freedesktop.DBus.Properties" member="GetAll" error name="(unset)" requested_reply="0" destination=":1.16" (uid=0 pid=1233 comm="/usr/sbin/console-kit-daemon --no-daemon ")
Jun 21 13:36:47 melissa-ThinkPad-T430 dbus[827]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.40" (uid=104 pid=1831 comm="/usr/lib/indicator-datetime/indicator-datetime-ser") interface="org.freedesktop.DBus.Properties" member="GetAll" error name="(unset)" requested_reply="0" destination=":1.16" (uid=0 pid=1233 comm="/usr/sbin/console-kit-daemon --no-daemon ")
Jun 21 13:36:50 melissa-ThinkPad-T430 lightdm: pam_unix(lightdm:session): session closed for user lightdm
Jun 21 13:36:50 melissa-ThinkPad-T430 lightdm: pam_unix(lightdm:session): session opened for user melissa by (uid=0)
Jun 21 13:36:50 melissa-ThinkPad-T430 lightdm: pam_ck_connector(lightdm:session): nox11 mode, ignoring PAM_TTY :0
Jun 21 13:36:50 melissa-ThinkPad-T430 lightdm: pam_unix(lightdm:session): session closed for user melissa
Jun 21 13:36:51 melissa-ThinkPad-T430 lightdm: pam_unix(lightdm:session): session opened for user lightdm by (uid=0)
Jun 21 13:36:51 melissa-ThinkPad-T430 lightdm: pam_ck_connector(lightdm:session): nox11 mode, ignoring PAM_TTY :0
Jun 21 13:36:51 melissa-ThinkPad-T430 lightdm: pam_succeed_if(lightdm:auth): requirement "user ingroup nopasswdlogin" not met by user "melissa"
Jun 21 13:36:51 melissa-ThinkPad-T430 dbus[827]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.47" (uid=104 pid=2010 comm="/usr/lib/indicator-datetime/indicator-datetime-ser") interface="org.freedesktop.DBus.Properties" member="GetAll" error name="(unset)" requested_reply="0" destination=":1.16" (uid=0 pid=1233 comm="/usr/sbin/console-kit-daemon --no-daemon ")
Jun 21 13:37:01 melissa-ThinkPad-T430 login[1034]: pam_unix(login:session): session opened for user melissa by LOGIN(uid=0)
Jun 21 13:38:30 melissa-ThinkPad-T430 sudo:  melissa : TTY=tty2 ; PWD=/home/melissa ; USER=root ; COMMAND=/usr/bin/apt-get install pastebinit
Jun 21 13:38:30 melissa-ThinkPad-T430 sudo: pam_unix(sudo:session): session opened for user root by melissa(uid=1000)
Jun 21 13:38:32 melissa-ThinkPad-T430 sudo: pam_unix(sudo:session): session closed for user root
Jun 21 13:38:51 melissa-ThinkPad-T430 sudo:  melissa : TTY=tty2 ; PWD=/home/melissa ; USER=root ; COMMAND=/usr/bin/apt-get -f install pastebinit
Jun 21 13:38:51 melissa-ThinkPad-T430 sudo: pam_unix(sudo:session): session opened for user root by melissa(uid=1000)
Jun 21 13:38:52 melissa-ThinkPad-T430 sudo: pam_unix(sudo:session): session closed for user root

这是 lightdm.log:

[+0.00s] DEBUG: Logging to /var/log/lightdm/lightdm.log
[+0.00s] DEBUG: Starting Light Display Manager 1.2.3, UID=0 PID=1085
[+0.00s] DEBUG: Loading configuration from /etc/lightdm/lightdm.conf
[+0.00s] DEBUG: Using D-Bus name org.freedesktop.DisplayManager
[+0.00s] DEBUG: Registered seat module xlocal
[+0.00s] DEBUG: Registered seat module xremote
[+0.00s] DEBUG: Adding default seat
[+0.00s] DEBUG: Starting seat
[+0.00s] DEBUG: Starting new display for greeter
[+0.00s] DEBUG: Starting local X display
[+0.00s] DEBUG: X server :0 will replace Plymouth
[+0.02s] DEBUG: Using VT 7
[+0.02s] DEBUG: Activating VT 7
[+0.02s] DEBUG: Logging to /var/log/lightdm/x-0.log
[+0.03s] DEBUG: Writing X server authority to /var/run/lightdm/root/:0
[+0.03s] DEBUG: Launching X Server
[+0.03s] DEBUG: Launching process 1094: /usr/bin/X :0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch -background none
[+0.03s] DEBUG: Waiting for ready signal from X server :0
[+0.03s] DEBUG: Acquired bus name org.freedesktop.DisplayManager
[+0.03s] DEBUG: Registering seat with bus path /org/freedesktop/DisplayManager/Seat0
[+3.55s] DEBUG: Got signal 10 from process 1094
[+3.55s] DEBUG: Got signal from X server :0
[+3.55s] DEBUG: Stopping Plymouth, X server is ready
[+3.57s] DEBUG: Connecting to XServer :0
[+3.58s] DEBUG: Starting greeter
[+3.58s] DEBUG: Started session 1182 with service 'lightdm', username 'lightdm'
[+5.24s] DEBUG: Session 1182 authentication complete with return value 0: Success
[+5.24s] DEBUG: Greeter authorized
[+5.24s] DEBUG: Logging to /var/log/lightdm/x-0-greeter.log
[+5.30s] DEBUG: Session 1182 running command /usr/lib/lightdm/lightdm-greeter-session /usr/sbin/unity-greeter
[+8.79s] DEBUG: Greeter connected version=1.2.3
[+8.79s] DEBUG: Greeter connected, display is ready
[+8.79s] DEBUG: New display ready, switching to it
[+8.79s] DEBUG: Activating VT 7
[+13.26s] DEBUG: Greeter start authentication for melissa
[+13.26s] DEBUG: Started session 1708 with service 'lightdm', username 'melissa'
[+13.28s] DEBUG: Session 1708 got 1 message(s) from PAM
[+13.28s] DEBUG: Prompt greeter with 1 message(s)
[+20.58s] DEBUG: Continue authentication
[+20.59s] DEBUG: Session 1708 authentication complete with return value 0: Success
[+20.59s] DEBUG: Authenticate result for user melissa: Success
[+20.59s] DEBUG: User melissa authorized
[+20.59s] DEBUG: Greeter requests session ubuntu-2d
[+20.59s] DEBUG: Using session ubuntu-2d
[+20.59s] DEBUG: Stopping greeter
[+20.59s] DEBUG: Session 1182: Sending SIGTERM
[+20.70s] DEBUG: Greeter closed communication channel
[+20.70s] DEBUG: Session 1182 exited with return value 0
[+20.70s] DEBUG: Greeter quit
[+20.71s] DEBUG: Dropping privileges to uid 1000
[+20.71s] DEBUG: Restoring privileges
[+20.71s] DEBUG: Dropping privileges to uid 1000
[+20.71s] DEBUG: Writing /home/melissa/.dmrc
[+20.75s] DEBUG: Restoring privileges
[+20.82s] DEBUG: Starting session ubuntu-2d as user melissa
[+20.82s] DEBUG: Session 1708 running command /usr/sbin/lightdm-session gnome-session --session=ubuntu-2d
[+20.85s] DEBUG: Registering session with bus path /org/freedesktop/DisplayManager/Session0
[+21.07s] DEBUG: Session 1708 exited with return value 0
[+21.07s] DEBUG: User session quit
[+21.07s] DEBUG: Stopping display
[+21.07s] DEBUG: Sending signal 15 to process 1094
[+21.22s] DEBUG: Process 1094 exited with return value 0
[+21.22s] DEBUG: X server stopped
[+21.22s] DEBUG: Removing X server authority /var/run/lightdm/root/:0
[+21.22s] DEBUG: Releasing VT 7
[+21.22s] DEBUG: Display server stopped
[+21.22s] DEBUG: Display stopped
[+21.22s] DEBUG: Active display stopped, switching to greeter
[+21.22s] DEBUG: Switching to greeter
[+21.22s] DEBUG: Starting new display for greeter
[+21.22s] DEBUG: Starting local X display
[+21.22s] DEBUG: Using VT 7
[+21.22s] DEBUG: Logging to /var/log/lightdm/x-0.log
[+21.22s] DEBUG: Writing X server authority to /var/run/lightdm/root/:0
[+21.22s] DEBUG: Launching X Server
[+21.22s] DEBUG: Launching process 1919: /usr/bin/X :0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
[+21.22s] DEBUG: Waiting for ready signal from X server :0
[+21.29s] DEBUG: Got signal 10 from process 1919
[+21.29s] DEBUG: Got signal from X server :0
[+21.29s] DEBUG: Connecting to XServer :0
[+21.29s] DEBUG: Starting greeter
[+21.29s] DEBUG: Started session 1924 with service 'lightdm', username 'lightdm'
[+21.30s] DEBUG: Session 1924 authentication complete with return value 0: Success
[+21.30s] DEBUG: Greeter authorized
[+21.30s] DEBUG: Logging to /var/log/lightdm/x-0-greeter.log
[+21.30s] DEBUG: Session 1924 running command /usr/lib/lightdm/lightdm-greeter-session /usr/sbin/unity-greeter
[+21.39s] DEBUG: Greeter connected version=1.2.3
[+21.39s] DEBUG: Greeter connected, display is ready
[+21.39s] DEBUG: New display ready, switching to it
[+21.39s] DEBUG: Activating VT 7
[+21.39s] DEBUG: Stopping greeter display being switched from
[+21.63s] DEBUG: Greeter start authentication for melissa
[+21.63s] DEBUG: Started session 1998 with service 'lightdm', username 'melissa'
[+21.63s] DEBUG: Session 1998 got 1 message(s) from PAM
[+21.63s] DEBUG: Prompt greeter with 1 message(s)

答案1

请按 Ctrl+Alt+F3 键并使用您的用户名和密码登录。在登录提示中输入:startx 您现在将获得一个图形用户界面。然后禁用您帐户的自动登录。然后创建新的用户帐户(如果需要)。保持自动登录禁用。

这可能是暂时的解决方案。但这样你就能让你的操作系统可用了。

相关内容