Mar022012
Openoffice xhost 错误解决方案
作者:黑♂白 发布:2012-03-02 18:29:22 分类: 服务器
环境:
Centos 5.0
错误如下:
/soffice.bin X11 error: Can't open display:
Set DISPLAY environment variable, use -display option
or check permissions of your X-Server
(See "man X" resp. "man xhost" for details)
解决方案:
linux下的操作日志如下:
[root@CentosRD ~]# vncserver
New 'localhost:1 (root)' desktop is localhost:1
Starting applications specified in /root/.vnc/xstartupLog file is /root/.vnc/localhost:1.log
[root@CentosRD ~]# export DISPLAY=localhost:1
[root@CentosRD ~]# xhost +
access control disabled, clients can connect from any host
详解:
第一步:用root登陆linux,启动vnc服务;
第二步:根据vnc起来的端口,设置export DISPLAY=localhost:1(1表示vnc在第一个tty上启动的)。
第三步:执行xhost +,并且提示“access control disabled, clients can connect from any host”才正确。
您还未登录,需要登录后才能发言