【问题标题】:connecting ubuntu using vnc使用 vnc 连接 ubuntu
【发布时间】:2012-12-07 15:47:26
【问题描述】:

我需要从另一台 Ubuntu PC 和 Windows PC 远程连接到 Ubuntu PC(需要查看 UI)。我知道我们可以使用 VNC 来做到这一点。任何人都可以向我解释这些步骤或提供包含说明的正确链接。

我按照以下步骤操作: 在我需要进行远程访问的 Ubuntu 机器上安装了 vnc 服务器。 我按照以下链接中的说明进行操作

http://www.ubuntu-unleashed.com/2007/10/setup-vnc-server-for-ubuntu-gutsy.html

当我做第四步时:

x11vnc -forever -usepw -httpdir /usr/share/vnc-java/ -httpport 5800

我明白了

20/12/2012 02:12:02 passing arg to libvncserver: -httpport

20/12/2012 02:12:02 passing arg to libvncserver: 5801

20/12/2012 02:12:02 -usepw: found /home/sjayara5/.vnc/passwd

20/12/2012 02:12:02 x11vnc version: 0.9.12 lastmod: 2010-09-09  pid: 4821

20/12/2012 02:12:02 XOpenDisplay("") failed.

20/12/2012 02:12:02 Trying again with XAUTHLOCALHOSTNAME=localhost ...

20/12/2012 02:12:02 

20/12/2012 02:12:02 *** XOpenDisplay failed. No -display or DISPLAY.

20/12/2012 02:12:02 *** Trying ":0" in 4 seconds.  Press Ctrl-C to abort.

20/12/2012 02:12:02 *** 1 2 3 4 

20/12/2012 02:12:06 XOpenDisplay(":0") failed.

20/12/2012 02:12:06 Trying again with XAUTHLOCALHOSTNAME=localhost ...

20/12/2012 02:12:06 XOpenDisplay(":0") failed.

20/12/2012 02:12:06 Trying again with unset XAUTHLOCALHOSTNAME ...

20/12/2012 02:12:06 



20/12/2012 02:12:06 ***************************************

20/12/2012 02:12:06 *** 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.

一些提示和指南:

谢谢

【问题讨论】:

    标签: ubuntu remote-desktop remote-access vnc vnc-viewer


    【解决方案1】:

    阅读您的错误信息!似乎很清楚您正在从 SSH 会话或类似会话中运行命令,因为未设置 DISPLAY。将其设置为正确的值(检查 /tmp 中的 X11 套接字;您可能想要“:0”)。

    DISPLAY=":0"; export DISPLAY
    

    您还需要设置 XAUTHORITY 以便 x11vnc 可以连接! this问题的欺骗。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-06-27
      • 2017-01-04
      • 1970-01-01
      • 1970-01-01
      • 2017-07-21
      • 2022-06-26
      • 2018-08-27
      相关资源
      最近更新 更多