Play iTunes from anywhere via SMB

Feb 14, '06 05:29:00AM

Contributed by: Anonymous

OK, so this is probably a combination of all sorts of previous hints, but this is how I access, listen to, and even edit my iTunes music, located at home, from any place with an internet connection via SMB. This is an alternative to a recently published hint about using zerospan to access your iTunes music as shared music via Bonjour. I tried that hint, but didn't succeed because of firewall issues, I think.

Read on for the step-by-step...

I recently bought a LaCie Ethernet Disk Mini, and connected it to my router. I then copied my iTunes Music Folder (the actual audio files, in ~/Music -> iTunes -> iTunes Music) on my iMac G5 to the Ethernet disk, and then specified the name of the share as the new location for my music in iTunes' preferences (ie /Volumes/share/itunes music). iTunes just plays from it as if it was an external hard disk (as expected, nothing new). The only thing is to make sure that the share is mounted before iTunes starts up, otherwise iTunes will fall back to the default location for music files on your local hard drive. For this, I created an AppleScript that first mounts the share, and then starts up iTunes.

Then I copied the whole iTunes folder (~/Music/iTunes, now without all the music files, but with all the library data) to my iBook, in the exact same relative location. I also copied the com.apple.iTunes.plist from the Preferences folder. So this way, my iTunes application shows up and behaves the same on both computers. Nice.

The next thing was to automatically synchronize this data on a regular basis, so newly added files on my iMac would also show up in iTunes on my iBook. There are many ways to do this; I chose to use Déjà Vu.

My router supports dynamic DNS, so I subscribed to dyndns.org to make my ever-changing IP number easily accessible from anywhere with myname.dyndns.org. I Then applied some port forwarding on ports 137-139 (SMB) to my Ethernet disk.

Now on my iBook (and this was my own magic moment!), I established an SMB connection at work to the Ethernet disk share at home. I did this by typing Command-K (or Go: Connect to Server) in the Finder, and then entering the path to the disk:

smb://username:password@myname.dyndns.org/nameofmyshare
The share appeared on my desktop, and iTunes just recognizes it as a normal network share. Voila! This way I even can edit lyrics, artwork and ID3 tags from my iBook at work. Keep in mind that playlists and 'last played' information, etc., created on the iBook will be overwritten by the next synchronization, because that sort of information is stored in the iTunes Library file.

There are a few questions, though. Would the above also be possible via AFP or FTP? Is it safe / secure (SMB with password)? I assume not: last week, I left port 137-139 open for a couple of days, and suddenly there was a bcvsrv32.exe on my share. Glad i'm not on Windows...

Comments (12)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20060127152927466