前面的VNC安装的步骤与Ubuntu Server 12.04安装桌面环境以及配置VNC里介绍的内容相同,区别在于最终的VNC的配置。
编辑VNC的配置文件
vim xstartup
完整的配置信息如下所示:
#!/bin/sh
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
#gnome-session --session=ubuntu-2d &
gnome-session --session=gnome-classic &
# exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &
#gnome-session &