登录循环 - 无法运行统一 - 不是 Xauthority 所有权,但可能与显示有关?

Mar*_*tin 12 unity login lightdm

所有,我试图让 VNC 工作,做了很多我现在不记得的更改,当我在重新启动后发现我无法登录到 Ubuntu 14.04 时。我相信我的身份验证没问题,但返回到登录屏幕。我可以以访客身份并通过 Alt-F1 控制台登录。

我在谷歌上搜索了错误并尝试了很多东西,但没有成功,现在一无所知。请参阅下面的输出。请注意,XFCE 确实加载正常,但我想取回我的 lightdm。

我真的可以对这里发生的事情提出一些建议和解释。问候马丁

-rwxr-xr-x 1 martin martin 50 Mar 14 22:13 .Xauthority*(我在授予此文件的权限时有点过分了 - 以防万一。)

martin@thrio:~$ cat .xsession-errors
ibus 脚本从 run_im 开始。
在 run_im 启动自动脚本。
默认脚本从 run_im 开始。
init:gnome-session (Unity) 主进程 (2745) 以状态 1 终止
init:与通知的 D-Bus 总线断开连接
init:logrotate 主进程 (2596) 被 TERM 信号杀死
init:update-notifier-crash (/var/crash) /_usr_lib_ibus_ibus-ui-gtk3.1000.crash)主处理>(2645)由TERM信号杀死
INIT:更新通知程序崩溃(/var/crash/_usr_lib_unity_unity-panel-service.1000.crash)主>处理(2646)被 TERM 信号
init杀死:upstart-dbus-session-bridge 主进程 (2697) 以状态 1 终止
init: xsession-init 主进程 (2705) 被 TERM 信号杀死
init: hud 主进程 (2715) 被 TERM 信号杀死
init: unity-panel-service 主进程 (2753) 被 TERM 信号杀死
init: window-stack-bridge main进程 (2620) 被 KILL 信号杀死

martin@thrio:~$ unity --replace
stop: Unknown job: unity-panel-service
start: Unknown job: unity-panel-service
compiz (core) - 信息:加载插件:core
compiz (core) - 信息:启动插件:核心
无效的MIT-MAGIC-COOKIE-1 keycompiz(核心)-致命:无法打开显示:0
compiz(核心)-信息:停止插件:核心
compiz(核心)-信息:卸载插件:核心

它可能与显示设置有关:我最初试图让 VNC 工作并试图关闭似乎不起作用的默认加密以及我试图遵循的一些与显示相关的说明

来自 /var/log/lightdm/lightdm.log

[+522.72s] DEBUG: Session pid=2785: Authenticate result for user martin: Success  
[+522.72s] DEBUG: Session pid=2785: User martin authorized  
[+522.72s] DEBUG: Session pid=2785: Greeter requests session Ubuntu  
522.72s] DEBUG: Seat: Stopping greeter; display server will be re-used for user session  
[+522.72s] DEBUG: Session pid=2785: Sending SIGTERM  
[+522.73s] DEBUG: Session pid=2785: Exited with return value 0  
[+522.73s] DEBUG: Seat: Session stopped  
[+522.73s] DEBUG: Seat: Greeter stopped, running session  
[+522.73s] DEBUG: Registering session with bus path /org/freedesktop/DisplayManager/Session1  
[+522.73s] DEBUG: Session pid=2845: Running command /usr/sbin/lightdm-session gnome-session   --session=Ubuntu  
[+522.73s] DEBUG: Creating shared data directory /var/lib/lightdm-data/martin  
[+522.73s] DEBUG: Session pid=2845: Logging to .xsession-errors  
[+522.74s] DEBUG: Activating VT 7  
[+522.74s] DEBUG: Activating login1 session c4  
[+524.24s] DEBUG: User /org/freedesktop/Accounts/User1000 changed  
[+528.25s] DEBUG: Session pid=2845: Exited with return value 0  
[+528.25s] DEBUG: Seat: Session stopped  
[+528.25s] DEBUG: Seat: Stopping display server, no sessions require it  
[+528.25s] DEBUG: Sending signal 15 to process 2778  
[+528.36s] DEBUG: Process 2778 exited with return value 0  
[+528.36s] DEBUG: DisplayServer x-0: X server stopped  
[+528.36s] DEBUG: Releasing VT 7  
[+528.36s] DEBUG: DisplayServer x-0: Removing X server authority /var/run/lightdm/root/:0  
[+528.36s] DEBUG: Seat: Display server stopped  
[+528.36s] DEBUG: Seat: Active display server stopped, starting greeter  
[+528.36s] DEBUG: Seat: Creating greeter session  
[+528.36s] DEBUG: Seat: Creating display server of type x  
[+528.36s] DEBUG: Using VT 7  
[+528.36s] DEBUG: Seat: Starting local X display on VT 7  
[+528.36s] DEBUG: DisplayServer x-0: Logging to /var/log/lightdm/x-0.log  
[+528.36s] DEBUG: DisplayServer x-0: Writing X server authority to /var/run/lightdm/root/:0  
[+528.36s] DEBUG: DisplayServer x-0: Launching X Server  
[+528.36s] DEBUG: Launching process 3516: /usr/bin/X -core :0 -seat seat0   -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch  
[+528.36s] DEBUG: DisplayServer x-0: Waiting for ready signal from X server :0  
[+528.43s] DEBUG: Got signal 10 from process 3516  
[+528.43s] DEBUG: DisplayServer x-0: Got signal from X server :0  
[+528.43s] DEBUG: DisplayServer x-0: Connecting to XServer :0  
[+528.43s] DEBUG: Seat: Display server ready, starting session authentication  
[+528.43s] DEBUG: Session pid=3523: Started with service 'lightdm-greeter', username 'lightdm'  
[+528.44s] DEBUG: Session pid=3523: Authentication complete with return value 0: Success  
[+528.44s] DEBUG: Seat: Session authenticated, running command  
[+528.44s] DEBUG: Session pid=3523: Running command /usr/lib/lightdm/lightdm-greeter-  session /usr/sbin/unity-greeter  
[+528.44s] DEBUG: Creating shared data directory /var/lib/lightdm-data/lightdm  
[+528.44s] DEBUG: Session pid=3523: Logging to /var/log/lightdm/x-0-greeter.log  
[+528.45s] DEBUG: Activating VT 7  
[+528.45s] DEBUG: Activating login1 session c5  
[+528.57s] DEBUG: Session pid=3523: Greeter connected version=1.10.4  
[+528.69s] DEBUG: Session pid=3523: Greeter start authentication for martin  
[+528.69s] DEBUG: Session pid=3583: Started with service 'lightdm', username 'martin'  
[+528.70s] DEBUG: Session pid=3583: Got 1 message(s) from PAM  
[+528.70s] DEBUG: Session pid=3523: Prompt greeter with 1 message(s)  
[+529.73s] DEBUG: User /org/freedesktop/Accounts/User1000 changed  

martin@thrio:~$ uname -r  
3.13.0-46-generic  
martin@thrio:~$ lsmod|grep fglrx  
martin@thrio:~$   

martin@thrio:/var/log$ lshw -c video  
WARNING: you should run this program as super-user.  
  *-display              
       description: VGA compatible controller  
       product: Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller  
       vendor: Intel Corporation  
       physical id: 2  
       bus info: pci@0000:00:02.0  
       version: 06  
       width: 64 bits  
       clock: 33MHz  
       capabilities: vga_controller bus_master cap_list rom  
       configuration: driver=i915 latency=0  
       resources: irq:48 memory:f7400000-f77fffff memory:e0000000-efffffff ioport:f000  (size=64)  
WARNING: output may be incomplete or inaccurate, you should run this program as super-user.  
martin@thrio:/var/log$ modinfo  
modinfo: ERROR: missing module or filename.  
Run Code Online (Sandbox Code Playgroud)

审查后的其他信息

“你安装了一些驱动程序吗?你能从某个 TTY (Ctrl+Alt+F1..F6) 与任何用户连接吗? 没有驱动程序 - 是 TTY 登录

“将那里的所有文件移动到我的 /home 目录(有一个副本)并尝试使用 kdm 登录(我使用 Kubuntu)。要选择 kdm 作为登录屏幕,我执行了 sudo dpkg-reconfigure lightdm 并选择了 kdm。使用 kdm,您可以选择上一个会话或默认会话。这是要走的路。”

安装 KDM (sudo apt-get install KDM) - 在安装过程中,我可以选择 KDM 或 lightDM,选择了 lightDM。重新启动 - 没有变化
将主目录 /home/martin 移动到 /home/martinbak 并重新启动 - 没有变化

martin@thrio:~$ sudo dpkg-reconfigure kdm and rebooted - entered KDM shell - error "cannot enter home directory. using /." - still would not log in .  
martin@thrio:~$ sudo dpkg-reconfigure lightdm and switched back to lightdm - rebooted - same login loop  
martin@thrio:/home$ sudo mv martinbak martin and rebooted.  
Run Code Online (Sandbox Code Playgroud)

Chown .Xauthority - 之前检查过并且是正确的
Chown /tmp - 之前检查过并且是正确的
“如果两者都不是,我建议您
1.dpkg-reconfigure lightdm
2. 或卸载,重新安装它。”

dpkg-reconfigure 已经尝试过
martin@thrio:~$ sudo apt-get purge lightdm
"Removing lightdm (1.10.4-0ubuntu2) ... Purging
configuration files for lightdm (1.10.4-0ubuntu2) ...
Removing user lightdm'没有更多成员。 **userdel: user lightdm 当前被进程 2092 /usr/sbin/deluser: `/usr/sbin/userdel lightdm' 返回错误代码 8. Exiting. dpkg: error processing package lightdm (--purge ): 子进程安装后删除脚本返回错误退出状态 1 处理 man-db (2.6.7.1-1ubuntu1) 触发器... 处理时遇到错误: lightdmlightdm' ...
Warning: group








E: 子进程 /usr/bin/dpkg 返回错误代码 (1)" ** martin@thrio:~$ sudo apt-get install lightdm

它看起来不像是干净的移除和重新安装。

“在几乎放弃之后,我查看了 .xsession-errors 并注意到我的 .profile 中有一个错字”

我没有编辑过这个文件,但如果有问题,我不知道我在找什么。

`martin@thrio:~$ 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  
martin@thrio:~$ ` 

_sudo mv ~/.Xauthority ~/.Xauthority.backup  
sudo service lightdm restart_  

martin@thrio:~$ mv ~/.Xauthority ~/.Xauthority.bak  
martin@thrio:~$ sudo service lightdm restart  
[sudo] password for martin:  
lightdm stop/waiting  
lightdm start/running, process 3032  
martin@thrio:~$  
Run Code Online (Sandbox Code Playgroud)

仍然卡在登录循环中

“重新安装了 xubuntu-desktop,现在已修复”

martin@thrio:~$ sudo apt-get purge xubuntu-desktop  
Reading package lists... Done  
Building dependency tree  
Reading state information... Done  
Package 'xubuntu-desktop' is not installed, so not removed  
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.  
martin@thrio:~$  
Run Code Online (Sandbox Code Playgroud)

_"然后,输入 sudo apt-get install gdm 。让它安装并输入 sudo dpkg-reconfigure gdm 并按照提示将其设置为您的登录管理器。
按 Ctrl + Alt+ F7 返回登录屏幕,现在应该看起来不同。登录是否有效?如果有效,您的问题就解决了!

如果没有,请返回全屏终端并键入 sudo dpkg-reconfigure lightdm 以再次将 LigthDM 设置为登录管理器。现在您知道这肯定是您的图形驱动程序的问题。”_

sudo apt-get install gdm并重新启动 - 登录循环。(所以这表明图形驱动程序有问题 - 回想一下我有

martin@thrio:~$ lsmod|grep fglrx  
martin@thrio:~$  
Run Code Online (Sandbox Code Playgroud)

我应该为此搜索获得一些输出吗?

iam*_*ind 2

尽管您已经在问题中给出了答案,但还是写下此文以供记录。在命令提示符处输入ctrl + alt + F1您的用户名并登录。

user@dell$ ls -l ~/.ICEauthority
-rw------- root root 3668 May 28 09:28 /home/user/.ICEauthority
user@dell$ sudo chmod 777 ~/.ICEauthority
password:
user@dell$ ls -l ~/.ICEauthority
-rwxrwxrwx root root 3668 May 28 09:28 /home/user/.ICEauthority
Run Code Online (Sandbox Code Playgroud)

ctrl + alt + F7并登录成功。


小智 0

我的 .xsession-errors 具有与原始问题中列出的类似错误。我也尝试了@Martin 尝试过的几乎所有方法。

Finally what worked for me was the answer from the link lightdm doesn't start, which basically involves stopping lightdm, reconfiguring xserver, starting lightdm and then rebooting the machine. After this I was able to login to my original user account.

FYI: I have a Lenovo T530 machine running Ubuntu 14.04 LTS (using lightdm) and I have nvidia drivers installed for Cuda 6.5 use.