Menu

How to install MusicIP on Ubuntu Server Lucid/Karmic

Once you have installed Squeezebox Server there is a great little application called MusicIP which can be used to create intelligent playlists on-the-fly from within Squeezebox Server. As with a lot of this guide the following instructions work equally well for Lucid 10.04, Karmic 9.10, Jaunty 9.04 and Intrepid 8.10. Furthermore the guide also applies if you're using SqueezeCenter as opposed to Squeezebox Server.

PLEASE NOTE: If you're using the 64 bit version of Ubuntu then don't forget the last step at the bottom of this page.

First off we'll need to download and install MusicIP itself. Once we've done that we'll need to change the start order of Squeezebox Server and MusicIP to ensure that MusicIP starts before Squeezebox Server. If we don't carry out this step then Squeezebox Server will not be aware of MusicIP (since Squeezebox Server checks for it on startup) and will just default to using your regular library.

I've written this guide in two parts: The first part is for those of you running a purely headless Ubuntu system and the second part is for those people running a gnome desktop, either directly or via VNC

So, let's make a start.

Using the Command Line
(either via Putty or by typing directly onto the server):

You should be sitting in your home folder before you proceed:

cd /home/yourusername

to switch into your home folder where yourusername is your Ubuntu username.

So first off we need to download the MusicIP application from here by resting your cursor over the the Linux penguin on that page and then noting the full filename which gets displayed in the status bar of your browser. At the time of writing the full filename is: http://www.spicefly.com/files/MusicMixer_x86_1.8.tgz

So, type the following string into the Command Line or a Putty Session to download the file. Obviously you'll need to be using the actual filename which is displayed in your browser and so not necessarily this exact string.

TIP: If you're using Putty you can save yourself some typing by highlighting the command strings below then right-click on them and select Copy. Then toggle over to your Putty session and right-click once more. The string you highlighted here should be pasted into Putty.

wget http://www.spicefly.com/files/MusicMixer_x86_1.8.tgz

This will download the compressed MusicIP installation file into the folder you're currently sitting in.

Next type:

gunzip -c MusicMixer_x86_1.8.tgz | tar xf -

this will extract the files and create a folder called MusicIP in the folder you're currently sitting in.

You can now delete the MusicMixer_x86_1.8.tgz file since it is no longer needed:

rm MusicMixer_x86_1.8.tgz

We're actually interested in the MusicMagicMixer folder which is currently inside the MusicIP folder. So, type the following commands to fix this:

mv MusicIP/MusicMagicMixer MusicMagicMixer

this will move the MusicMagicMixer up one level

rmdir MusicIP

This will remove the, now empty, MusicIP folder.

mv MusicMagicMixer MusicIP

This will rename the MusicMagixMixer folder to be MusicIP

Now we want to edit the MusicIP configuration file (called mmserver) and make a couple of changes. So:

vim MusicIP/mmserver

This will open the mmserver file for editing. Next press the [Insert] key once and we now need to modify two lines:

USER= should be changed to USER=yourusername
where yourusername is the username you created when you installed Ubuntu.

You also need to change export MUSICHOME= to export MUSICHOME=/home/yourusername/MusicIP/
where yourusername is the same as above.

So the first few lines of the modified file should now read.....

#! /bin/sh

# NON-PRIVIELEGED USER TO RUN MUSICMAGICSERVER.
USER=yourusername
# PATH TO THE MUSICMAGICMIXERSERVER
export MUSICHOME=/home/yourusername/MusicIP/

Then press the [Esc] key once and type :wq to save and quit out of the file. If you make a mistake editing the file then issue :q! instead of :wq to abort your changes.

Next we need to move this configuration file into the /etc/init.d folder. This requires supervisor access hence the sudo:

sudo mv MusicIP/mmserver /etc/init.d/

Now we want to ensure that MusicIP starts before Squeezebox Server (or SqueezeCenter). So, type the following command and look for a file named Sxxsqueezeboxserver (if you have installed Squeezebox Server) or Sxxsqueezecenter (if you have installed SqueezeCenter) in the list of results returned.

ls -l /etc/rc2.d

We're interested in the xx part of Sxx. For example, in my installation it's S20. So the whole filename I would see after typing the "ls -l /etc/rc2.d" command above is S20squeezeboxserver.

To ensure that the MusicIP script (called mmserver) starts before SqueezeboxServer/SqueezeCenter we need to set mmserver to be one number below that of Squeezeboxserver/SqueezeCenter. So, in this instance I'd use 19 in the following command:

sudo update-rc.d mmserver defaults 19

Restart your server for the changes to take effect by typing:

sudo reboot -h now

If you've got a screen connected to your server then you should see MusicIP initialise before Squeezebox Server when the server is booting up.

Using a Gnome desktop to perform the installation
either directly or via VNC (See Install VNC guide)

NOTE: The following steps will be easier if you're reading this page from your gnome desktop since you can copy and paste the commands to save yourself some typing.

First off we want to download the MusicIP application from here by clicking on the Linux penguin. By default this will download a compressed file to your Desktop which at the time of writing is called MusicMixer_x86_1.8.tgz.

Next, from a Terminal/Putty session type the following command:

cd /home/yourusername/Desktop

where yourusername is the username you assigned when you installed Ubuntu. Next type:

gunzip -c MusicMixer_x86_1.8.tgz | tar xf -

this will create a folder called MusicIP on your Desktop (or wherever you happened to have saved the file).
You can now delete the MusicMixer_x86_1.8.tgz file from your desktop since it is no longer needed. You can do this by issuing a rm MusicMixer_x86_1.8.tgz from within a Putty or Terminal Session or simply delete it using the [Del] key from your Desktop or via Nautilus (Places -> Computer and navigate to the folder where the file lives).

Using Nautilus (Places -> Computer) open the MusicIP folder by double-clicking on it. Inside you'll see a folder called MusicMagixMixer. Drag and drop this folder into your home/yourusername folder and rename it to MusicIP. Delete the, now empty, MusicIP folder from your Desktop.

Now double-click on the MusicIP folder you've just moved into your home folder and double-click on the mmserver file. This file is the start-up script for MusicIP. Choose Display when prompted.

You need to modify two lines:

USER= should be changed to USER=yourusername
where yourusername is the username you created when you installed Ubuntu.

You also need to change export MUSICHOME= to export MUSICHOME=/home/yourusername/MusicIP/
where yourusername is the same as above.

So the first few lines of the modified file should now read.....

#! /bin/sh

# NON-PRIVIELEGED USER TO RUN MUSICMAGICSERVER.
USER=yourusername
# PATH TO THE MUSICMAGICMIXERSERVER
export MUSICHOME=/home/yourusername/MusicIP/

Now save and exit the file and next we'll move it to the /etc/init.d folder. We need supervisor access for this bit so, from a Terminal/Putty session type the following commands:

cd /home/yourusername/MusicIP

sudo mv mmserver /etc/init.d/

Next we want to change the start order of Squeezebox Server and MusicIP to ensure that MusicIP starts before Squeezebox Server. For this we'll use a graphical BootUp-Manager called bum.

So, from within the Ubuntu GUI go to System -> Administration and choose Synaptic Package Manager, type bum in the Quick Search box and then place a check against bum in the lists of results returned and click Mark For Installation. Choose the additional packages too.

Now launch the BootUp-Manager (System -> Administration -> BootUp-Manager), check the Advanced box and then click on the Services tab. Scroll down to Squeezeboxserver and note the Run levels (by default these are K20, S20, S20 etc). Now scroll to mmserver, place a check against it and then right-click on it and select Change start/stop priority. Change the value to a number to be one below that of Squeezeboxserver. So, by default you'd type 19 in both the Startup Priority: and Shutdown Priority: boxes. Then click OK.

Now restart the server (type sudo reboot -h now from a Terminal/Putty session)

When the server is booting you should see MusicIP initialise before Squeezebox Server.

 

How to activate MusicIP from within Squeezebox Server

To activate MusicIP go into the Squeezebox Server interface (http://MyMediaServer:9000) and click on Settings and on the Basic Settings tab remove the entry in the Music Folder box. Click Apply then click on the Plugins tab, scroll down and place a check in the box next to MusicIP. Click Apply again. Now restart the server once more and you should be good to go.

How to start and stop MusicIP manually

If you ever have need to start or stop MusicIP manually you can do so from within a Putty Session or a Terminal (Applications -> Accessories -> Terminal) by typing the following command:

sudo /etc/init.d/mmserver stop

which will stop MusicIP. If you want to re-restart MusicIP again then use start instead of stop in the command above.

Where is the MusicIP database stored?

If you ever move or rename the folder where your music is stored and then subsequently add new music to MusicIP then it's likely you will have duplicates in the MusicIP database; the original albums plus the ones it now thinks are "new" albums plus of course the real new music. So, you can wipe the MusicIP database and start over by issuing the following command:

rm /home/yourusername/.MusicMagic/default.m3lib

where yourusername is your Ubuntu username. You will then need to restart MusicIP for the changes to take effect:

sudo /etc/init.d/mmserver stop

sudo /etc/init.d/mmserver start

 

"No such file or directory" using the 64 bit version of Ubuntu Server

If you receive a "no such file or directory" error when trying to start mmserver under the 64 bit version of Ubuntu then you need to type the following command in a Terminal or Putty Session to fix this:

sudo apt-get install ia32-libs

and answer Y when prompted. 

Still stuck? Not what you were looking for? Then head over to the Discussion Forum