One way to play iTunes music over the internet
Jan 09, '08 07:30:02AM
Contributed by: romahony
This hint will allow you to stream your music over the Internet using any version of iTunes. It relies on Macfuse and Macfusion to mount an ssh connection as a local file server. Please back up all music before you try this, as if you delete all your music by mistake, it's not my fault! First, on the Mac that's going to send the music (the "server"):
- Quit iTunes
- Copy your iTunes Music folder to another partition or an external drive. My other partition is called Store.
- Open iTunes, and go to Preferences » Advanced. Change the following settings:
- Change iTunes Music folder location to Store:iTunes Music, with Store being your partition name.
- Insure that Copy Files to iTunes Music Folder When Adding to Library is unchecked.
- Quit iTunes again.
- You may want to back up to somewhere else before doing this step. Delete the following files from your Music:iTunes folder: iTunes Library and iTunes Music Library.xml.
- I recommend that you move the iTunes Music folder that is also in this directory to your Documents folder for backup. You can delete it at the very end if everything goes OK.
- Now open iTunes again. We are going to regenerate your iTunes Library. You will note that iTunes creates the two files from above again on launch. This is what you want.
- In iTunes go to File » Add to Library. Select the other partition and the iTunes Music folder that you copied there in step two. The files will be added to the Library, but will not be copied to your boot partition as you unchecked that box earlier.
- Once this is complete, you can quit iTunes just to clear up your screen.
- Open System Preferences » Sharing, and turn on Remote Login. You will need this later.
- Copy the following files by any means to your client machine -- note that these are the new ones you have created, not the older ones you moved: iTunes Library and iTunes Music Library.xml.
Read on for the setup for the listening ("client") Mac.
Here's what you need to do on the machine that will be playing the music:
- Install Macfuse and Macfusion. It's beta software, but they're very good quality betas. You may need to reboot. Do so if prompted.
- Once all rebooted and installed, insure that iTunes isn't running.
- Back up everything in your Music » iTunes folder on this Mac; I recommend to your Documents folder. So now your Music » iTunes folder should be empty. Do not launch iTunes until told to do so.
- Open MacFusion. You will see it launch to a menu item on the top of the screen.
- Select it, and pick Quick Mount SSH.
- Enter a Name -- it needs to be the same name as the name of the volume on the server; Store in my case. Enter information on your server (DNS or IP; see below how you can get a DNS name if you don't have a direct web connection). For the Server Path, enter, for instance, /Volumes/Store in my case. Enter your short username for the server as Username. Click OK. You will need to enter your password to mount the server. You can also add this to your keychain at this stage.
- Now you should see a network partition mounted on the desktop. If you don't, then open Terminal and type open /Volumes/Store, with Store being the name of your partition. If you see that you have access to your remote partition on the server, you can continue. Otherwise, go back to MacFusion and try again.
- Now move the files you copied from the server to your Music » iTunes folder.
- Open iTunes.
If all went to plan, you will be able to play all the files from your server on your client's iTunes. You will need to mount the remote drive after each reboot to play the music.
Advanced Notes:
- You can also make a second partition out of some of the free space that you have on your internal drive in Leopard using Disk Utility. Don't leave too little space on your OS/Boot partition as it needs disk space for swapping. I would leave at least 20GB free on the boot partition. Again here you do this at your own risk. You should back up before doing this, as it could all go wrong, but it has never happened to me.
- It is presumed that you have a direct connection to the web with the machine that contains your iTunes Music. Of course, if you don't, then you can use port forwarding to expose your SSH port to the web. Even if you have a dynamic IP, you can use DynDNS, which is free, to give your Mac a static DNS name.
- You can have iTunes open and running on both client and server, playing at the same time without any problems. If you add stuff on the server, you will need update the two client files that you copied from the server again.
- There is software that helps you manage multiple Libraries for iTunes. You could use one of those, or multiple users on the client, so that you don't have to mess with iTunes on your Client.
[robg adds: I haven't tested this one -- and please, heed the backup warnings. There's lots of moving and deleting going on here, and losing your music (especially purchased songs) would really ruin your day.]
Comments (15)
Mac OS X Hints
http://hints.macworld.com/article.php?story=20080103153228135