OS X Leopard and Ubuntu Screen sharing - HOWTO

I just go a nice shiny new Mac Mini today to use as a testing machine.

To make my life easy I want to be able to connect to it remotely from my Ubuntu (Gutsy 7.10) laptop. Luckily with Leopard's new screen sharing and a bit of googling it's easy to connect both ways.

Ubuntu to OS X

The Apple screen sharing uses a version of VNC - but the default VNC client on Ubuntu won't work with it - however thanks to this post I discovered the xtightvncviewer will work.

You need to configure your Mac to allow it with the following settings:

  • Open "System Preferences"
  • Select "Sharing"
  • Ensure "Screen Sharing" is on
  • Select "Computer Settings" on the Screen sharing page
  • Tick both boxes - "Anyone my request..." and "VNC viewers may control..." and add a password.

Note the address of your machine also - eg: vnc://192.168.0.55 or similar

Then over to the ubuntu machine and install xtightvncviewer:

$ sudo apt-get install xtightvncviewer

Then connect to the machine with: (change the ip address as relevant)

$ xtightvncviewer 192.168.0.55
You will then get a prompt - enter the password and you should be good to go.

OS X to Ubuntu

Once I had that working I was keen to see if I could get it working the other way:

You need to enable remote desktop sharing in Ubuntu:

  • Select "System->Preferences->Remote Desktop" from the menu
  • Tick the following boxes: "Allow others to view...", "Allow others to control...", and "Require ... password" and enter a password.

Then open up safari and type in the the address of you Ubuntu machine with vnc:// in front of it. eg:

It will give a warning about the vnc server not supporting "Keystroke encryption" but it will work (albeit not as securely as a Mac to Mac connection) - but good enough for your local network.

That's it - I did notice that it also showed up in Finder->Shared which I presume it found via Avahi/Bonjour - which is nice.

Hope it helps. Cheers, Mark

Comments
Fela's Gravatar CHeers, I really wanted to get that going cause it was annoying having to use Vine server every time I wanted to VNC my PowerMac G5 from my Ubuntu box.

:) great tip!
# Posted By Fela | 2/17/08 4:46 PM
ron's Gravatar great post :)
# Posted By ron | 2/27/08 11:44 PM
Pieterjan's Gravatar Does not seem to work for me... :(
<blockquote>sean@ubuntu-hp:~$ xtightvncviewer 10.0.0.9
VNC server supports protocol version 3.889 (viewer 3.3)
VNC connection failed: Incompatible Version.
</blockquote>
I am missing something here?
# Posted By Pieterjan | 4/4/08 9:55 AM
Mark Lynch's Gravatar Hi Pieterjan,
What version of xtightvncviewer are you using?

try: xtightvncviewer -help
TightVNC viewer version 1.2.9

I'm using 1.2.9 and it works a treat.

Cheers,
Mark
# Posted By Mark Lynch | 4/13/08 10:08 PM
lefty.crupps's Gravatar xtightvncviewer doesn't work on my Debian Lenny setup either, version 1.2.9 as well, trying to connect to OSX 10.5.2 built-in VNC server:

lefty@debian:~$ xtightvncviewer alpha.sierrabravo.net
VNC server supports protocol version 3.889 (viewer 3.3)
Password:
VNC authentication succeeded
Desktop name "Administrator’s MacBook"
Connected to VNC server, using protocol version 3.3
VNC server default format:
32 bits per pixel.
Least significant byte first in each pixel.
True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0
Using default colormap and translating from BGR233. Pixel format:
8 bits per pixel.
True colour: max red 7 green 7 blue 3, shift red 0 green 3 blue 6
Got 256 exact BGR233 colours out of 256
Using shared memory PutImage
xtightvncviewer: VNC server closed connection
ShmCleanup called

lefty@debian:~$
# Posted By lefty.crupps | 5/14/08 6:55 PM
Darren Weber's Gravatar I've found Chicken of the VNC works well for OSX connection to my Ubuntu linux laptop. I installed Chicken of the VNC using macports.
# Posted By Darren Weber | 7/3/08 3:01 AM
BlogCFC was created by Raymond Camden. This blog is running version 5.1.004.