Getting mpd to work
anomit | March 10, 2008Harsh suggested me to switch to mpd after a series of unsatisfactory experiences with numerous media players on Ubuntu, which I would like to elaborate on in a later post. To keep it short, I was looking for a media player that would allow me to scrobble my tracks as well as would be supported by a pidgin plugin that would display the current track I was playing in my status message. I tried these:
-
Beep media player
BMPx
xmms
Rhythmbox doesn’t even deserve a mention here. Now what bugged me was that I wasn’t able to enjoy both the above mentioned features on a single player. Like Beep media player had a nice beep-media-player-scrobbler plugin that would allow me to scrobble my tracks but among the different current track plugins for pidgin available, I wasn’t able to find one that would support beep media player.
mpd or music player daemon is a software that runs as a daemon on your system and allows you to use a client such as mpc, ncmpc or sonata (more about these later) which would connect to the daemon and let you play music.
Install mpd using your package manager (apt for Debian or Ubuntu users, yum for fedora and so on). Now comes the part of configuring it. If you would run mpd as root, it would read the configuration files from /etc/mpd.conf or otherwise from ~/.mpdconf . You won’t need to make any big changes in the conf file other than the location of music directory. Open up the conf file in an editor and see the line that reads music_directory. Just change the directory to your audio collection. As you would notice, the conf file is commented and it says ‘You can put symlinks in here, if you like.‘ This is pretty useful if your collection is spread over multiple directories. You can always start it by typing mpd at the terminal and kill it using mpd –kill. Remember it would read the appropriate conf file depending on how you are starting the process i.e. as a normal user or as the root.
Note: Your home directory ~ may not contain a .mpdconf directory by default after mpd is installed. In that case create one and for an example conf file, copy the mpd.conf file from /etc/ to ~/.mpdconf
anomit@deadbox:~$ cp /etc/mpd.conf .mpdconf/
Now comes the part of installing a client that would interact with the daemon and play music for you. Install ncmpc, a ncurses based client for mpd using your package manager. Then just start it using ncmpc at the terminal. There is also a GTK+ based client called Sonata which would appeal to you if you are more of a GUI person.
If you would like your current track to be displayed in your pidgin status message, install mpdscribble using your package manager and download music tracker, the plugin for pidgin from here.
Configuring mpdscribble
To configure it, you need to compute the md5sum of your last.fm account password. Execute the following at the terminal:
$ echo -n "your-password"|md5sum>file-name.txt
Get the md5sum value from the file and add the follwing lines in the /etc/mpdscribble.conf file
username = user-name
password = md5sum
Now just type mpdscribble at the terminal whenever you want the scrobbling service to start and press Ctrl+C to end it.
Installing musictracker plugin
Extract the contents of the file and cd to the directory where it has been extracted. Run the following commands to install it:
./configure
make
make install
Just check the plugins list in pidgin and enable the musictracker plugin. Configure it according to your wishes.






