在Linux下設置xhost方法步驟

實用技巧:在Linux下設置xhost方法步驟
第一步:用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/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的問題。使用上訴方法就能夠搞定。linux

相關文章
相關標籤/搜索