linux解决xhost: unable to open display ""
2015-07-03 15:34
567 查看
在Linux下设置xhost方法步骤
第一步:用root登陆linux,启动vnc服务;
第二步:根据vnc起来的端口,设置export DISPLAY=localhost:1(1表示vnc在第一个tty上启动的),
第三步:执行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的问题。使用上诉方法就可以搞定。
第一步:用root登陆linux,启动vnc服务;
第二步:根据vnc起来的端口,设置export DISPLAY=localhost:1(1表示vnc在第一个tty上启动的),
第三步:执行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的问题。使用上诉方法就可以搞定。
相关文章推荐
- DISCUZ在win2003环境下 Unable to access ./include/common.inc.php in... 的问题终极解决方案
- vps报错Unable to make the session state request
- Unable to instantiate default tuplizer [org.hib...
- start: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart:
- 在RH5上安装ORACLE11G出现xhost: unable to open display的解决
- ORA-01652:unable to extend temp segment by num in tablespace name
- 记jpa、json问题之:handler and unable to find...by id ..
- Unable to instantiate activity ComponentInfo
- Unable to resolve target 'android-XX'
- Android出现Multiple dex files define...
- SSH报错Unable to load configuration. - Class: java.net.SocketInputStream Unable to load configuratio
- SSH报错Unable to load configuration. - Class: java.net.SocketInputStream Unable to load configuratio
- org.hibernate.QueryException: Unable to resolve path
- Unable to resolve target 'android-XX'
- unable to authenticate the package:8999887.itmsp / all transports failed diagnostics
- Unable to simultaneously satisfy constraints
- [cocos2d-x,cocos2d-x with android]Unable to find native library cocos2dcpp
- CocoaPods安装历险
- Serializable报错问题,java.lang.RuntimeException: Parce
- 手动安装git后无法https的问题