by

Ubuntu to Mac OS X Screen Sharing with Vinagre

After installing Avahi following this post and are running Ubuntu, it is easy to configure Ubuntu to use Vinagre (a VNC client) to remotely share the desktop with machines running OS X on your local area network (LAN) via the Share Screen... button in Finder. The following guide will gets you started. (Note: In order to share the Ubuntu screen, the following configuration requires you to be logged into a Ubuntu session. Remaining logged into Ubuntu while you are away from the machine is not secure, but for my purposes and perhaps yours it is acceptable. I have yet to figure out how to enable resumable sessions that grant access to the Ubuntu login screen.)

To share your Ubuntu desktop with OS X, a few Vinagre preferences must be set so that it will accept connections from your Mac. Open the Vinagre preferences panel using the following terminal command.

vino-preferences

In the general tab check “Allow other users to view your desktop”, “Allow other users to control your desktop”, and “Require the user to enter this password”. Uncheck “Ask you for confirmation” and then enter a password where indicated. It can be the same password as the one associated with your user account on the Ubuntu machine. In the advanced tab, ensure that everything is uncheck except for “Use an alternative port”. Specify port 5901 in the box next to this option. In may be tempting to check the “Require encryption” option, but for some reason when this is enabled, OS X can not connect to Vinagre. Close the preferences panel.

To advertise the VNC client to Macs on your LAN, a few changes must be made to the Avahi configuration. If you have not installed Avahi, do so now following this post. Create a file to specify information about the VNC server.

sudo vim /etc/avahi/services/rfb.service

Copy and paste the following XML into this file.

<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_rfb._tcp</type>
<port>5901</port>
</service>
</service-group>

Then, restart Avahi.

sudo /etc/init.d/avahi-daemon restart

At this point, the Share Screen... button should appear on your Mac running OS X when you select the Ubuntu machine running Vinagre in Finder. As long as you are logged into a session on the Ubuntu machine, you will now be about to view the Ubuntu screen by clicking this button and entering the password that you specified in the Vinagre preferences panel. Note that OS X will throw a warning when you try to connect because the connection is not secure, but the connection will work. If anyone figures out how to configure encrypted screen sharing, please leave a comment below.

1 Comment


  1. // Reply

    Ok now how do I set this up on a machine that does not have a display attached? Are the vino-preferences settings saved to a file that one can just copy over?
    I want to configure a remote machine to serve its desktop over vino so I can access it from my macbook, but the instructions above are only useful if that remote machine already has a physical display attached.

Leave a Reply

Your email address will not be published.