Using built in VNC server for KDE or Gnome I ran into several problems, like screen freeze or lost connection.
If you need a VNC server for your current desktop session in (K)Ubuntu you can use x11vnc.
1. install packages
sudo apt-get install x11vnc
2. set a password
3. start the server
x11vnc -forever -noxdamage -usepw
If you want to access your desktop via browser using a java applet you have to installa vnc-java package and use this commans:
sudo apt-get install vnc-java x11vnc -forever -noxdamage -usepw -httpdir /usr/share/vnc-java/ -httpport 5800