Hav­ing a func­tion­nal setup for play­ing music on my unslung box, I decided to install and con­fig­ure mpd on it for more flexibility.

Mpd is avail­able as an ipkg pack­age but some work must be done to make it work. I had to cre­ate /opt/etc/mpd.conf with the fol­low­ing content:

port                    “6600”
music_directory         “/share/flash/data/public/mp3“
playlist_directory      “/share/flash/data/public/mpd/playlists/“
db_file                 “/share/flash/data/public/mpd/mpd.db“
log_file                “/share/flash/data/public/mpd/mpd.log“
error_file              “/share/flash/data/public/mpd/mpd.error“
state_file              “/share/flash/data/public/mpd/state“
audio_output_format “44100:16:2″
mixer_type “oss“
mixer_device “/dev/mixer“
mixer_control “Vol”

and cre­ate the appro­pri­ate direc­to­ries on the hard drive, then exe­cute mpd –create-db and finally restart the daemon.

On my lap­top, I installed Sonata from the repos and ended up with a per­fectly usable setup. Here is a screenshot:

Sonata and MPD

I still need to change the own­er­ship of some of these files to make it more secure, because at the moment, it is run as root…

Ref­er­ence:

http://www.chimeric.de/blog/2008/0816_pimp_your_nslu2_-_mpd_/last.fm

http://www.nslu2-linux.org/wiki/HowTo/SlugAsAudioPlayer

http://www.757.org/~joat/wiki/index.php/NSLU2_and_MPD