Connect to a Mac OS X Screen Sharing Server with Ubuntu's Remote Desktop Viewer


Summary

  • Use Mac OS Screen Sharing to view your Mac screen on an Ubuntu client.
  • Applies to: Ubuntu 10.04 - 16.11, Mac OS X 10.7, 10.6 and 10.5.
 Updates

[from the comments, below]

February 14, 2012 2:35 PM
I just tested this with Ubuntu 11.11, and connected to Mac OS 10.7, 10.6 and 10.5. The credentials you should enter: your Mac desktop log in.

August 16, 2012 11:23 AM
Note that a long VNC password (over 8 characters) can cause problems. Since Screen Sharing uses your desktop account password, that can be a problem if that password is too long. Either: 1) shorten your password; or 2) use a separate Mac desktop account to administer the computer over VNC. Ideally you're using a separate account to administer the machine, anyway. Use a password generator to create a strong 8 character password for this account.


Original Post:

Recent versions of Ubuntu, such as the recently released Ubuntu 10.04 LTS ("Lucid Lynx") include by default the Remote Desktop Viewer (Applications : Internet : Remote Desktop Viewer), which is really Vinagre, A VNC Client for the GNOME Desktop. This VNC client supports connections to Mac OS X using the Mac's Screen Sharing service, Apple's built-in implementation of the VNC server protocol.

Whether this works flawlessly or causes no end of frustration depends entirely on how you configure the Mac Screen Sharing server. Here's how to start viewing your Mac's screen (the server) on your Ubuntu desktop (the client).

Mac OS X 10.5 (Leopard)

The Mac VNC Server is called Screen Sharing. To configure it:
  1. Open System Preferences : Sharing
  2. Click the lock to make changes and enter an administrative user name and password.
  3. Check Screen Sharing and Screen Sharing: On appears.
Configure Authentication Preferences
  1. Click [Computer Settings]
  2. Check Anyone may request permission to control screen
  3. Check VNC viewers may control screen with password:
  4. Enter a password you'll remember.
  5. Click [OK]
  6. Select Allow access for: All users
  7. Click the lock to prevent further changes.
Mac Configuration Tips

  • You must specify a password, and not just for security reasons. If the Ubuntu Remote Desktop Viewer tries to connect to a Mac without a password set, it becomes confused and the connection fails.
  • You must allow Anyone to request permission to control screen and allow access for All users or you won't be able to log in either.
Connect using Ubuntu's Remote Desktop Viewer

Log into your Ubuntu desktop computer. To view your Mac's screen:
  1. Select Applications : Internet : Remote Desktop Viewer
  2. Your Mac's Computer Name should appear in the list of servers in the left column.
  3. Click on you Mac's name and type in the password you entered on the Mac.
  4. Click [Connect]
Troubleshooting Tips

Although OS X 10.5 runs on PowerPC Macs, like G5 computers, Vinarge gets the colors wrong when it displays the desktop. Intel Macs running 10.5 don't have this problem.

Comments

PaulN said…
Outstanding - this resolves one of those long-standing and minor yet truly irritating problems. Thank you!

/p
CJ Travis said…
This worked like a charm on OS X 10.6 and Ubuntu 10.04. Thanks for the write-up!
Anonymous said…
I am trying to set this up. Do you have to open/set any ports on the routers at the mac end and Ubuntu end?
Neil Johnson said…
I think you mean "firewalls," not "routers," and the answer is yes, you do need to open ports on the server -- in this case, the Mac. The good news is that it's easy, and most likely already done. If you are using the Mac (Snow Leopard) firewall, your Mac should automatically open your firewall ports for any services, including screen sharing, that you activate on the Mac's Sharing control panel.

You don't usually have to open any ports on your Ubuntu client, unless you have gone out of your way to block most incoming traffic. This is not the default configuration for Ubuntu 10.04 (and most versions of Ubuntu), so you should be all set there.

To check your current firewall settings on your Snow Leopard (10.6) Mac, see my recent post, Set up the Mac Snow Leopard (10.6) Firewall to Allow Screen Sharing.
Ted said…
good article.thanks.
However do you know how to avoid that the remove viewer is freeze when there is idle for certain time. In such condition I have to close the session and connect to remote Mac again. Can we avoid this behaviour?

Thanks.
Neil Johnson said…
@Ted: I've seen the screen freezing behavior too. I think that's a bug in the client software. You could try a different VNC client on Ubuntu, as the Mac uses the VNC protocol, and you'll find a number of "approved" VNC clients in Ubuntu's Add/Update software tool -- or you can search for "VNC" in Synaptic to find the most options.
Andy said…
outstanding!
As an (inexperienced) Apple Server Admin for a small London secondary school this had made my job a whole lot easier!
I've become a Linux/Ubuntu fan over the past year, and your advice now means I can administer the school's mac with my linux box sat here on my desk.

Many thanks!
Epic Reviewer said…
It is asking for a username. what do I put? I've tried my login, the admin's login, but nothing works.
Neil Johnson said…
@EpicReviewer - I just tested this with Ubuntu 11.11, and connected to Mac OS 10.7, 10.6 & 10.5. The credentials you should enter: your Mac desktop log in.
Neil Johnson said…
Note that a long VNC password (over 8 characters) can cause problems. Since Screen Sharing uses your desktop account password, that can be a problem if that password is long. Either: 1) shorten your password; or 2) use a separate Mac desktop account to administer the computer over VNC. Ideally you're using a separate account to administer the machine, anyway. Use a password generator to create a strong 8 character password for this account.
Any tried with ubuntu 12.04 and mac 10.9.1 ?

Popular Posts