![ubuntu 12.04 登录返回登录](https://linux22.com/image/966661/ubuntu%2012.04%20%E7%99%BB%E5%BD%95%E8%BF%94%E5%9B%9E%E7%99%BB%E5%BD%95.png)
这不是分辨率问题,我用的是上网本,多年来一直运行良好,我没有 nvidia 显卡,来宾用户使用现有显卡就可以正常工作,添加新用户使用现有显卡也可以正常工作。
我已经尝试了解决方案中的所有答案,除了一个(创建新用户并复制所有内容,解决方法)。
我的戴尔笔记本上安装了 12.04。运行了很长时间,运行良好,在 12.04 之前,它运行的是自 2010 年中期以来的上一个 LTS ubuntu。一切都运行良好。
昨天无法从欢迎屏幕 lightdm 登录。登录名/密码被接受,但一秒钟左右后返回登录屏幕。
我可以正常登录访客会话,一切正常,Unity 运行良好,没有图形问题,一切正常。使用 ctrl/alt/F1 进入提示符并登录 CLI 也很好,可以看到 encryptfs 主目录中的所有文件,所以密码没问题。
因为新帐户和访客会话一切正常,所以我认为 Xorg.conf 没有问题。
我已删除了 .Xauthority,毫无乐趣。
我的主文件夹具有正确的权限 drwxr-xr-x 并且归我所有。
该壁纸归我所有,但所有人都可以阅读。
我的硬盘虽然已经满了,但仍然有超过 5GB 可用 df -h
我已经尝试过 sudo dpkg --configure -a;和 sudo apt-get update;我不想从 12.04 升级。
我没有 nvidia,所以不会尝试他们的驱动程序。现有驱动程序在新帐户上运行良好。
我不想遵循密码重置程序,因为密码不是问题,在 tty 上运行良好,并且当我尝试 gui 登录时没有出现无效密码消息。
我怀疑 gdm 出了问题,可能是以我自己的身份登录时出现了权限问题。这里是 :0-greeter.log
gnome-session[2146]: WARNING: Failed to start app: Unable to start application: Failed to execute child process "/usr/lib/at-spi/at-spi-registryd" (No such file or directory)
(gnome-settings-daemon:2152): color-plugin-WARNING **: failed to create directory on startup: Error creating directory: Permission denied
gnome-session[2146]: WARNING: Failed to start app: Unable to start application: Failed to execute child process "gnome-power-manager" (No such file or directory)
(gnome-settings-daemon:2152): color-plugin-WARNING **: failed to create profile from EDID data: Error creating directory: Permission denied
(gnome-settings-daemon:2152): color-plugin-WARNING **: failed to create profile from EDID data: Error creating directory: Permission denied
gdm-simple-greeter[2177]: Gtk-WARNING: Overriding tab label for notebook
gdm-simple-greeter[2177]: Gtk-WARNING: Overriding tab label for notebook
gdm-simple-greeter[2177]: Gtk-WARNING: Overriding tab label for notebook
gdm-simple-greeter[2177]: Gtk-WARNING: Overriding tab label for notebook
gdm-simple-greeter[2177]: Gtk-WARNING: Overriding tab label for notebook
gdm-simple-greeter[2177]: Gtk-WARNING: /build/buildd/gtk+3.0-3.4.2/./gtk/gtkwidget.c:7117: widget not within a GtkWindow
gdm-simple-greeter[2177]: Gtk-CRITICAL: gtk_widget_get_preferred_height_for_width: assertion `width >= 0' failed
gdm-simple-greeter[2177]: Gtk-CRITICAL: gtk_widget_get_preferred_height_for_width: assertion `width >= 0' failed
gdm-simple-greeter[2177]: Gtk-WARNING: gtk_widget_size_allocate(): attempt to allocate widget with width -47 and height -47
Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x1000007 (Login Wind)
Window manager warning: meta_window_activate called by a pager with a 0 timestamp; the pager needs to be fixed.
gdm-simple-greeter[2177]: Gtk-CRITICAL: gtk_widget_get_preferred_height_for_width: assertion `width >= 0' failed
gdm-simple-greeter[2177]: Gtk-CRITICAL: gtk_widget_get_preferred_height_for_width: assertion `width >= 0' failed
gdm-simple-greeter[2177]: Gtk-WARNING: gtk_widget_size_allocate(): attempt to allocate widget with width -47 and height -47
gdm-simple-greeter[2177]: CRITICAL: get_column_number: assertion `i < gtk_tree_view_get_n_columns (treeview)' failed
gdm-simple-greeter[2177]: CRITICAL: get_column_number: assertion `i < gtk_tree_view_get_n_columns (treeview)' failed
Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x1000007 (Login Wind)
Window manager warning: meta_window_activate called by a pager with a 0 timestamp; the pager needs to be fixed.
Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x1000007 (Login Wind)
Window manager warning: meta_window_activate called by a pager with a 0 timestamp; the pager needs to be fixed.
Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x1000007 (Login Wind)
Window manager warning: meta_window_activate called by a pager with a 0 timestamp; the pager needs to be fixed.
Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x1000007 (Login Wind)
Window manager warning: meta_window_activate called by a pager with a 0 timestamp; the pager needs to be fixed.
Window manager warning: CurrentTime used to choose focus window; focus window may not be correct.
Window manager warning: Got a request to focus the no_focus_window with a timestamp of 0. This shouldn't happen!
** (gnome-settings-daemon:2152): WARNING **: Name taken or bus went away - shutting down
g_dbus_connection_real_closed: Remote peer vanished with error: Underlying GIOStream returned 0 bytes on an async read (g-io-error-quark, 0). Exiting.
gdm-simple-greeter[2177]: Gdk-WARNING: gdm-simple-greeter: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.
(gnome-settings-daemon:2152): libappindicator-WARNING **: Unable to send signal for NewStatus: The connection is closed
(gnome-settings-daemon:2152): Gdk-WARNING **: gnome-settings-daemon: Fatal IO error 0 (Success) on X server :0.
以下是 lightdm.log 中的一段
[+11.23s] DEBUG: Started session 1830 with service 'lightdm', username 'chris'
[+11.25s] DEBUG: Session 1830 got 1 message(s) from PAM
[+11.25s] DEBUG: Prompt greeter with 1 message(s)
[+13.58s] DEBUG: Continue authentication
[+18.58s] DEBUG: Session 1830 authentication complete with return value 0: Success
[+18.58s] DEBUG: Authenticate result for user chris: Success
[+18.62s] DEBUG: User chris authorized
[+18.64s] DEBUG: Greeter requests session ubuntu-2d
[+18.64s] DEBUG: Using session ubuntu-2d
[+18.64s] DEBUG: Stopping greeter
[+18.64s] DEBUG: Session 1168: Sending SIGTERM
[+18.77s] DEBUG: Session 1168 exited with return value 0
[+18.77s] DEBUG: Greeter quit
[+18.82s] DEBUG: Dropping privileges to uid 1000
[+18.82s] DEBUG: Restoring privileges
[+18.89s] DEBUG: Dropping privileges to uid 1000
[+18.89s] DEBUG: Writing /home/chris/.dmrc
[+18.89s] DEBUG: Restoring privileges
[+18.98s] DEBUG: Starting session ubuntu-2d as user chris
[+18.98s] DEBUG: Session 1830 running command /usr/sbin/lightdm-session gnome-session --session=ubuntu-2d
[+19.12s] DEBUG: Registering session with bus path /org/freedesktop/DisplayManager/Session0
[+19.12s] DEBUG: Greeter closed communication channel
[+22.35s] DEBUG: Session 1830 exited with return value 0
[+22.35s] DEBUG: User session quit
[+22.35s] DEBUG: Stopping display
19 秒左右的时间引起了我的兴趣,Ubuntu-2d 会话启动然后迅速退出。
这是 /var/log/lightgm/x-0-greeter.log
Activating service name='org.a11y.atspi.Registry'
[+0.00s] DEBUG: unity-greeter.vala:895: Starting unity-greeter 0.2.9 UID=118 LANG=en_GB.UTF-8
[+0.00s] DEBUG: unity-greeter.vala:898: Setting cursor
[+0.00s] DEBUG: unity-greeter.vala:902: Creating background surface
[+0.00s] DEBUG: unity-greeter.vala:905: Loading command line options
[+0.00s] DEBUG: unity-greeter.vala:933: Setting GTK+ settings
Successfully activated service 'org.a11y.atspi.Registry'
** (at-spi2-registryd:1979): WARNING **: Failed to register client: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files
** (at-spi2-registryd:1979): WARNING **: Unable to register client with session manager
[+0.16s] DEBUG: unity-greeter.vala:956: Creating Unity Greeter
[+0.16s] DEBUG: Connecting to display manager...
[+0.16s] DEBUG: Wrote 17 bytes to daemon
[+0.16s] DEBUG: Read 8 bytes from daemon
[+0.16s] DEBUG: Read 120 bytes from daemon
[+0.16s] DEBUG: Connected version=1.2.3 default-session=ubuntu show-manual-login=false hide-users=false has-guest-account=true
[+0.45s] DEBUG: menubar.vala:318: LANG=en_GB.UTF-8 LANGUAGE=(null)
[+0.49s] CRITICAL: g_error_free: assertion `error != NULL' failed
[+0.51s] DEBUG: get entries
[+0.51s] DEBUG: menubar.vala:511: Adding indicator object 0x84d41ec at position 0
[+0.53s] DEBUG: Evaluating bitmask for '%H:%M'
[+0.53s] DEBUG: Checking against 1 possible times
[+0.57s] DEBUG: Guessing max time width: 36
[+0.57s] DEBUG: get entries
[+0.57s] DEBUG: menubar.vala:511: Adding indicator object 0x853101c at position 1
[+0.58s] WARNING: IndicatorObject class does not have an accessible description.
[+0.62s] WARNING: IndicatorObject class does not have an accessible description.
[+0.62s] DEBUG: get entries
[+0.62s] DEBUG: get entries
[+0.62s] DEBUG: menubar.vala:511: Adding indicator object 0x844cd2c at position 2
[+0.62s] DEBUG: menubar.vala:335: LANG=en_GB.UTF-8 LANGUAGE=(null)
[+0.66s] DEBUG: Loaded session /usr/share/xsessions/ubuntu-2d.desktop (Ubuntu 2D, This session logs you into Ubuntu 2D Mode)
[+0.66s] DEBUG: Ignoring session /usr/share/xsessions/gnome-shell.desktop
[+0.66s] DEBUG: Loaded session /usr/share/xsessions/xterm.desktop (Recovery Console, Failsafe session with only xterm)
[+0.66s] DEBUG: Loaded session /usr/share/xsessions/ubuntu.desktop (Ubuntu, This session logs you into Ubuntu)
[+0.66s] DEBUG: Ignoring session /usr/share/xsessions/gnome.desktop
[+0.66s] DEBUG: Loaded session /usr/share/xsessions/xsession.desktop (User Defined Session, Custom ~/.xsession script)
[+0.66s] DEBUG: session-chooser.vala:42: Adding session xterm (Recovery Console)
[+0.67s] DEBUG: session-chooser.vala:42: Adding session ubuntu (Ubuntu)
[+0.67s] DEBUG: session-chooser.vala:42: Adding session ubuntu-2d (Ubuntu 2D)
[+0.67s] DEBUG: session-chooser.vala:42: Adding session xsession (User Defined Session)
[+1.38s] DEBUG: Setting keyboard layout to 'gb'
[+1.49s] DEBUG: main-window.vala:98: Screen is 800x600 pixels
[+1.49s] DEBUG: main-window.vala:104: Monitor 0 is 800x600 pixels at 0,0
[+1.49s] DEBUG: main-window.vala:104: Monitor 1 is 800x600 pixels at 0,0
[+1.51s] DEBUG: Loading users from org.freedesktop.Accounts
[+1.51s] DEBUG: Loading user /org/freedesktop/Accounts/User1000
[+1.57s] DEBUG: Loading user /org/freedesktop/Accounts/User1001
[+1.65s] DEBUG: Loading sessions from org.freedesktop.DisplayManager
[+1.65s] DEBUG: unity-greeter.vala:332: Adding/updating user chris (chris)
[+1.65s] DEBUG: unity-greeter.vala:332: Adding/updating user guest (guest)
[+1.65s] DEBUG: unity-greeter.vala:189: Adding guest account entry
[+1.70s] DEBUG: Starting authentication for user chris...
[+1.70s] DEBUG: Wrote 21 bytes to daemon
[+1.70s] DEBUG: unity-greeter.vala:959: Showing greeter
[+1.70s] DEBUG: unity-greeter.vala:357: Showing main window
[+1.71s] DEBUG: New style for time label
[+1.72s] DEBUG: Evaluating bitmask for '%H:%M'
[+1.72s] DEBUG: Checking against 1 possible times
[+1.72s] DEBUG: Guessing max time width: 36
[+1.77s] DEBUG: background.vala:315: Regenerating backgrounds
[+1.77s] DEBUG: background.vala:67: Making background /usr/share/backgrounds/warty-final-ubuntu.png at 800x600
[+1.78s] DEBUG: New style for time label
[+1.78s] DEBUG: Evaluating bitmask for '%H:%M'
[+1.78s] DEBUG: Checking against 1 possible times
[+1.78s] DEBUG: Guessing max time width: 36
[+1.79s] DEBUG: unity-greeter.vala:972: Starting main loop
[+1.79s] DEBUG: Read 8 bytes from daemon
[+1.79s] DEBUG: Read 35 bytes from daemon
[+1.79s] DEBUG: Prompt user with 1 message(s)
[+2.04s] DEBUG: background.vala:67: Making background /home/chris/Pictures/steelEnds.JPG at 800x600
[+2.04s] DEBUG: background.vala:144: Error loading background: Failed to open file '/home/chris/Pictures/steelEnds.JPG': Permission denied
[+2.07s] DEBUG: Num devices: '2'
[+2.07s] DEBUG: get_primary_device: got data from object /org/freedesktop/UPower/devices/line_power_ACAD
[+2.07s] DEBUG: get_primary_device: got data from object /org/freedesktop/UPower/devices/battery_BAT1
[+2.07s] DEBUG: put_primary_device: got data from object /org/freedesktop/UPower/devices/battery_BAT1
[+2.07s] DEBUG: set_accessible_desc: setting accessible description to 'Battery (charged)'
[+2.07s] DEBUG: Num devices: '2'
[+2.07s] DEBUG: menu_add_device: got data from object /org/freedesktop/UPower/devices/line_power_ACAD
[+2.07s] DEBUG: menu_add_device: got data from object /org/freedesktop/UPower/devices/battery_BAT1
[+2.08s] DEBUG: icon_policy is: 0 (present==0, charge==1, never==2)
[+2.08s] DEBUG: count_batteries found 1 batteries (0 are charging/discharging)
[+2.08s] DEBUG: should_be_visible: yes
[+2.08s] DEBUG: refresh_entry_accessible_desc: setting entry 0x844ccd4 accessible description to 'Battery (charged)'
[+2.08s] DEBUG: get entries
[+2.08s] DEBUG: get entries
[+2.08s] DEBUG: get entries
[+2.08s] DEBUG: menubar.vala:511: Adding indicator object 0x844ccd4 at position 2
[+2.09s] WARNING: Getting layout failed: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface `com.canonical.dbusmenu' on object at path /com/canonical/indicator/users/menu
[+2.16s] DEBUG: Setting keyboard layout to 'gb'
[+2.33s] DEBUG: notify visible signal received
[+2.33s] CRITICAL: ido_calendar_menu_item_set_date: assertion `IDO_IS_CALENDAR_MENU_ITEM(menuitem)' failed
[+2.35s] DEBUG: New calendar item
[+2.37s] DEBUG: indicator-sound: new_volume_slider_widget
[+2.39s] DEBUG: indicator-sound: new_voip_slider_widget
[+2.50s] DEBUG: unity-greeter.vala:315: starting system-ready sound
[+2.60s] DEBUG: background.vala:116: Render of background /home/chris/Pictures/steelEnds.JPG complete
[+2.60s] CRITICAL: background_loader_create_pattern: assertion `image != NULL' failed
[+2.62s] DEBUG: background.vala:116: Render of background /usr/share/backgrounds/warty-final-ubuntu.png complete
谢谢 nerof61 尝试了 sudo chown -R chris:chris /home/chris
一些错误
chown: changing ownership of '/home/chris/.cache/compizconfig-1/staticswitcher.pb ': Input/output error
chown: changing ownership of '/home/chris/compiz-1/session/10d1c......... ': Input/output error
登录仍然有同样的问题,没有任何变化。
查看这两个文件,它们都归 chris:chris 所有,长度为 0 字节,并且都是在两天前机器最后一次正常工作时最后修改的。我会考虑一下,也许我应该重新安装 compiz。
我一直在考虑 X 的问题。检查了 /hoe/chris/.xsession-errors,对我没有太大的帮助,希望有人能给我指明正确的方向?
openConnection: connect: No such file or directory
cannot connect to br1tty at: 0
/home/chris/gnupg/gpg-agent-info-chris-laptop: Syntax error. '(' unexpected
当我找到更多时将添加更多。
我尝试从 tty 添加用户 john。完成后,我重新启动并尝试登录,即使是 john 也遇到了同样的问题,密码被接受,然后几乎立即返回登录屏幕。不过,我仍然可以正常使用访客会话,使用 ctrl/alt/F1 也没有问题
稍后。我注意到新用户 john 的主目录归 root 所有。使用 sudo chown john:john john 我更改了主目录的所有权。现在我可以像 john 一样正常登录,因此取得了一些进展。
我真的很难解决这个问题,任何帮助我都深表感谢。
答案1
登录到 TTY(我建议使用 TTY1,即CTRL+ ALT+ F1)并输入以下内容:
sudo chown -R YOURUSERNAME:YOURUSERNAME /home/YOURUSERNAME/
显然,您需要YOURUSERNAME
用您的用户名来替换。
然后,返回登录屏幕并登录。
希望这可以帮助!!!