Linux:xhost: unable to open display ""

Xmanager6的Xstart窗口出现问题:

[root@*** database]# xhost +
xhost:  unable to open display ""

解决方法:

[root@*** database]# vncserver

You will require a password to access your desktops.

Password:
Verify:
Would you like to enter a view-only password (y/n)? y
Password:
Verify:

New '***:1 (oracle)' desktop is ***:1

Creating default startup script /root/.vnc/xstartup
Creating default config /root/.vnc/config
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/***:1.log
[root@*** database]# export DISPLAY=localhost:1 
[root@*** database]# xhost +
access control disabled,clients can connect from any host

如果出现:

[root@*** oracle]#  vncserver
bash: vncserver: command not found

请参考:【Linux: bash: vncserver: command not found】

使用xshell时,上面的命令返回也可能是这样的:

[root@*** database]# export DISPLAY=localhost:1 
[root@*** database]# xhost +
xhost:  unable to open display "localhost:1"

此时,你在重新打开Xstart窗口:

[root@*** ~]# cd /opt/oracle/
[root@*** oracle]# cd database/
[root@*** database]# xhost +
access control disabled, clients can connect from any host

 

 

如果有写的不对的地方,请大家多多批评指正,非常感谢!

你可能感兴趣的:(Linux)