Install VNC server in Ubuntu 12.04

This simple tutorial will show you how to install and setup vnc server (tightvncserver) in Ubuntu 12.04 ,after which you can control your Ubuntu from remote,here we go.

1Open a terminal in your Ubuntu by pressing Ctl+Alt+t or from Dash

2.Run below command in your terminal to install tightvncserver

sudo apt-get install tightvncserver

3.Then run below command to create a VNC session,type the vnc password twice.

vncserver -geometry widthxheight

4.Now you can connect vnc session  j-ubuntu:1 using  a VNC client from remote.For Windows you can download tightvnc from

After type in your the vnc password you set in step 3 ,you will connect to your ubuntu now

5.(Optional), you can use below command to change your vnc’s password in Ubuntu 12.04


6.(Optional),to kill your vnc session you can use command “vncserver -kill :1”

vncserver -kill :1



7 thoughts on “Install VNC server in Ubuntu 12.04

  1. Derek

    Thank you very much for your tutorial. I would like to know how I can start the VNC server on startup (i.e. before login). Your help is appreciated.

  2. Brian

    This doesn’t seem to work. Unity doesn’t load for me in 3d mode – I have to set the desktop environment in xstartup to ubuntu-2d, and in this mode many of the preferences and system dialogs do not work. Somewhat useless :P.

  3. Arakon

    In additional, offcourse, you need to switch the display of server(though ssh for example) and start your x-shell, e.g:
    $ export DISPLAY=:X (where X is port of connection)

  4. Pingback: Problem: CPU usage by unknown source | My Findings

Leave a Reply

Your email address will not be published. Required fields are marked *