Shell Person Help me keep the shell people alive.

19Dec/093

Install SCMPC – Audioscrobbling MPD to Last.fm in Ubuntu 9.10

leopard

I've been using SCMPC to scrobble my music played with MPD to Last.fm for a couple of years now. I can't find a package for it in the repositories, but it's easy to install from source. The source hasn't changed in almost 3 years, but it still seems to be working fine.

Here's how I installed it in Ubuntu 9.10 Karmic Koala.

The SCMPC homepage is here. You can download the source at this link.

First install the dependencies you'll need:

sudo apt-get install libargtable2-dev libconfuse-dev libdaemon-dev

You may also need libcurl (I apparently already had it).

Then extract the source code (the file was scmpc-0.2.2.tar.bz2 in my case) by right-clicking and selecting "Extract here". In a terminal, cd into the directory you just extracted. Then just:

./configure
make
sudo make install

That should install it. Now create a directory for the config file in your home directory:

mkdir ~/.scmpc

You can copy a template for the config file:

cp /usr/local/share/scmpc/scmpc.conf ~/.scmpc/

And then fill in your own details.

Or you can just make your own. Here's copy of mine.

log_level = debug
log_file = "/home/james/.scmpc/scmpc.log"
pid_file = "/home/james/.scmpc/scmpc.pid"
cache_file = "/home/james/.scmpc/scmpc.cache"
mpd {
	#host = "localhost"
	#port = 6600
	#timeout = 5
	#password =
}
audioscrobbler {
	username = "my_user_name"
	password_hash = "a_hash_of_my_password"
}

I keep all of SCMPC's operating files in ~/.scmpc

I use password_hash= instead of password= so I don't have to store my password in plain text. You can get a hash of your password like this:

echo -n your_password | md5sum

Don't include any spaces or the dash ( - ) symbol that follow the hash.

Now just start SCMPC and restart MPD. Add SCMPC to your startup programs (System -> Preferences -> Startup Applications) if you want it running at startup.

scmpc
sudo /etc/init.d/mpd restart