linux解決xhost: unable to open display
linux解決xhost: unable to open display
實用技巧:在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的問題。使用上訴方法就可以搞定。
注意:export DISPLAY=localhost:1,埠1也可能是2,根據vnc服務起來的埠號來指定埠。
實用技巧:在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的問題。使用上訴方法就可以搞定。
注意:export DISPLAY=localhost:1,埠1也可能是2,根據vnc服務起來的埠號來指定埠。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/30208428/viewspace-1810039/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 完美解決xhost +報錯: unable to open display
- 【linux報錯】-bash: xhost: command not foundLinux
- virt-manager cannot open display問題
- display:flex解決的問題Flex
- 解決問題:OSError: Unable to open file (truncated file: eof = 22118400, sblock->base_addr = 0, stored_eofErrorBloC
- sudo 出現unable to resolve host 解決方法
- Unable to open debugger port (127.0.0.1:29697): java.net.SocketException "socketException"127.0.0.1JavaException
- 解決Ubuntu報錯 E: Unable to locate package yumUbuntuPackage
- Unable to load native-hadoop library for your platform解決HadoopPlatform
- git pull報“unable to update local ref”解決方案Git
- 解決“su: cannot open session: Permission denied”Session
- 解決滾動警告:Unable to preventDefault inside passive event listenerIDE
- sudo時出現unable to resolve host 的解決方法
- Ubuntu 解決 Too many open files 問題Ubuntu
- 解決 yum clean all Error rpmdb open failedErrorAI
- (20200915Solved)Vscode出現Unable to open ‘hashtable_class_helper.pxi‘VSCode
- display屬性詳解
- yii2 Unable to verify your data submission錯誤解決
- Unable to save settings: Failed to save settings. Please restart PyCharm解決AIRESTPyCharm
- 新增display:none;導致盒子被擠下去的解決方法None
- Fotify掃描結果Open Redirection解決方案
- 【Open-Falcon】Linux下安裝Open-FalconLinux
- 【ubuntu】解決Unable to determine the device handle for GPU 0000:02:00.0: Unknown ErrorUbuntudevGPUError
- 解決jpa查詢時,Unable to locate Attribute with the the given name錯誤
- valet install 報 Unable to determine linked PHP. 的解決辦法PHP
- display:flex佈局下white-space:nowrap失效問題解決Flex
- Latex編譯錯誤:Unable to load picture or PDF file 問題解決編譯
- Hadoop問題解決:Unable to load native-hadoop library for your platform...HadoopPlatform
- 解決angular安裝 unable to access 'https:github...' Empty reply from serverAngularHTTPGithubServer
- Linux解決(無法獲得鎖 /var/lib/dpkg/lock - open (11: 資源暫時不可用))Linux
- libcudart.so.8.0: cannot open shared object file解決方案DartObject
- FileZilla:425 Can't open data connection for transfer of解決辦法
- 徹底理解Linux的DISPLAY變數的作用Linux變數
- Linux open file與 fs-maxLinux
- display的flex屬性使用詳解Flex
- display:flex與display:box 區別Flex
- 解決Unable to download https://packagecontrol.io/channel_v3.json after 3 attemptsHTTPPackageJSON
- smplx 的 libGL error: MESA-LOADER: failed to open swrast 的解決方法ErrorAIAST
- linux redefinition of 'struct timspec'解決LinuxStruct