x11vnc xopendisplay failed [closed]
Asked Answered
S

3

11

I installed x11vnc and then execute x11vnc but failed

following is the error message

$x11vnc -display :0
08/05/2017 19:18:22 x11vnc version: 0.9.13 lastmod: 2011-08-10  pid: 7572
08/05/2017 19:18:22 XOpenDisplay(":0") failed.
08/05/2017 19:18:22 Trying again with XAUTHLOCALHOSTNAME=localhost ...

08/05/2017 19:18:22 ***************************************
08/05/2017 19:18:22 *** 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.

How can I address the error?

|| I don't know if followings are helpful but I hope so

$ps wwwaux | grep auth
root      5276  0.0  0.0 119472  8532 tty7     Ss+  18:26   0:00 /usr/lib/xorg/Xorg -core :1 -seat seat0 -auth /var/run/lightdm/root/:1 -nolisten tcp vt7 -novtswitch
user1    7731  0.0  0.0  15504  1016 pts/3    S+   19:21   0:00 grep --color=auto auth
user2 25420  0.0  0.0 115960 17532 ?        S     4월26   0:13 Xvnc4 :10000 -desktop quad:10000 (user2) -auth /home/user2/.Xauthority -geometry 1920x1080 -depth 16 -rfbwait 30000 -rfbauth /home/user2/.vnc/passwd -rfbport 15900 -pn -fp /usr/X11R6/lib/X11/fonts/Type1/,/usr/X11R6/lib/X11/fonts/Speedo/,/usr/X11R6/lib/X11/fonts/misc/,/usr/X11R6/lib/X11/fonts/75dpi/,/usr/X11R6/lib/X11/fonts/100dpi/,/usr/share/fonts/X11/misc/,/usr/share/fonts/X11/Type1/,/usr/share/fonts/X11/75dpi/,/usr/share/fonts/X11/100dpi/ -co /etc/X11/rgb

$ls /etc/X11
app-defaults  cursors  default-display-manager  fonts  rgb.txt  xinit  xkb  xorg.conf.failsafe  Xreset  Xreset.d  Xresources  Xsession  Xsession.d  Xsession.options  xsm

I am using the remote server(Ubuntu 16.04)

Stooge answered 8/5, 2017 at 10:27 Comment(0)
C
12

/usr/lib/xorg/Xorg -core :1

Your X is running on :1 display, so you need to tell x11vnc that:

$ x11vnc -display :1

I think you can also do -find to try to find the user's display automatically.

Corker answered 12/1, 2019 at 8:57 Comment(2)
If you are having error about same display as displayed next to -core in ps wwwwaux | grep auth and still get this error, it may be that noone is logged in - so add -auth guess and possibly run as root so result is something like sudo /usr/bin/x11vnc -auth guess -rfbauth /home/youruser/.vnc/passwd &Solvency
That was very useful!Aspirant
P
0

it works for me using mobaxterm:

sudo startx
crtl + z
tightvncserver
sudo x11vnc -forever -bg -usepw -cursor arrow -display :1
Protoxide answered 15/1, 2019 at 8:19 Comment(0)
A
0

I've had the same error. In my case the password was not set, and I was trying to start x11vnc with -usepw parameter.

sudo x11vnc -storepasswd password /path/to/passfile

or

sudo x11vnc -storepasswd, that saves password by default at ~/.vnc/passwd.

Acidulent answered 2/10, 2020 at 9:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.