[root@rhel5
~]# vncserver
New ‘shpx:1 (root)’ desktop is shpx:1
Starting applications
specified in /root/.vnc/xstartup
Log file is
/root/.vnc/shpx:1.log
只要能出现上面的提示,说明服务正常启动了。
windows端可以连接到linux上了,(要是有防火墙的话要更改下哦,)连上之后会出现灰灰的,看不到桌面。呵,还是说下更改方法吧,iptables(防火墙)的更改方法,如果执行了二次vncserver的话,会产生5902这个端口。需要在iptables中新增一个规则。
[root@rhel5
~]# iptables -I INPUT 1 -s 192.168.1.1/24 -p tcp –dport 5901 -j
ACCEPT
[root@rhel5 ~]# vim /etc/sysconfig/iptables
# Firewall
configuration written by system-config-securitylevel
# Manual customization
of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD
ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:RH-Firewall-1-INPUT – [0:0]
-A INPUT
-j RH-Firewall-1-INPU