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

This site uses Akismet to reduce spam. Learn how your comment data is processed.