How to log into your ubuntu machine with GUI (X) before gnome has started

Step 1: install x11vnc: sudo apt-get install x11vnc

Step 2: ssh -L5900:localhost:5900 username@remotehost

Step 3: sudo x11vnc -ncache 10 -display :0 -usepw -q

Step 4: Connect to remote server by using built in Remote Desktop Viewer

Enjoy! ?