
Using Firefly, your Ubuntu machine can host an iTunes media server which, with the help of Avahi installed as per this post, will show up in the iTunes “SHARED” list and will be accessible via Front Row. The following guide (written for Ubuntu Hardy Heron 8.04 and OS X Leopard 10.5.2) will get you started.
Install Firefly (mt-daapd) using the aptitude package management software. Open a terminal on your Ubuntu machine and type the following command:
Make sure that the ID3 tag reading libraries are also installed (Firefly uses these).
After Firefly is installed, it must be configured to server media from a specific directory. It is helpful if you can connect to this directory remotely using Netatalk to deposit files. If Netatalk is not installed on your Ubuntu machine, then see this post to do so. Since Netatalk by default serves the home directory of all users, the easiest thing to do is to create a new user and put the media directory in this users home directory. Below are the commands to make a new user (here called “media”), switch to this new user, make a music directory in the user’s home directory, and exit the new user.
su media
mkdir /home/media/music
exit
If Netatlak is installed and running, you should now be able to connect to this new user on your Mac via Finder and copy songs to the music folder. Now you are ready to start the Firefly media server.
Execute the following command to ensure that the Firefly server starts at boot.
Now we must edit the Firefly configuration file to point to the media directory you just created. The easiest way to do this is by using the web interface although you can also open the configuration file and manually edit it. It is well commented and is called /etc/mtdaap.conf. To open the web interface type the following in your Mac or Ubuntu web browser substituting your Ubuntu machine’s IP address for mine which is 192.168.1.5 (If this doesn’t work, keep reading).
This address specifies the connection is to be made through port 3689, the default Firefly port that can be changed manually in the configuration file. If you are attempting to open the web interface on the machine on which the Firefly server is running, this address may not work. It depends on your network configuration. If it doesn’t work try substituting localhost for the IP address. When prompted enter the default user name (mt-daapd) and password (also mt-daapd). Navigate to the configuration panel where you can change the server name, administrator password, music password (the password users have to enter via iTunes to access the shared music, I keep mine blank), the music folder (this should be changed to point to the directory created above), and database scan type and frequency. Music will not show up in iTunes or Front Row, even if it exists in the shared media directory, until the server scans the directory. You can force a scan by clicking the “Start Scan” button in the “server status” panel. That’s it, enjoy the music.
Streaming Video Using Firefly
In addition to music files, Firefly is also able to serve video to iTunes. However this functionality seems to be buggy. For example, video files must have .mov or .m4v encoding in order for them to play. To discover video files in the media directory, add .mov and .m4v (comma separated) to the list of extensions in the configuration panel of the Firefly web configuration page and rescan the server for files. You can also play .mp4 files but you have to change the extension to .m4v. It seems that iTunes video playback via Firefly is also a little buggy. In order to see the video once a file was playing, I had to click on the “Now Playing” window in iTunes. Video does not seem to work at all in Front Row. Hopefully future releases of Firefly will fix some of these problems.
This post is one of five in a series on how to integrate Ubuntu into a Mac OS X Network. Check out the others linked to below.
Ubuntu Guide: Configure a Netatalk File Server Based on Apple Filing Protocol (AFP)
Ubuntu Guide: Configure Avahi to Broadcast Services via Bonjour to Mac OS X
Ubuntu Guide: Configure Vinagre to Share the Screen with Mac OS X
Ubuntu Guide: Configure a Firefly (mt-daapd) Streaming Media Server for iTunes and Front Row
Ubuntu Guide: Configure Netatalk to Share a USB Printerr
