Lightdm 显示正常,但输入密码并单击登录后,我看到屏幕闪烁,lightdm 窗口重新出现并要求登录,就像什么都没发生一样。
配置
用户@laptop:~$ cat /etc/lightdm/
lightdm.conf lightdm-gtk-greeter-ubuntu.conf
lightdm-gtk-greeter.conf users.conf
lightdm.conf
user@laptop:~$ cat /etc/lightdm/lightdm.conf
#[LightDM]
#xsessions-directory=/usr/share/xsessions
[SeatDefaults]
user-session=xfce
greeter-session=lightdm-gtk-greeter
greeter-hide-users=true
lightdm-gtk-greeter.conf
user@laptop:~$ cat /etc/lightdm/lightdm-gtk-greeter.conf
#
# background = Background file to use, either an image path or a color (e.g. #772953)
# theme-name = GTK+ theme to use
# font-name = Font to use
# xft-antialias = Whether to antialias Xft fonts (true or false)
# xft-dpi = Resolution for Xft in dots per inch (e.g. 96)
# xft-hintstyle = What degree of hinting to use (hintnone, hintslight, hintmedium, or hintfull)
# xft-rgba = Type of subpixel antialiasing (none, rgb, bgr, vrgb or vbgr)
#
[greeter]
logo=/usr/share/pixmaps/xubuntu-logo-menu.png
background=/usr/share/xfce4/backdrops/xubuntu-karmic.png
#show-language-selector=false
theme-name=retro1
font-name=Droid Sans 10
xft-antialias=true
#xft-dpi=
xft-hintstyle=hintfull
xft-rgba=rgb
show-language-selector=true
lightdm-gtk-greeter-ubuntu.conf
user@laptop:~$ cat /etc/lightdm/lightdm-gtk-greeter-ubuntu.conf
#
# background = Background file to use, either an image path or a color (e.g. #772953)
# theme-name = GTK+ theme to use
# font-name = Font to use
# xft-antialias = Whether to antialias Xft fonts (true or false)
# xft-dpi = Resolution for Xft in dots per inch (e.g. 96)
# xft-hintstyle = What degree of hinting to use (hintnone, hintslight, hintmedium, or hintfull)
# xft-rgba = Type of subpixel antialiasing (none, rgb, bgr, vrgb or vbgr)
#
[greeter]
logo=/usr/share/pixmaps/xubuntu-logo-menu.png
background=/usr/share/xfce4/backdrops/xubuntu-karmic.png
#show-language-selector=false
theme-name=retro1
font-name=Droid Sans 10
xft-antialias=true
#xft-dpi=
xft-hintstyle=hintfull
xft-rgba=rgb
show-language-selector=true
用户配置文件
user@laptop:~$ cat /etc/lightdm/users.conf
#
# User accounts configuration
#
# NOTE: If you have AccountsService installed on your system, then LightDM will
# use this instead and these settings will be ignored
#
# minimum-uid = Minimum UID required to be shown in greeter
# hidden-users = Users that are not shown to the user
# hidden-shells = Shells that indicate a user cannot login
#
[UserAccounts]
minimum-uid=500
hidden-users=nobody nobody4 noaccess
hidden-shells=/bin/false /usr/sbin/nologin
日志
user@laptop:~$ cat /var/log/lightdm/
lightdm.log x-0-greeter.log.old x-1-greeter.log x-1.log
x-0-greeter.log x-0.log x-1-greeter.log.old
user@laptop:~$ cat /var/log/lightdm/lightdm.log
cat: /var/log/lightdm/lightdm.log: Permission denied
user@laptop:~$ sudo cat /var/log/lightdm/lightdm.log
[sudo] password for user:
[+0.00s] DEBUG: Logging to /var/log/lightdm/lightdm.log
[+0.00s] DEBUG: Starting Light Display Manager 1.2.1, UID=0 PID=2677
[+0.00s] DEBUG: Loaded 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: Using VT 7
[+0.00s] DEBUG: Activating VT 7
[+0.01s] DEBUG: Logging to /var/log/lightdm/x-0.log
[+0.01s] DEBUG: Writing X server authority to /var/run/lightdm/root/:0
[+0.01s] DEBUG: Launching X Server
[+0.01s] DEBUG: Launching process 2683: /usr/bin/X :0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
[+0.01s] DEBUG: Waiting for ready signal from X server :0
[+0.01s] DEBUG: Acquired bus name org.freedesktop.DisplayManager
[+0.01s] DEBUG: Registering seat with bus path /org/freedesktop/DisplayManager/Seat0
[+0.91s] DEBUG: Got signal 10 from process 2683
[+0.91s] DEBUG: Got signal from X server :0
[+0.91s] DEBUG: Connecting to XServer :0
[+0.91s] DEBUG: Starting greeter
[+0.91s] DEBUG: Started session 2688 with service 'lightdm', username 'lightdm'
[+0.94s] DEBUG: Session 2688 authentication complete with return value 0: Success
[+0.94s] DEBUG: Greeter authorized
[+0.94s] DEBUG: Logging to /var/log/lightdm/x-0-greeter.log
[+0.94s] DEBUG: Session 2688 running command /usr/lib/lightdm/lightdm-greeter-session /usr/sbin/lightdm-gtk-greeter
[+1.12s] DEBUG: Greeter connected version=1.2.1
[+1.12s] DEBUG: Greeter connected, display is ready
[+1.12s] DEBUG: New display ready, switching to it
[+1.12s] DEBUG: Activating VT 7
[+1.45s] DEBUG: Greeter start authentication
[+1.45s] DEBUG: Started session 2733 with service 'lightdm', username '(null)'
[+1.46s] DEBUG: Session 2733 got 1 message(s) from PAM
[+1.46s] DEBUG: Prompt greeter with 1 message(s)
[+2.98s] DEBUG: Continue authentication
[+2.99s] DEBUG: Session 2733 got 1 message(s) from PAM
[+2.99s] DEBUG: Prompt greeter with 1 message(s)
[+8.36s] DEBUG: Continue authentication
[+8.41s] DEBUG: Session 2733 authentication complete with return value 0: Success
[+8.41s] DEBUG: Authenticate result for user user: Success
[+8.42s] DEBUG: User user authorized
[+8.42s] DEBUG: Greeter requests session xfce
[+8.42s] DEBUG: Using session xfce
[+8.42s] DEBUG: Stopping greeter
[+8.42s] DEBUG: Session 2688: Sending SIGTERM
[+8.46s] DEBUG: Session 2688 exited with return value 0
[+8.46s] DEBUG: Greeter quit
[+8.47s] DEBUG: Dropping privileges to uid 1001
[+8.47s] DEBUG: Restoring privileges
[+8.47s] DEBUG: Dropping privileges to uid 1001
[+8.47s] DEBUG: Writing /home/user/.dmrc
[+8.54s] DEBUG: Restoring privileges
[+8.58s] DEBUG: Starting session xfce as user user
[+8.58s] DEBUG: Session 2733 running command /usr/sbin/lightdm-session startxfce4
[+8.60s] DEBUG: Registering session with bus path /org/freedesktop/DisplayManager/Session0
[+8.60s] DEBUG: Greeter closed communication channel
[+8.60s] DEBUG: Session 2733 exited with return value 1
[+8.60s] DEBUG: User session quit
[+8.60s] DEBUG: Stopping display
[+8.60s] DEBUG: Sending signal 15 to process 2683
[+8.77s] DEBUG: Process 2683 exited with return value 0
[+8.77s] DEBUG: X server stopped
[+8.77s] DEBUG: Removing X server authority /var/run/lightdm/root/:0
[+8.77s] DEBUG: Releasing VT 7
[+8.77s] DEBUG: Display server stopped
[+8.77s] DEBUG: Display stopped
[+8.77s] DEBUG: Active display stopped, switching to greeter
[+8.77s] DEBUG: Switching to greeter
[+8.77s] DEBUG: Starting new display for greeter
[+8.77s] DEBUG: Starting local X display
[+8.77s] DEBUG: Using VT 7
[+8.77s] DEBUG: Logging to /var/log/lightdm/x-0.log
[+8.77s] DEBUG: Writing X server authority to /var/run/lightdm/root/:0
[+8.77s] DEBUG: Launching X Server
[+8.77s] DEBUG: Launching process 2764: /usr/bin/X :0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
[+8.77s] DEBUG: Waiting for ready signal from X server :0
[+9.68s] DEBUG: Got signal 10 from process 2764
[+9.68s] DEBUG: Got signal from X server :0
[+9.68s] DEBUG: Connecting to XServer :0
[+9.68s] DEBUG: Starting greeter
[+9.68s] DEBUG: Started session 2769 with service 'lightdm', username 'lightdm'
[+9.70s] DEBUG: Session 2769 authentication complete with return value 0: Success
[+9.71s] DEBUG: Greeter authorized
[+9.71s] DEBUG: Logging to /var/log/lightdm/x-0-greeter.log
[+9.71s] DEBUG: Session 2769 running command /usr/lib/lightdm/lightdm-greeter-session /usr/sbin/lightdm-gtk-greeter
[+9.87s] DEBUG: Greeter connected version=1.2.1
[+9.87s] DEBUG: Greeter connected, display is ready
[+9.87s] DEBUG: New display ready, switching to it
[+9.87s] DEBUG: Activating VT 7
[+9.87s] DEBUG: Stopping greeter display being switched from
[+10.20s] DEBUG: Greeter start authentication
[+10.20s] DEBUG: Started session 2814 with service 'lightdm', username '(null)'
[+10.20s] DEBUG: Session 2814 got 1 message(s) from PAM
[+10.20s] DEBUG: Prompt greeter with 1 message(s)
[+110.97s] DEBUG: Got signal 15 from process 1
[+110.97s] DEBUG: Caught Terminated signal, shutting down
[+110.97s] DEBUG: Stopping display manager
[+110.97s] DEBUG: Stopping seat
[+110.97s] DEBUG: Stopping display
[+110.97s] DEBUG: Session 2769: Sending SIGTERM
[+110.97s] DEBUG: Session 2814 terminated with signal 15
[+110.97s] DEBUG: Session 2814 failed during authentication
[+110.97s] DEBUG: Authenticate result for user (null): Authentication stopped before completion
[+111.04s] DEBUG: Session 2769 exited with return value 15
[+111.04s] DEBUG: Greeter quit
[+111.04s] DEBUG: Sending signal 15 to process 2764
[+111.06s] DEBUG: Process 2764 exited with return value 0
[+111.06s] DEBUG: X server stopped
[+111.06s] DEBUG: Removing X server authority /var/run/lightdm/root/:0
[+111.06s] DEBUG: Releasing VT 7
[+111.06s] DEBUG: Display server stopped
[+111.06s] DEBUG: Display stopped
[+111.06s] DEBUG: Seat stopped
[+111.06s] DEBUG: Display manager stopped
[+111.06s] DEBUG: Stopping daemon
[+111.06s] DEBUG: Exiting with return value 0
已安装的软件包
网络搜索建议我需要安装其他软件包,例如 lightdm-gtk-greeter,但我已经安装了它。
user@laptop:~$ sudo dpkg -l lightdm*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-===========================-===========================-======================================================================
ii lightdm 1.2.1-0ubuntu1.1 Display Manager
un lightdm-greeter <none> (no description available)
un lightdm-greeter-example-gtk <none> (no description available)
ii lightdm-gtk-greeter 1.1.5-0ubuntu1 LightDM GTK+ Greeter
un lightdm-gtk-greeter-config <none> (no description available)
user@laptop:~$
Unity-greeter 解决方案(不是我想要的)
错误 850941,错误 804171建议将 unity-greeter 与 lightdm 一起使用。这可能有效,但 lightdm 不依赖于 unity-greeter,我正在尝试使用 lightdm-gtk-greeter 替代方案。
问题解读
在我看来,问题在于用户会话没有正确定义。它立即启动并关闭。日志中的相关片段:
[+8.58s] DEBUG: Starting session xfce as user user
[+8.58s] DEBUG: Session 2733 running command /usr/sbin/lightdm-session startxfce4
[+8.60s] DEBUG: Registering session with bus path /org/freedesktop/DisplayManager/Session0
[+8.60s] DEBUG: Greeter closed communication channel
[+8.60s] DEBUG: Session 2733 exited with return value 1
[+8.60s] DEBUG: User session quit
[+8.60s] DEBUG: Stopping display
[+8.60s] DEBUG: Sending signal 15 to process 2683
[+8.77s] DEBUG: Process 2683 exited with return value 0
[+8.77s] DEBUG: X server stopped
[+8.77s] DEBUG: Removing X server authority /var/run/lightdm/root/:0
[+8.77s] DEBUG: Releasing VT 7
[+8.77s] DEBUG: Display server stopped
[+8.77s] DEBUG: Display stopped
[+8.77s] DEBUG: Active display stopped, switching to greeter
我正在使用 xfce 桌面环境,任何工作示例将不胜感激。
答案1
找到解决方案
相当随机地找到了一个解决方案(~/.xsession 向我指出了名为“startxfce4”的 xfce 会话启动脚本)。
在 lightdm.conf 中,我必须进行设置user-session=/usr/bin/startxfce4
,然后问题就解决了。
答案2
更好的解决办法(可能)是确保
/etc/X11/Xsession
是可执行的。这就是为我准备的,它符合您的问题描述。
来源:https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=748944#27