SqueezeCenter and Apple TV Take 2

I decided to take the plunge today and install the Apple TV Take 2 update on my Apple TV and attempt to get the SqueezeBox software (now called SqueezeCenter) running on it. I previously had this running on Apple TV version 1.1, but I want the ability to rent movies, so I had to update my Apple TV and decided to install the new SqueezeCenter at the same time. Unfortunately this has been quite complicated. I almost have things working.

  1. Following the instructions in this thread, I created a PatchStick to install SSH on my updated Apple TV. Prior to updating the Apple TV, I copied all the necessary SSH files off my Apple TV
  2. Pick up the latest SqueezeCenter (7.0) and the XM Radio Plugin
  3. Create a folder on the Desktop called SlimServer
  4. 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.common
    
    SERVER_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 "SqueezeCenter.app/Contents/Resources/start-server.sh"
        popd
    fi
    if [ z"$#" != z"0" ] ; then
        ConsoleMessage -S
    fi
    }
    
    StopService() {
    if [ z"$SERVER_RUNNING" != z ] ; then
        kill `echo $SERVER_RUNNING | sed -n 's/^[ ]*([0-9]*)[ ]*.*$/1/p'`
    fi
    }
    
    RunService "$1"
  5. Tar up the folder:
    cd ~/Desktop
    tar -cvf slim.tar SlimServer
    
  6. On a Tiger machine:
    cd /System/Library/Perl
    tar -cvf ~/Desktop/perl.tar 5.8.6
    
  7. Mount the SqueezeCenter dmg file that was downloaded above
  8. From the image, copy Install Files/SqueezeCenter.prefPane/Contents/server to your desktop
  9. Place the XMRadio plugin in ~/Destkop/server/Plugins
  10. Modify ~/Desktop/server/SqueezeCenter.app/Contents/Resources/start-server.sh to add
    HOME=/Users/frontrow; export HOME

    before the ./slimserver.pl lines

  11. Replace the mDNSResponderPosix with the one from the SlimServer 6.5.4 as the one for SqueezeCenter apparently is a PPC only app and the Apple TV doesn't have Rosetta. The SqueezeCenter developers are going to fix this.
  12. Tar up the folder:
    cd ~/Desktop
    tar -cvf server.tar server
    
  13. sftp -1 frontrow@appletv.local

    (Password is frontrow)

    put slim.tar
    put server.tar
    put perl.tar
    
  14. Login via ssh using
    ssh -1 frontrow@appletv.local

    password is frontrow

  15. Change the root file system to read/write using
    sudo mount -uw /
  16. Uncompress the files
    tar -xvf perl.tar
    tar -xvf server.tar
    tar -xvf perl.tar
  17. Move the Perl modules into a good spot
    sudo mkdir /Library/Perl
    sudo mv 5.8.6 /Library/Perl
    
  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
  25. Use iTunes to change the ID3 tags to version 2.2.0 and use that option to Reverse the Unicode strings to repair some issues with my database

I'm still trying to get the XM Radio plugin to allow 2 simultaneous connections, but other than that, I'm done. This has been a torturous process, but I figure by the next time I have to do this, I'll be able to do it in minutes :-)