x11vnc was unable to open the X DISPLAY

Having trouble getting x11vnc working?

Here’s the error:

[email protected]:/etc/X11/gdm# x11vnc -forever -usepw -httpdir /usr/share/vnc-java/ -httpport 5800 -auth /var/gdm/:0.Xauth
06/10/2010 16:28:21 ***************************************
06/10/2010 16:28:21 *** XOpenDisplay failed (:0)

*** x11vnc was unable to open the X DISPLAY: ":0", it cannot continue.
*** There may be "Xlib:" error messages above with details about the failure.

You must run this command to figure out the right path for gdm:

[email protected]:/etc/X11/gdm# ps wwwaux | grep auth

output (text in red is the info you need):
root 1791 0.0 0.1 3004 748 pts/5 R+ 16:29 0:00 grep auth
root 6134 0.0 3.1 37500 12148 tty7 Ss+ 2009 178:10 /usr/bin/X :0 -br -audit 0 -auth /var/lib/gdm/:0.Xauth -nolisten tcp vt7

The correct command with fixed syntax:
[email protected]:/etc/X11/gdm# x11vnc -forever -usepw -httpdir /usr/share/vnc-java/ -httpport 5800 -auth /var/lib/gdm/:0.Xauth

And for copying and pasting purposes:

[email protected]:/etc/X11/gdm# x11vnc -forever -usepw -httpdir /usr/share/vnc-java/ -httpport 5800 -auth /var/lib/gdm/:0.Xauth

1 comment to x11vnc was unable to open the X DISPLAY

Leave a Reply

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>