[root@dywH ~]# yum install tigervnc-server
[root@dywH ~]# /etc/init.d/vncserver restart Shutting down VNC server: [ OK ] Starting VNC server: no displays configured [FAILED]
[root@dywH ~]# vim /etc/sysconfig/vncservers [root@dywH ~]# tail -n2 /etc/sysconfig/vncservers VNCSERVERS="2:root" VNCSERVERARGS[2]="-geometry 1024x768 -depth 16 -nolisten tcp"
[root@dywH ~]# /etc/init.d/vncserver restart Shutting down VNC server: [ OK ] Starting VNC server: 2:root WARNING: The first attempt to start Xvnc failed, possibly because the font catalog is not properly configured. Attempting to determine an appropriate font path for this system and restart Xvnc using that font path ... Could not start Xvnc. /usr/bin/Xvnc: symbol lookup error: /usr/bin/Xvnc: undefined symbol: pixman_composite_trapezoids /usr/bin/Xvnc: symbol lookup error: /usr/bin/Xvnc: undefined symbol: pixman_composite_trapezoids
[root@dywH ~]# yum install pixman pixman-devel libXfont
[root@dywH ~]# /etc/init.d/vncserver restart
Shutting down VNC server: [ OK ]
Starting VNC server: 2:root
VNC password for user root is not configured
[FAILED]
[root@dywH ~]# vncpasswd Password: Verify:
[root@dywH ~]# /etc/init.d/vncserver restart
Shutting down VNC server: [ OK ]
Starting VNC server: 2:root
New 'dywH:2 (root)' desktop is dywH:2
Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/dywH:2.log
[ OK ]
socket.error: [Errno 98] Address already in use
[root@dywH ~]# /etc/init.d/libvirtd stop [root@dywH ~]# /etc/init.d/vncserver restart [root@dywH ~]# /etc/init.d/libvirtd start
[root@dywH ~]# netstat -tlunp | grep vnc tcp 0 0 0.0.0.0:5902 0.0.0.0:* LISTEN 6598/Xvnc
[root@dywH ~]# vim /etc/sysconfig/iptables [root@dywH ~]# grep 5902 /etc/sysconfig/iptables -B1 ..... -A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 5902 -j ACCEPT ......
[root@dywH ~]# /etc/init.d/iptables restart iptables: Flushing firewall rules: [ OK ] iptables: Setting chains to policy ACCEPT: nat filter [ OK ] iptables: Unloading modules: [ OK ] iptables: Applying firewall rules: [ OK ]