RHEL5.8
一、修改 ~/.vnc/xstartup
1、注释掉: twm &
2、在最后增加一行:gnome-session &
修改后的文件如下:
#!/bin/sh
# 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 &
二、修改/etc/sysconfig/vncservers
增加或修改:
VNCSERVERS="1:root"
VNCSERVERARGS[1]="-geometry 1024x768 -depth 24"