Test mode puts invalid -novtswitch flag to Xephyr when running as root

Bug #852577 reported by Markos Chandras
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Light Display Manager

Bug Description

/var/log/lightdm.log reports:

[+0.00s] DEBUG: Logging to /var/log/lightdm/lightdm.log
[+0.00s] DEBUG: Starting Light Display Manager 0.9.7, UID=0 PID=6405
[+0.00s] DEBUG: Loaded configuration from /etc/lightdm/lightdm.conf
[+0.00s] DEBUG: Using D-Bus name org.freedesktop.DisplayManager
[+0.00s] DEBUG: Using Xephyr for X servers
[+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: Could not run plymouth --ping: Failed to execute child process "plymouth" (No such file or directory)
[+0.00s] DEBUG: Using VT 7
[+0.00s] DEBUG: Activating VT 7
[+0.01s] DEBUG: Logging to /var/log/lightdm/:1.log
[+0.01s] DEBUG: Writing X server authority to /var/run/lightdm/root/:1
[+0.07s] DEBUG: Launching X Server
[+0.09s] DEBUG: Launching process 6411: DISPLAY=:0 XAUTHORITY=/root/.xauthH85rJA /usr/bin/Xephyr :1 -auth /var/run/lightdm/root/:1 -nolisten tcp vt7 -novtswitch
[+0.09s] DEBUG: Waiting for ready signal from X server :1
[+0.09s] DEBUG: Acquired bus name
[+0.09s] DEBUG: Registering seat with bus path /org/freedesktop/DisplayManager/Seat0

and /var/log/:1.log reports

Unrecognized option: -novtswitch
use: X [:<display>] [option]
-a # default pointer acceleration (factor)
-ac disable access control restrictions
-audit int set audit trail level
-auth file select authorization file
-br create root window with black background
+bs enable any backing store support
-bs disable any backing store support
-c turns off key-click
c # key-click volume (0-100)
-cc int default color visual class
-nocursor disable the cursor
-core generate core dump on fatal error
-dpi int screen resolution in dots per inch
-dpms disables VESA DPMS monitor control
-deferglyphs [none|all|16] defer loading of [no|all|16-bit] glyphs
-f # bell base (0-100)
-fc string cursor font
-fn string default font name
-fp string default font path
-help prints message with these options
-I ignore all remaining arguments
-ld int limit data space to N Kb
-lf int limit number of open files to N
-ls int limit stack space to N Kb
-nolock disable the locking mechanism
-nolisten string don't listen on protocol
-noreset don't reset after last client exists
-background [none] create root window with no background
-reset reset after last client exists
-p # screen-saver pattern duration (minutes)
-pn accept failure to listen on all ports
-nopn reject failure to listen on all ports
-r turns off auto-repeat
r turns on auto-repeat
-render [default|mono|gray|color] set render color alloc policy
-retro start with classic stipple and cursor
-s # screen-saver timeout (minutes)
-t # default pointer threshold (pixels/t)
-terminate terminate at server reset
-to # connection time out
-tst disable testing extensions
ttyxx server started from init on /dev/ttyxx
v video blanking for screen-saver
-v screen-saver without video blanking
-wm WhenMapped default backing-store
-wr create root window with white background
-maxbigreqsize set maximal bigrequest size
+xinerama Enable XINERAMA extension
-xinerama Disable XINERAMA extension
-dumbSched Disable smart scheduling, enable old behavior
-schedInterval int Set scheduler interval in msec
-sigstop Enable SIGSTOP based startup
+extension name Enable extension
-extension name Disable extension
-query host-name contact named host for XDMCP
-broadcast broadcast for XDMCP
-multicast [addr [hops]] IPv6 multicast for XDMCP
-indirect host-name contact named host for indirect XDMCP
-port port-num UDP port number to send messages to
-from local-address specify the local address to connect from
-once Terminate server after one session
-class display-class specify display class to send in manage
-cookie xdm-auth-bits specify the magic cookie for XDMCP
-displayID display-id manufacturer display ID for request
[+-]accessx [ timeout [ timeout_mask [ feedback [ options_mask] ] ] ]
                       enable/disable accessx key sequences
-ardelay set XKB autorepeat delay
-arinterval set XKB autorepeat interval

TinyX Device Dependent Usage:
-screen WIDTH[/WIDTHMM]xHEIGHT[/HEIGHTMM][@ROTATION][X][Y][xDEPTH/BPP[xFREQ]] Specify screen characteristics
-rgba rgb/bgr/vrgb/vbgr/none Specify subpixel ordering for LCD panels
-mouse driver [,n,,options] Specify the pointer driver and its options (n is the number of buttons)
-keybd driver [,,options] Specify the keyboard driver and its options
-zaphod Disable cursor screen switching
-2button Emulate 3 button mouse
-3button Disable 3 button mouse emulation
-rawcoord Don't transform pointer coordinates on rotation
-dumb Disable hardware acceleration
-softCursor Force software cursor
-videoTest Start the server, pause momentarily and exit
-origin X,Y Locates the next screen in the the virtual screen (Xinerama)
-switchCmd Command to execute on vt switch
-zap Terminate server on Ctrl+Alt+Backspace
vtxx Use virtual terminal xx instead of the next available

Xephyr Option Usage:
-parent <XID> Use existing window as Xephyr root win
-host-cursor Re-use exisiting X host server cursor
-fullscreen Attempt to run Xephyr fullscreen
-grayscale Simulate 8bit grayscale
-fakexa Simulate acceleration using software rendering
-verbosity <level> Set log verbosity level
-nodri do not use DRI
-noxv do not use XV
-name [name] define the name in the WM_CLASS property
-title [title] set the window title in the WM_NAME property

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Could you attach your lightdm.conf? I think you must be explicitly setting a VT.

Changed in lightdm:
status: New → Incomplete
importance: Undecided → Low
Revision history for this message
Markos Chandras (hwoarang) wrote :

Here it is. FWIW I use Gentoo linux and xorg-server-1.11.0

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Oh, I see. It's because you're running test mode as root. When using root it tries to pick a VT, when running as a normal user it doesn't.

summary: - lightdm uses invalid -novtswitch in --test-mode
+ Test mode puts invalid -novtswitch flag to Xephyr when running as root
Changed in lightdm:
status: Incomplete → Triaged
Revision history for this message
Chris (cmavr8) wrote :

This happens to my Ubuntu 11.10 installation.. For some reason lightdm is run with the -novtswitch and crashes everytime a user logs out.. How can I disable this switch?


Revision history for this message
Adam Funk (a-funk) wrote :

Is there a workaround for this? I just upgraded to 13.10 and am unable to restart lightdm after booting.

Revision history for this message
Tom Fields (udzelem) wrote :

Hi, it seems the -novtswitch option is hardcoded into /usr/sbin/lightdm. (Which is a bad idea, generally)

Please also see Debian bug:

There is a patch supplied which removes the -novtswitch from the lightdm binary.

This should be solved upstream.

Revision history for this message
David Aguilar (davvid+ubuntu) wrote :

I've implemented a proposed solution and emailed the patches to the maintainer. I've posted the patches online in case anyone would like to test it:


If you set "xserver-allow-vt-swtich=true" in lightdm.conf then it'll inhibit the "-novtswitch" flag.

This option allows virtual terminal switching and would also fix the issue described in this issue when enabled. cheers

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Hi David. It would be much easier if you can make a branch and propose a merge, i.e.

$ bzr branch lp:lightdm my-branch-name
$ cd my-branch-name
(make changes)
$ bzr commit -m "..."
$ bzr push lp:~davvid+ubuntu/lightdm/my-branch-name
Then go to https://code.launchpad.net/~davvid+ubuntu/lightdm/my-branch-name and click "Propose for merging"

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

Other bug subscribers

Bug attachments

Remote bug watches

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