Setup and configure VNC Server on Ubuntu

How to setup Vnc4Server in just 3 steps on your Ubuntu 14.04 LTS Desktop or Server.

Step 1 – Install gnome so you will get GNOME GUI for VNC Server while accessing Desktop

# sudo apt-get install gnome-core

Step 2 – Install VNC4Server now

#  apt-get install vnc4server

Step 3 – Make changes in your xstartup in .vnc in home directory of user like this to get GUI working.

# sudo nano /home/user/.vnc/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 &
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &

metacity &
gnome-settings-daemon &
gnome-panel &


How to run VNC server to access it from network machines

# vncserver -geometry 1366x768

For the first time you have to setup the password for vnc user, using that password you will get the access to VNC user

How to kill VNC running machine

# vncserver -kill :1

You may also like...