ubuntu – x11vnc xopendisplay失败了

我安装了x11vnc然后执行x11vnc但失败了

以下是错误消息

$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.

我该如何解决这个错误?

||我不知道以下是否有帮助,但我希望如此

$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

我正在使用远程服务器(Ubuntu 16.04)

最佳答案

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

你的X正在运行:1显示,所以你需要告诉x11vnc:

$x11vnc -display:1

我想你也可以 – 尝试自动找到用户的显示器.

点赞