Ubuntu의 Lightdm 사용자 세션 설정

Ubuntu의 Lightdm 사용자 세션 설정

Lightdm은 잘 표시되는데 비밀번호를 입력하고 로그인을 클릭하면 화면이 깜박이고 lightdm 창이 다시 나타나서 아무 일도 없었던 것처럼 로그인을 요청합니다.

구성

사용자@노트북:~$ cat /etc/lightdm/

lightdm.conf                     lightdm-gtk-greeter-ubuntu.conf  
lightdm-gtk-greeter.conf         users.conf                       

lightdm.conf

user@laptop:~$ 고양이 /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:~$ 고양이 /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:~$ 고양이 /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,오류 804171lightdm과 함께 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 데스크탑 환경을 사용하고 있습니다. 어떤 작업 예제라도 매우 감사하겠습니다.

답변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

관련 정보