web-dev-qa-db-ja.com

UbuntuでのLightdmユーザーセッション設定

Lightdmは正しく表示されますが、パスワードを入力して[ログイン]をクリックすると、画面が点滅し、lightdmウィンドウが再表示され、何も起こらなかったかのようにログインを求められます。

構成

user @ 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

users.conf

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

インストールされたパッケージ

Web検索で、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ソリューション(私が望むものではありません)

Bug 850941bug 804171 lightdmでunity-greeterを使用することをお勧めします。これはうまくいくかもしれませんが、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デスクトップ環境を使用しており、実際に機能する例があれば幸いです。

3
user13764

解決策が見つかりました

かなりランダムに解決策を見つけました(〜/ .xsessionは、「startxfce4」と呼ばれるxfceセッション開始スクリプトを示しました)。

Lightdm.confで、user-session=/usr/bin/startxfce4を設定する必要があり、問題は解決しました。

1
user13764

より良い修正は(おそらく)それを確実にすることです

/etc/X11/Xsession

実行可能です。これは私にとってはそれであり、あなたの問題の説明と一致するでしょう。

出典: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=748944#27