This tutorial shows how to enable ubuntu desktop sharing and connect ubuntu desktop from Windows/Ubuntu machine.
Enable ubuntu desktop sharing:
Go to System->Preferences->Remote Desktop.
In General tab,check the two checkboxes below Sharing.
If you want to require a password for this desktop,check “Require the user to enter this password” and set the password in box.
Connect from Ubuntu machine
Open a terminal window(Applications->Accessories->Terminal) and type this command:

vncviewer -fullscreen

Change the IP in the command.Press ‘F8′ and select Quit viewer if you want to quit the remote desktop.
Or,go to Applications->Internet->Remote Desktop Viewer.Click connect and type IP address.
Connect from Windows Machine
You may need to download vncviewer from this page.Once you install this,start vncviewer from start/All programs/RealVNC/VNC Viewer.