Install a Desktop and VNC Server on your AWS ubuntu server
after launch a new AWS ubuntu server virtual machine, there is no ubuntu-desktop support. To install a vnc server and see the desktop, need to install ubuntu-desktop first.
sudo apt-get install ubuntu-desktop gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal
This will install the full Ubuntu desktop environment, including office and web browsing tools. To install the desktop without these packages, run:
sudo apt-get install --no-install-recommends ubuntu-desktop gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal
Install the VNC server:
sudo apt-get install vnc4server
after you start vncserver and connect to vnc, you will see a grey empty desktop. ~/.vnc/xstartup need to be modified.
vncserver -kill :1
and then
#!/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 &
# x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
# x-window-manager &gnome-session &
gnome-panel &
gnome-settings-daemon &
metacity &
nautilus &
gnome-terminal &