Recent site activity

Linux‎ > ‎

Fedora 13 and OS X 10.6 Interworking

Notes I'm taking on getting Fedora 13 and OS X 10.6 to play nice.

Access Fedora Filesystem from OS X

The following will let you see Fedora box in Finder and mount home directories.  You can also add additional share points.  Both can be used as locations for Time Machine.

yum install netatalk
chkconfig atalk on
vi /etc/atalk/AppleVolumes.default
[Change last line we ~ to ~ "%u" options:usedots,upriv]
[Add any addition shares as described by "man AppleVolumes.default".  For example"/mnt/USBDrive/TimeMachine TimeMachine options:usedots,upriv"]
service atalk start

In Fedora 14, it looks like netatalk is updated to advertise the afp server using Bonjour.  In Fedora 13, you'll need to manually advertise this.  Do this by creating a file called /etc/avahi/services/afp.service.  Add following contents:

<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_afpovertcp._tcp</type>
<port>548</port>
</service>
</service-group>

Using Fedora Filesystem to Time Machine

Time Machine will not like the Fedora AFP server by default.  This may change when upgrade to newer netatalk in Fedora 14 (based on git commits I see upstream.  In mean time, you can work around this.  On OS X, launch a terminal and issue following command:
defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1
Make sure you've mounted the Fedora share where you want to store Time Machine backups in Finder and then launch System Preferences->Time Machine.  You should now be able to select the Fedora share as your disk.

Remote Desktop

Enabling Remote Desktop under Gnome will automatically make Fedora box visible under OS X Finder.  Clicking on connect button will work fine.

Enabling Remote Desktop under OS X will automatically make OS X visible under Fedora's "Remote Desktop Viewer" app.  Clicking on OS X will give an error message about authentication method being unsupported.

TODO: I've read that by default, OS X uses its own authentication protocol that understands OS X users/groups and their passwords.  If you enable "Log in with passwords", or similar option in OS X preferences then its supposed to fall back to standard VNC authentication.  That means you must enable VNC passwords to interoperate with Linux.  I've not tested this yet.

Printing to remote CUPS rinters

Fedora and OS X both use CUPS so you'd think this would be a piece of cake.  For what ever reason, discovering of remote CUPS printers was disabled in OS X 10.6 (Snow Leopard).  It can be enabled by issuing following command from a terminal:

cupsctl BrowseRemoteProtocols=ALL

Then Fedora printers will be visible and you can add a printer in system preferences as you normally would (assuming you've enabled sharing and such on Fedora side using its printer configuration and printer server settings).

TODO: I've not tried printing from Fedora to OS X but I assume its similar and just works if you set printer to be shared.

TODO I attempted to allow viewing Linux printers without the BrowseRemoteProtocols modfiication by installing "netatalk" package and editing the file /etc/netatalk/papd.conf to add following line:

cupsautoadd:op=root:

Upon restarting netatalk, message log prints a message about netatalk was not compiled with CUPS support.

TODO: Recompile netatalk package, enable cups support, and send modification to Fedora.

Sharing Music

If you load Rhythmbox, it will automatically see iTunes running from OS X.  Clicking on OS X share name will give status message of "Retrieving songs from music share" and it will hang there.

Wikipedia's page on DAAP states that as of June 2010, the newer authentication has not be reverse engineered and so non-iTunes apps can not connect to iTunes version 7.0 or newer.  I guess if that is ever done then Rhythmbox will naturally gain support with an upgrade.

It is no problem to share Fedora music with OS X.  Run Rhythmbox and click Edit->Plugins.  Make sure DAAP Music Sharing has a check mark and click on its Configure... button.  Make sure its enabled.  This allows at least MP3 files to be played from OS X side in iTunes.

Using Linux Disk for Time Machine Backups

Its pretty easy to set up Linux to support Remove Disks using the AFS protocol that OS X seems to prefer.

First, we need to install the "netatalk" package (yum install netatalk) and then edit the file /etc/netatalk/AppleVolume.default.  Make sure bottom of file looks like this.  This tells which directory to make look like a network drive.

# The line below sets some DEFAULT, starting with Netatalk 2.1.
:DEFAULT: options:upriv,usedots

# The "~" below indicates that Home directories are visible by default.
# If you do not wish to have people accessing their Home directories,
# please put a pound sign in front of the tilde or delete it.
~ "%u" options:usedots,upriv
/path/to/put/backups TimeMachine options:usedots,upriv

Also, edit /etc/netatalk/netatalk.conf and make sure following options say "yes".

ATALKD_RUN=yes
AFPD_RUN=yes

So that OS X will see this Linux box is an AFS service, avahi needs to be informed about them.  Probably in a future release of netatalk, this part will not be needed as netatalk git shows hints of auto-registration with avahi.  In mean time, edit /etc/avahi/services/afp.service and place this text.

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

Then restart netatalk and make sure its registered as a service to always start up.

Its best to create a user account on Linux with same name as OS X user account.  The user account needs read/write permission to any global directories (non-home directories) that you add above.  Or you can skip that part and let backups be stored in home directory of user account.

By default, OS X will not let you use what it calls "unsupported" remote drives with Time Machine.  You have to execute the following option from an OS X terminal to allow this:

defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

From that point on, in the Time Machine preference were you select drive to use, the Linux box will show up as long as avahi is correctly advertising it and netatalk is correctly running.