Sunday, July 8, 2012

Remote access ubuntu 11.10 from mac

http://mlepicki.com/2011/10/remote-vnc-login-to-ubuntu-11-10/



Remote VNC login to Ubuntu 11.10


Today I’ve installed Ubuntu 11.10 Oneiric Ocelot on my ASrock 100HT nettop. I’ve wanted to remotely control this box via VNC protocol.
My solution was x11vnc server, so I could share one one session between remote and physical access. I’ve found useful thread about x11vnc on Ubuntu 11.10 – I’ve just added some upstart magic to start x11vnc after lightdm.
First of all, I’ve installed x11vnc:
apt-get install x11vnc
Then, I’ve created /etc/init/x11vnc.conf file:
start on login-session-start
script
x11vnc -xkb -noxrecord -noxfixes -noxdamage -display :0 -auth /var/run/lightdm/root/:0 -forever -bg -o /var/log/x11vnc.log
end script
After restart, x11vnc shoud listen on vnc startard port – 5900.
This script is of course based on upstart event mechanism. Lightdm emits login-session-start event (you can find it in lightdm.conf), and we start x11vnc when this event is emited – that’s first line of x11vnc.conf file.



Then, here is a youtube video showing step by step how to use vnc viewer to connect to the ubuntu machine.
http://www.youtube.com/watch?v=GY75u6TthH4