How to Install Ubuntu Desktop and VNC Server on Ubuntu Server14.04

You may install default Ubuntu Desktop on Ubuntu Server 14.04 with the following procedure.

Installing Ubuntu Desktop

1. Log in your Ubuntu Server 14.04 and run update,
sudo apt-get update
2. Install Ubuntu Desktop without other packages,
sudo apt-get install --no-install-recommends ubuntu-desktop
3. Reboot Ubuntu server,
sudo reboot
4. Install other packages,
sudo apt-get -y install gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal

Installing VNC Server

1. Use the following command to install VNC Server
sudo apt-get -y install vnc4server
2. Go to /home/administrator/.vnc/ folder and create/modify xstartup,
cd .vnc
vi xstartup
3. Place the following content to xstartup,

# Uncomment the following two lines for normal desktop:
# 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-panel &
gnome-settings-daemon &
metacity &
nautilus &
4. Create VNC session automatically when system is rebooted,
crontab -e
Add the following content,
@reboot /usr/bin/vncserver :1 -geometry 1024x768
The resolution can be changed according to the resolution of your monitor.
4. Run VNC command to create password,
You will be asked for providing password. Simply type your password following the command. At this moment, you may connect the server via VNC client.
5. Reboot the server (Optional)
sudo reboot
When the server is rebooted, a VNC session will start up automatically. Simply connect the server via VNC client. The session number will be 1. Use 'IP-Address:1' as VNC Server name when opening VNC client.

Add Feedback