我们来看看xstartup内容:
#!/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 &
ok!看说明很容易就知道如何正常进入desktop了
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
修改后保存退出
先停止vncserver:
[test@niuge ~]$ vncserver -kill :3
Killing Xvnc process ID 30475
[test@niuge ~]$
重启vncserver
[test@niuge ~]$ vncserver
New 'niuge:3 (test)' desktop is niuge:3
Starting applications specified in /home/test/.vnc/xstartup
Log file is /home/test/.vnc/niuge:3.log
OK!让我们重复上边的步骤重新登录vnc

熟悉的画面出现了。
