歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux基礎知識 >> 實用技巧:在Linux下設置xhost方法步驟

實用技巧:在Linux下設置xhost方法步驟

日期:2017/3/2 15:32:34   编辑: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