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 will get you started.
Install Firefly (mt-daapd) using the
apt-get package management software. Open a terminal on your Ubuntu machine and type the following command:
sudo apt-get install mt-daapd
Make sure that the ID3 tag reading libraries are also installed (Firefly uses these).
sudo apt-get install libid3tag0
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.
sudo adduser media 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.
sudo /etc/init.d/mt-daapd start
Execute the following command to ensure that the Firefly server starts at boot.
sudo update-rc.d mt-daapd defaults
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.