linux解决xhost: unable to open display

linux解决xhost: unable to open display

linux解决xhost: unable to open display
实用技巧:在Linux下设置xhost方法步骤

第一步:用root登陆linux,启动vnc服务;

第二步:根据vnc起来的端口,设置export DISPLAY=localhost:1(1表示vnc在第一个tty上启动的),vnc的启动信息见附件1;

第三步:执行xhost +,并且提示“access control disabled, clients can connect from any host”才正确。

linux下的操作日志如下:

[root@localhost ~]# vncserver

New 'localhost:1 (root)' desktop is localhost:1

Starting applications specified in /root/.vnc/xstartupLog file is /root/.vnc/localhost:1.log

[root@localhost ~]# export DISPLAY=localhost:1

[root@localhost ~]# xhost +

access control disabled, clients can connect from any host

在设置xhost时,出现了unable的问题。使用上诉方法就可以搞定。

 


在centos上安装软件时出现Could not execute auto check for display colors using command

Two solutions:

1.use oracle login x-window, then ./runInstaller

2.use root login,then

#xhost +

#su - oracle

#./runInstaller

xhost 是用来控制X server访问权限的。

通常当你从hostA登陆到hostB上运行hostB上的应用程序时,

做为应用程序来说,hostA是client,但是作为图形来说,是在hostB上显示的。

 

因此在登陆到hostB前,需要在hostA上运行xhost + 来使其它用户能够访问hostA的Xserver.

xhost + 是使所有用户都能访问Xserver;xhost + ip使ip上的用户能够访问Xserver

posted @ 2014-03-21 17:19  Jason-Holt  阅读(569)  评论(0编辑  收藏  举报