實用技巧:在Linux下設(shè)置xhost方法步驟
更新時間: 2008-04-21 15:27:16來源: 粵嵌教育瀏覽量:491
步:用root登陸linux,啟動vnc服務(wù);
第二步:根據(jù)vnc起來的端口,設(shè)置export DISPLAY=localhost:1(1表示vnc在個tty上啟動的),vnc的啟動信息見附件1;
第三步:執(zhí)行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
|
在設(shè)置xhost時,出現(xiàn)了unable的問題。
使用上訴方法就可以搞定。