xhost -x
-bash: xhost: command not found
运行yum -y install *vnc*
运行vncserver
显示
xauth: (stdin):1: bad display name "emo12c:1" in "add" command
New 'emo12c:1 (root)' desktop is emo12c:1
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/emo12c:1.log
问题1:
xauth: (stdin):1: bad display name "emo12c:1" in "add" command
解决方法:
[root@host144 .vnc]# cat /etc/hosts 127.0.0.1 host144 localhost.localdomain localhost 10.0.127.144 host144
问题2:
cat /root/.vnc/emo12c:1.log
Initializing built-in extension VNC
Wed Jan 20 06:26:17 2016
vncext: VNC extension running!
vncext: Listening for VNC connections on all interface(s), port 5901
vncext: created VNC server for screen 0
/root/.vnc/xstartup: line 27: xsetroot: command not found
/root/.vnc/xstartup: line 29: twm: command not found
/root/.vnc/xstartup: line 28: xterm: command not found
解决方法:
[root@emo12c ~]# yum -y install xsetroot xterm twm
over !
yum -y install xclock
[root@emo12c cd]# xclock
Warning: Missing charsets in String to FontSet conversion
解决办法:
LANG=en_US.iso88591;export LANG
退出xman ,重新登录
/usr/bin/xdpyinfo
[oracle@emo12c database]$ ll /usr/bin/xdpyinfo
ls: cannot access /usr/bin/xdpyinfo: No such file or directory
解决方法:
yum -y install xorg-x11-utils-*
/usr/bin/xdpyinfo
[root@emo12c cd]# /usr/bin/xdpyinfo
available colormap entries: 256 per subfield
red, green, blue masks: 0xff0000, 0xff00, 0xff
significant bits in color specification: 8 bits
visual:
visual id: 0x22
class: DirectColor
depth: 24 planes
available colormap entries: 256 per subfield
red, green, blue masks: 0xff0000, 0xff00, 0xff
significant bits in color specification: 8 bits
[oracle@emo12c ~]$ xclock
Error: Can't open display: localhost:10.0
本地IP 10.2.65.64
who am i
服务器IP : 10.3.4.114
su - oracle
xclock 报如下:
Error: Can't open display: :10.0
设置如下:
[oracle@emo12c ~]$ DISPLAY=10.2.65.64:0.0
[oracle@emo12c ~]$ xclock
访问正常。
做完以上神操作,还是不行话,你重启一下应该就好了。。。。。。。。。。。。