running LightDM in test mode doesn't work

Bug #860003 reported by iGadget
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Light Display Manager
Fix Released
Medium
Unassigned
lightdm (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

As described on https://wiki.ubuntu.com/LightDM, I should be able to run lightdm --test-mode in a console. However, when I try that, I first get this error:

matthijs@Simba:~$ lightdm --test-mode
Running inside an X server requires Xephyr to be installed but it cannot be found. Please install it or update your PATH environment variable.

When I then install the xserver-xephyr package and try again, a small window opens for less than a second and then closes again. No errors, no testing environment. Nothing.

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: lightdm 0.9.7-0ubuntu2
ProcVersionSignature: Ubuntu 3.0.0-11.18-generic 3.0.4
Uname: Linux 3.0.0-11-generic x86_64
ApportVersion: 1.23-0ubuntu1
Architecture: amd64
Date: Mon Sep 26 22:01:52 2011
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Alpha amd64 (20110803.1)
SourcePackage: lightdm
UpgradeStatus: Upgraded to oneiric on 2011-09-22 (3 days ago)

Revision history for this message
iGadget (igadget) wrote :
Revision history for this message
iGadget (igadget) wrote :
Download full text (3.6 KiB)

This is the output of lightdm --test-mode --debug:

matthijs@Simba:~$ lightdm --test-mode --debug
** (lightdm:5521): DEBUG: Logging to /home/matthijs/.cache/lightdm/log/lightdm.log
** (lightdm:5521): DEBUG: Starting Light Display Manager 0.9.7, UID=1000 PID=5521
** (lightdm:5521): DEBUG: Loaded configuration from /etc/lightdm/lightdm.conf
** (lightdm:5521): DEBUG: Using D-Bus name org.freedesktop.DisplayManager
** (lightdm:5521): DEBUG: Running in user mode
** (lightdm:5521): DEBUG: Using Xephyr for X servers
** (lightdm:5521): DEBUG: Registered seat module xlocal
** (lightdm:5521): DEBUG: Registered seat module xremote
** (lightdm:5521): DEBUG: Adding default seat
** (lightdm:5521): DEBUG: Starting seat
** (lightdm:5521): DEBUG: Starting new display for greeter
** (lightdm:5521): DEBUG: Starting local X display
** (lightdm:5521): DEBUG: Logging to /home/matthijs/.cache/lightdm/log/:1.log
** (lightdm:5521): DEBUG: Writing X server authority to /home/matthijs/.cache/lightdm/run/root/:1
** (lightdm:5521): DEBUG: Launching X Server
** (lightdm:5521): DEBUG: Launching process 5525: DISPLAY=:0 XAUTHORITY=/home/matthijs/.Xauthority /usr/bin/Xephyr :1 -auth /home/matthijs/.cache/lightdm/run/root/:1 -nolisten tcp
** (lightdm:5521): DEBUG: Waiting for ready signal from X server :1
** (lightdm:5521): DEBUG: Acquired bus name
** (lightdm:5521): DEBUG: Registering seat with bus path /org/freedesktop/DisplayManager/Seat0
** (lightdm:5521): DEBUG: Got signal 10 from process 5525
** (lightdm:5521): DEBUG: Got signal from X server :1
** (lightdm:5521): DEBUG: Connecting to XServer :1
** (lightdm:5521): DEBUG: Starting greeter session
** (lightdm:5521): DEBUG: pam_start("lightdm", "matthijs") -> (0x20ed930, 0)
** (lightdm:5521): DEBUG: Starting session lightdm-gtk-greeter as user matthijs logging to /home/matthijs/.cache/lightdm/log/:1-greeter.log
** (lightdm:5521): DEBUG: Launching session
** (lightdm:5521): DEBUG: PAM returns environment ''
** (lightdm:5521): DEBUG: Adding session authority to /home/matthijs/.Xauthority (written in session process)
** (lightdm:5521): DEBUG: Launching process 5527: LIGHTDM_FROM_SERVER_FD=16 DISPLAY=:1 HOME=/home/matthijs XDG_SESSION_COOKIE=ed87da5adc4c91b5ec47fcd60228ac83-1317064036.211475-1584743962 GDMSESSION=lightdm-gtk-greeter DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-PH8ngJ2MiL,guid=d399fa3ba164838dd0471e5c00000037 LIGHTDM_TO_SERVER_FD=19 LDM_BUS=SESSION USERNAME=matthijs XAUTHORITY=/home/matthijs/.Xauthority DESKTOP_SESSION=lightdm-gtk-greeter USER=matthijs PATH=/usr/lib/lightdm/lightdm:/usr/local/bin:/usr/bin:/bin SHELL=/bin/bash /usr/lib/lightdm/lightdm-greeter-session 'lightdm-gtk-greeter'
** (lightdm:5521): DEBUG: Process 5527 exited with return value 0
** (lightdm:5521): DEBUG: Greeter quit
** (lightdm:5521): DEBUG: Stopping display
** (lightdm:5521): DEBUG: Sending signal 15 to process 5525
** (lightdm:5521): DEBUG: Removing session authority from /home/matthijs/.Xauthority
** (lightdm:5521): DEBUG: Process 5525 exited with return value 0
** (lightdm:5521): DEBUG: X server stopped
** (lightdm:5521): DEBUG: Removing X server authority /home/matthijs/.cache/lightdm/run/root/:1
** (lightdm:5521): DEBUG: Displ...

Read more...

Revision history for this message
Jason Conti (jconti) wrote :

The greeters were moved to /usr/sbin but the PATH only contains /usr/lib/lightdm/lightdm:/usr/local/bin:/usr/bin:/bin. They used to be in libexecdir which is manually added to the path in session.c:session_start.

The greeter log at ~/.cache/lightdm/log/:1-greeter.log contains:

exec: 33: lightdm-gtk-greeter: not found

which is from /usr/lib/lightdm/lightdm-greeter-session. As a workaround until this is fixed, adding /usr/sbin to PATH before the exec on line 33 in that file will allow the greeter to start.

This isn't an issue when lightdm runs normally because /usr/sbin is part of the environment received from pam, but some of the setup is skipped in the --test-mode session, and in the log above the pam environment is empty.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in lightdm (Ubuntu):
status: New → Confirmed
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Fixed in 0.9.9

Changed in lightdm (Ubuntu):
status: Confirmed → Fix Committed
Changed in lightdm:
status: New → Fix Committed
importance: Undecided → Medium
Changed in lightdm (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lightdm - 1.0.0-0ubuntu1

---------------
lightdm (1.0.0-0ubuntu1) oneiric; urgency=low

  [ Steve Langasek ]
  * don't start on graphics-device-added; reintroducing this reverted the fix
    for bug #615549 from maverick without explanation.
  * clean up the completely illegible start rule for debian/lightdm.upstart,
    killing off the unnecessary parentheses
  * debian/lightdm.upstart: when lightdm is shut down by a runlevel call,
    emit an upstart event that can be caught by plymouth so it can
    distinguish between the DM shutting down for a runlevel change vs. other
    causes. LP: #854329.

  [ Robert Ancell ]
  * New upstream release.
    [ 0.9.8 ]
    - GetSeatForCookie and GetSessionForCookie are now deprecated. They
      remain for now but use the XDG_SEAT_PATH and XDG_SESSION_PATH
      environment variables instead.
    - Change log filenames to be unique across different display types.
    - Fix up script hooks, add regression tests for them
    - Complete removal of X code from the core of LightDM, so it can better
      support various display types
    - Add ability to set the language of a user from the greeter (LP: #803858)
    - Set LANG variable based on the user language
    - Add language selector into GTK greeter (disabled by default)
    - Allow TCP/IP connections if xserver-allow-tcp is true
    - Allow lightdm --version to be run as non-root
    - Automatically respond to PAM messages without prompts (LP: #783598)
    - Create 'AddLocalXSeat' D-Bus method, and require root to use 'AddSeat'
    - Fix multi-seat configuration picking the same display number (LP: #851362)
    - Use correct D-Bus and power interface in liblightdm-qt (LP: #852803)
    - Run pam_setcred inside the session process so pam_group works
      (LP: #851347)
    - Make sure one session is always selected in the GTK greeter (LP: #819177)
    [ 1.0.0 ]
    - Explicitly grab keyboard focus in GTK greeter
    - Fix removed power and a11y menu items in GTK greeter
    - Put system binary directory into path when running in test mode
      (LP: #860003)
    - Call pam_getenvlist after pam_setcred

  [ Lionel Le Folgoc ]
  * Make the gtk greeter easily themable by derivatives: (LP: #845549)
    - rename lightdm-gtk-greeter.conf to lightdm-gtk-greeter-ubuntu.conf,
      and handle the move in maintainer scripts.
    - manage /etc/lightdm/lightdm-gtk-greeter.conf with update-alternatives,
      by default it uses /etc/lightdm/lightdm-gtk-greeter-ubuntu.conf with a
      very low priority.
  * debian/control: lightdm-gtk-greeter provides lightdm-gtk-greeter-config.
 -- Robert Ancell <email address hidden> Wed, 28 Sep 2011 16:00:20 +1000

Changed in lightdm (Ubuntu):
status: Fix Committed → Fix Released
Changed in lightdm:
status: Fix Committed → Fix Released
Revision history for this message
Zsolt Lauter (lauterzsolti) wrote :

Got exactly the same.

 L ~ : lightdm --test-mode
Running inside an X server requires Xephyr to be installed but it cannot be found. Please install it or update your PATH environment variable.
 L ~ : cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=15.10
DISTRIB_CODENAME=wily
DISTRIB_DESCRIPTION="Ubuntu 15.10"

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.