x11vnc fails to find X Login Greeter when lightdm is used

Bug #1193483 reported by Iordan Iordanov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
x11vnc (Ubuntu)
New
Undecided
Unassigned

Bug Description

The vnc server x11vnc has a very useful mode which allows a user with admin sudo privileges (or root) to run x11vnc and to automatically discover an X Login Greeter. The objective is to be able to login on :0 even when nobody has a login session.

An example commandline for x11vnc to discover the X Login Greeter:

    sudo x11vnc -norc -nopw -find -localhost -env FD_XDM=1

Once x11vnc outputs e.g. PORT=5900 on the commandline, one can use any VNC viewer to connect to it from the same machine, e.g.:

    xtightvncviewer localhost:0

This works perfectly well with kdm and gdm on Ubuntu 12.04, but fails with lightdm with the output pasted below. I tried installing x11vnc and x11vnc-data from Quantal and Raring, but both newer versions of x11vnc fail the same way.

=======================================================
# sudo x11vnc -norc -nopw -find -localhost -env FD_XDM=1
21/06/2013 16:21:57 x11vnc version: 0.9.12 lastmod: 2010-09-09 pid: 32699
21/06/2013 16:21:57
21/06/2013 16:21:57 wait_for_client: WAIT:cmd=FINDDISPLAY
21/06/2013 16:21:57
21/06/2013 16:21:57 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/2560
21/06/2013 16:21:57
21/06/2013 16:21:57 Autoprobing TCP port
21/06/2013 16:21:57 Autoprobing selected port 5900
21/06/2013 16:21:57 Listening also on IPv6 port 5900 (socket 5)
21/06/2013 16:21:57

The VNC desktop is: tlab-t3400:0
PORT=5900
21/06/2013 16:21:59 Got connection from client 127.0.0.1
21/06/2013 16:21:59 other clients:
21/06/2013 16:21:59 check_access: client 127.0.0.1 matches host 127.0.0.1
21/06/2013 16:21:59 incr accepted_client=1 for 127.0.0.1:37831 sock=6
21/06/2013 16:21:59 wait_for_client: got client
21/06/2013 16:21:59 Client Protocol Version 3.8
21/06/2013 16:21:59 Protocol version sent 3.8, using 3.8
21/06/2013 16:21:59 client progressed=1 in 0/1 0.000286 s
21/06/2013 16:21:59 client_set_net: 127.0.0.1 0.0004
21/06/2013 16:21:59 wait_for_client: running: env X11VNC_SKIP_DISPLAY='' /bin/sh /tmp/x11vnc-find_display.cDPngD
/tmp/x11vnc-find_display.cDPngD: 305: [: -a: unexpected operator
/tmp/x11vnc-find_display.cDPngD: 305: [: -a: unexpected operator
/tmp/x11vnc-find_display.cDPngD: 305: [: -a: unexpected operator
/tmp/x11vnc-find_display.cDPngD: 305: [: -a: unexpected operator
/tmp/x11vnc-find_display.cDPngD: 305: [: -a: unexpected operator
/tmp/x11vnc-find_display.cDPngD: 305: [: -a: unexpected operator
/tmp/x11vnc-find_display.cDPngD: 305: [: -a: unexpected operator
/tmp/x11vnc-find_display.cDPngD: 305: [: -a: unexpected operator
/tmp/x11vnc-find_display.cDPngD: 305: [: -a: unexpected operator
/tmp/x11vnc-find_display.cDPngD: 305: [: -a: unexpected operator
/tmp/x11vnc-find_display.cDPngD: 305: [: -a: unexpected operator
/tmp/x11vnc-find_display.cDPngD: 305: [: -a: unexpected operator
/tmp/x11vnc-find_display.cDPngD: 305: [: -a: unexpected operator
/tmp/x11vnc-find_display.cDPngD: 305: [: -a: unexpected operator
/tmp/x11vnc-find_display.cDPngD: 305: [: -a: unexpected operator
/tmp/x11vnc-find_display.cDPngD: 305: [: -a: unexpected operator
/tmp/x11vnc-find_display.cDPngD: 305: [: -a: unexpected operator
/tmp/x11vnc-find_display.cDPngD: 305: [: -a: unexpected operator
21/06/2013 16:21:59 wait_for_client: find display cmd failed.
21/06/2013 16:21:59 wait_for_client: bad reply '
'

=======================================================
And an example of it working properly with kdm:

# /etc/init.d/lightdm stop
# /etc/init.d/kdm start

=======================================================
# PORT= sudo x11vnc -norc -nopw -find -localhost -env FD_XDM=1
21/06/2013 16:36:33 x11vnc version: 0.9.12 lastmod: 2010-09-09 pid: 24981
21/06/2013 16:36:33
21/06/2013 16:36:33 wait_for_client: WAIT:cmd=FINDDISPLAY
21/06/2013 16:36:33
21/06/2013 16:36:33 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/2560
21/06/2013 16:36:33
21/06/2013 16:36:33 Autoprobing TCP port
21/06/2013 16:36:33 Autoprobing selected port 5900
21/06/2013 16:36:33 Listening also on IPv6 port 5900 (socket 5)
21/06/2013 16:36:33

The VNC desktop is: tlab-t3400:0
PORT=5900
21/06/2013 16:36:35 Got connection from client 127.0.0.1
21/06/2013 16:36:35 other clients:
21/06/2013 16:36:35 check_access: client 127.0.0.1 matches host 127.0.0.1
21/06/2013 16:36:35 incr accepted_client=1 for 127.0.0.1:37903 sock=6
21/06/2013 16:36:35 wait_for_client: got client
21/06/2013 16:36:35 Client Protocol Version 3.8
21/06/2013 16:36:35 Protocol version sent 3.8, using 3.8
21/06/2013 16:36:35 client progressed=1 in 0/1 0.000218 s
21/06/2013 16:36:35 client_set_net: 127.0.0.1 0.0004
21/06/2013 16:36:35 wait_for_client: running: env X11VNC_SKIP_DISPLAY='' /bin/sh /tmp/x11vnc-find_display.zhhWAi
21/06/2013 16:36:36 running: chvt 8 >/dev/null 2>/dev/null &
21/06/2013 16:36:38 Using X display :0
21/06/2013 16:36:38 rootwin: 0x290 reswin: 0x600001 dpy: 0xcbdd50
21/06/2013 16:36:38
21/06/2013 16:36:38 ------------------ USEFUL INFORMATION ------------------
21/06/2013 16:36:38 X DAMAGE available on display, using it for polling hints.
21/06/2013 16:36:38 To disable this behavior use: '-noxdamage'
21/06/2013 16:36:38
21/06/2013 16:36:38 Most compositing window managers like 'compiz' or 'beryl'
21/06/2013 16:36:38 cause X DAMAGE to fail, and so you may not see any screen
21/06/2013 16:36:38 updates via VNC. Either disable 'compiz' (recommended) or
21/06/2013 16:36:38 supply the x11vnc '-noxdamage' command line option.
21/06/2013 16:36:38
21/06/2013 16:36:38 Wireframing: -wireframe mode is in effect for window moves.
21/06/2013 16:36:38 If this yields undesired behavior (poor response, painting
21/06/2013 16:36:38 errors, etc) it may be disabled:
21/06/2013 16:36:38 - use '-nowf' to disable wireframing completely.
21/06/2013 16:36:38 - use '-nowcr' to disable the Copy Rectangle after the
21/06/2013 16:36:38 moved window is released in the new position.
21/06/2013 16:36:38 Also see the -help entry for tuning parameters.
21/06/2013 16:36:38 You can press 3 Alt_L's (Left "Alt" key) in a row to
21/06/2013 16:36:38 repaint the screen, also see the -fixscreen option for
21/06/2013 16:36:38 periodic repaints.
21/06/2013 16:36:38
21/06/2013 16:36:38 XFIXES available on display, resetting cursor mode
21/06/2013 16:36:38 to: '-cursor most'.
21/06/2013 16:36:38 to disable this behavior use: '-cursor arrow'
21/06/2013 16:36:38 or '-noxfixes'.
21/06/2013 16:36:38 using XFIXES for cursor drawing.
21/06/2013 16:36:38 GrabServer control via XTEST.
21/06/2013 16:36:38
21/06/2013 16:36:38 Scroll Detection: -scrollcopyrect mode is in effect to
21/06/2013 16:36:38 use RECORD extension to try to detect scrolling windows
21/06/2013 16:36:38 (induced by either user keystroke or mouse input).
21/06/2013 16:36:38 If this yields undesired behavior (poor response, painting
21/06/2013 16:36:38 errors, etc) it may be disabled via: '-noscr'
21/06/2013 16:36:38 Also see the -help entry for tuning parameters.
21/06/2013 16:36:38 You can press 3 Alt_L's (Left "Alt" key) in a row to
21/06/2013 16:36:38 repaint the screen, also see the -fixscreen option for
21/06/2013 16:36:38 periodic repaints.
21/06/2013 16:36:38
21/06/2013 16:36:38 XKEYBOARD: number of keysyms per keycode 7 is greater
21/06/2013 16:36:38 than 4 and 51 keysyms are mapped above 4.
21/06/2013 16:36:38 Automatically switching to -xkb mode.
21/06/2013 16:36:38 If this makes the key mapping worse you can
21/06/2013 16:36:38 disable it with the "-noxkb" option.
21/06/2013 16:36:38 Also, remember "-remap DEAD" for accenting characters.
21/06/2013 16:36:38
21/06/2013 16:36:38 X FBPM extension not supported.
21/06/2013 16:36:38 X display is capable of DPMS.
21/06/2013 16:36:38 --------------------------------------------------------
21/06/2013 16:36:38
21/06/2013 16:36:38 Default visual ID: 0x21
21/06/2013 16:36:38 Read initial data from X display into framebuffer.
21/06/2013 16:36:38 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/6720
21/06/2013 16:36:38 rfbNewFramebuffer(0xcaded0, 0x0, 1680, 1050, 8, 1, 4)
21/06/2013 16:36:38 Pixel format for client 127.0.0.1:
21/06/2013 16:36:38 32 bpp, depth 24, little endian
21/06/2013 16:36:38 true colour: max r 255 g 255 b 255, shift r 16 g 8 b 0
21/06/2013 16:36:38
21/06/2013 16:36:38 X display :0 is 32bpp depth=24 true color
21/06/2013 16:36:38
21/06/2013 16:36:38 calling setTranslateFunction()...
21/06/2013 16:36:38 Pixel format for client 127.0.0.1:
21/06/2013 16:36:38 32 bpp, depth 24, little endian
21/06/2013 16:36:38 true colour: max r 255 g 255 b 255, shift r 16 g 8 b 0
21/06/2013 16:36:38 no translation needed
21/06/2013 16:36:38 done.
21/06/2013 16:36:38 TS_REDIR is empty, restarting...
21/06/2013 16:36:38
21/06/2013 16:36:38 Xinerama is present and active (e.g. multi-head).
21/06/2013 16:36:38 Xinerama: number of sub-screens: 1
21/06/2013 16:36:38 Xinerama: no blackouts needed (only one sub-screen)
21/06/2013 16:36:38
21/06/2013 16:36:38 fb read rate: 421 MB/sec
21/06/2013 16:36:38 fast read: reset wait ms to: 10
21/06/2013 16:36:38 fast read: reset defer ms to: 10
21/06/2013 16:36:38 The X server says there are 10 mouse buttons.
21/06/2013 16:36:38 screen setup finished.
21/06/2013 16:36:38

The VNC desktop is: localhost:0
PORT=5900

******************************************************************************
Have you tried the x11vnc '-ncache' VNC client-side pixel caching feature yet?

The scheme stores pixel data offscreen on the VNC viewer side for faster
retrieval. It should work with any VNC viewer. Try it by running:

    x11vnc -ncache 10 ...

One can also add -ncache_cr for smooth 'copyrect' window motion.
More info: http://www.karlrunge.com/x11vnc/faq.html#faq-client-caching

21/06/2013 16:36:38 rfbProcessClientSecurityType: executing handler for type 1
21/06/2013 16:36:38 rfbProcessClientSecurityType: returning securityResult for client rfb version >= 3.8
21/06/2013 16:36:38 Battling with something for -norepeat!! (1 resets left)
21/06/2013 16:36:38 Disabled X server key autorepeat.
21/06/2013 16:36:38 to force back on run: 'xset r on' (2 times)
21/06/2013 16:36:38 created xdamage object: 0x600039
21/06/2013 16:36:38 Pixel format for client 127.0.0.1:
21/06/2013 16:36:38 32 bpp, depth 24, little endian
21/06/2013 16:36:38 true colour: max r 255 g 255 b 255, shift r 16 g 8 b 0
21/06/2013 16:36:38 no translation needed
21/06/2013 16:36:38 Using compression level 1 for client 127.0.0.1
21/06/2013 16:36:38 Using image quality level 6 for client 127.0.0.1
21/06/2013 16:36:38 Enabling X-style cursor updates for client 127.0.0.1
21/06/2013 16:36:38 Enabling full-color cursor updates for client 127.0.0.1
21/06/2013 16:36:38 Enabling cursor position updates for client 127.0.0.1
21/06/2013 16:36:38 Enabling LastRect protocol extension for client 127.0.0.1
21/06/2013 16:36:38 Using raw encoding for client 127.0.0.1
21/06/2013 16:36:38 copy_tiles: allocating first_line at size 54
21/06/2013 16:36:38 client 1 network rate 7818.6 KB/sec (7818.6 eff KB/sec)
21/06/2013 16:36:38 client 1 latency: 0.5 ms
21/06/2013 16:36:38 dt1: 0.0098, dt2: 0.0503 dt3: 0.0005 bytes: 469576
21/06/2013 16:36:38 link_rate: LR_LAN - 1 ms, 7818 KB/s
=======================================================

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: x11vnc 0.9.12-1build1
ProcVersionSignature: Ubuntu 3.2.0-44.69-generic 3.2.44
Uname: Linux 3.2.0-44-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.0.1-0ubuntu17.3
Architecture: amd64
Date: Fri Jun 21 16:22:34 2013
MarkForUpload: True
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 SHELL=/local/bin/bash
SourcePackage: x11vnc
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Iordan Iordanov (iiordanov) wrote :
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.