redhat 5.9下搭建vnc环境

rpm -q vnc vnc-server    #检测是否安装

yum install vnc vnc-server    #安装vnc

vncserver :1    #启动vnc端口1

vi /root/.vnc/xstartup    #修改配置文件
# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER        #去掉#号
# exec /etc/X11/xinit/xinitrc    #去掉#号
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#twm &    #注释掉
gnome-session &     #添加

#添加防火墙端口iptable(58015901)
vncserver -kill :1    #关闭vnc端口
vncserver :1    #启动vnc端口1

猜你喜欢

转载自www.cnblogs.com/cos235817497/p/9488482.html