配置vncserver
我没有配置菜单中的首选项(系统->首选项->远程桌面)
———————————-
修改/etc/sysconfig/vncservers
为xuhua和root打开vnc,设置分辨率为800×600,不允许http方式
VNCSERVERS=”1:xuhua 2:root”
VNCSERVERARGS[1]=”-geometry 800×600 -nohttpd”
VNCSERVERARGS[2]=”-geometry 800×600 -nohttpd”
—————————————-
修改xuhua和root主目录中./.vnc/xstartup
取消下面两行的注释
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
注释掉twm,使用startx开启默认的窗口管理器
#twm &
startx &
—————————————-
使用vncpasswd设置连接vnc需要输入的密码
vncpasswd,然后输入两遍密码
—————————————-
重启vncserver服务
service vncserver restart
===================================================
[3]配置iptables
修改/etc/sysconfig/iptables
允许vncserver端口
-A RH-Firewall-1-INPUT -p tcp -m tcp –dport 5900 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp –dport 5901 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp –dport 5902 -j ACCEPT
————————————-
重启iptables
/etc/rc.d/init.d/iptables restart