Installing SlimServer on an AppleTV

One of the services I needed to move off my server before shutting it down was SlimServer which runs my Squeezeboxes. I had looked at a few small PCs that were ultra quiet and as I was looking at the Shuttle website, it compared one of their boxes to a Mac Mini. Hmmm, I have an extra one of those lying around that I could use and then remembered I have an AppleTV that I’m not using. So, I decided to see if I could install SlimServer on the AppleTV as it is fanless and super quiet. Here’s what I did:

  1. Download Patchstick
  2. Follow the procedure and install Patchstick from a USB thumb drive
  3. Download the Mac OS X version of SlimServer
  4. Download the XMRadio plugin
  5. Edit XROAPI.pm in the plugin by commenting out
    	if ( defined( $self->{activeClient} ) ) {		return [			$client->string('PLUGIN_XMRADIO_ERROR_HEADER'),			$client->string('PLUGIN_XMRADIO_IN_USE') . ' ' . $client->name()		];	}

    So that I can have more than 1 Squeezebox talking to XM at the same time.

  6. From the AppleTV, enable AFP in the awakwardTV menu
  7. Mount the SlimServer dmg file that was downloaded above
  8. From the image, copy Install Files/SlimServer.prefPane/Resources/server to your desktop
  9. Place the modified XMRadio plugin in ~/Destkop/server/Plugins
  10. Mount the AppleTV volume via AFP
  11. Modify ~/Desktop/server/Slim Launcher.app/Contents/Resources/Start Slim Server.sh to add
    HOME=/Users/frontrow; export HOME

    before the ./slimserver.pl line

  12. Copy ~/Desktop/server to the AppleTV’s AFP volume
  13. Create a folder on the Desktop called SlimServer
  14. In that folder create 2 files. The first is called StartupParameters.plist and it contains:
    {  Description     = "SlimServer";  Provides        = ("SlimServer");  Requires        = ("Disks");    Uses		= ("mDNSResponder", "Resolver", "DirectoryServices", "NFS", "Network Time");    OrderPreference	= "Last";    Messages =    {	start = "Starting SlimServer";	stop = "Stopping SlimServer";    };}

    The second is called SlimServer and it contains:

    #!/bin/sh. /etc/rc.commonSERVER_RUNNING=`ps -axww | grep "slimp3.pl|slimp3d|slimserver.pl|slimserver" | grep -v grep | cat`StartService() {ConsoleMessage "Starting SlimServer"if [ z"$SERVER_RUNNING" = z ] ; then	pushd "/Users/frontrow/server"    sudo -u frontrow "Slim Launcher.app/Contents/Resources/Start Slim Server.sh"    popdfiif [ z"$#" != z"0" ] ; then    ConsoleMessage -Sfi}StopService() {if [ z"$SERVER_RUNNING" != z ] ; then    kill `echo $SERVER_RUNNING | sed -n 's/^[ ]*([0-9]*)[ ]*.*$/1/p'`fi}RunService "$1"
  15. Copy the SlimServer folder to the AppleTV’s AFP volume
  16. Login via ssh using
    ssh -1 frontrow@appletv.local

    password is frontrow

  17. Change the root file system to read/write using
    sudo mount -uw /
  18. Move the SlimServer folder using
    sudo mv /Users/frontrow/SlimServer /Library/StartupItems/
    
    
  19. Make the SlimServer file executable
    sudo chmod +x /Library/StartupItems/SlimServer/SlimServer
  20. Change the owner
    sudo chown -R root:wheel /Library/StartupItems/SlimServer
  21. Disable auto updating
    sudo bash -c 'echo "127.0.0.1       mesu.apple.com" >> /etc/hosts'
  22. Restart the AppleTV
    sudo reboot
  23. From Safari goto: http://appletv.local:9000/
  24. Change the music directory in the SlimServer prefs to /mnt/Media/Media Files

The only problem so far is that it creates multiple Albums for each album due to how the AppleTV stores the music.

6 Replies to “Installing SlimServer on an AppleTV”

  1. Very intersting, Scott,
    I was looking for a way my ATV could control my Squeezebox without the use of a browser like Safari (or without the use of SlimServer for that matter) but more like a plugin into ATV’s gui, not leaving the standard menus.

    What do you think, would that be possible?

  2. Hi Scott,

    I can’t believe I’ve stumbled across your Blog! I’m on the cusp of getting an Apple TV and the ONLY thing holding me back from shutting down me SME Server at home is SlimServer runs on it. I only have the one squeezebox3 which I use for all the local radio stations and also a few albums that I have ripped from CD.

    Are you still using your AppleTV as a ‘server’ for Slimserver/Squeezecentre? Would be very interested in hearing how it’s still running if indeed it is.

    Regards

    Rob

  3. Yup, I still use my AppleTV as a server running SqueezeCenter. We now have 2 SqueezeBoxe V2 and 1 SqueezeBox Duet running off it. We mostly stream XM Radio on one and have 2 of my son’s favorite songs on the other ones. I’m about to upgrade to SqueezeCenter 7.3.2 as someone is working on an XMRadio plugin that is compatible with it; I’ve been stuck at SqueezeCenter 7.2 as the XMRadio plugin is key to us.

    The AppleTV is (knock on wood), rock solid for SqueezeCenter. Note that I don’t really use the AppleTV for what it was intended; just for the SqueezeCenter.

  4. Scott,

    This really is awesome, I have Squeezecenter running on my ATV after using your instructions, many thanks.
    My only issue is that it doesn’t start automatically, I need to run slimserver.pl from Terminal and was hoping you may be able to help. I am not a technical expert, but I am assuming that creating the plist file above isnt as simple as using cut and paste into the text editor? Could this be the problem? I clearly havent created a valid plist!

    Thoughts?
    Marc

  5. Marc,

    When doing step 14, make sure the line endings are UNIX line endings. This is the key in valid plists. In addition, make sure you follow step 20 to set the permissions on that folder.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.