首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用vnc连接ubuntu

使用vnc连接ubuntu
EN

Stack Overflow用户
提问于 2012-12-20 14:59:58
回答 1查看 9K关注 0票数 4

我需要从另一台Ubuntu PC和Windows PC远程连接到Ubuntu PC(需要查看UI)。我知道我们可以使用VNC做到这一点。谁能解释我的步骤或给我一个适当的链接,其中有说明。

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

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

当我执行第四步时:

代码语言:javascript
复制
x11vnc -forever -usepw -httpdir /usr/share/vnc-java/ -httpport 5800

我得到了

代码语言:javascript
复制
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.

一些提示和指导:

谢谢

EN

回答 1

Stack Overflow用户

发布于 2012-12-20 15:26:06

阅读你的错误信息!很明显,您是从SSH会话或类似的会话中运行命令的,因为没有设置DISPLAY。将其设置为正确的值(检查/tmp中的X11套接字;您可能需要":0")。

代码语言:javascript
复制
DISPLAY=":0"; export DISPLAY

您还需要设置XAUTHORITY,以便x11vnc可以连接!this问题的复制。

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/13966831

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档