歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux服務器 >> 在Linux下設置xhost方法步驟

在Linux下設置xhost方法步驟

日期:2017/3/2 16:49:59   编辑:Linux服務器

第一步:用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/xstartup
Log 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的問題。

使用上訴方法就可以搞定

Copyright © Linux教程網 All Rights Reserved