Skip to content

How To: MPD/MPC with Ubuntu

For a few months now I wanted to try mpd mainly out of curiosity. Music Player Daemon (mpd) is a music server and mpc will be the client used to interact with the server. This how to will look at a localhost server of mpd.

Prereqs: Enable universal repositores in /etc/apt/sources.list

Installing & Configuring Software:
In terminal:

sudo apt-get install mpd mpc paprefs

Next we need to set up Pulse Audio.

Go to System->Preferences->Pulse Audio Preferences
Check “enable network access to local sound device” & “Don’t require authentication”

Set up mpd.conf (use your favorite text editor)

sudo gedit /etc/mpd.conf

Add the following to the config file:

audio_output {
type "pulse"
name "Local MPD Output"

In the mpd.conf file, look for “music_directory” and change the corresponding path to your music directory.

Next, we shall build the database. In terminal, type:

sudo mpd --create-db

Finally, restart mpd by:

sudo /etc/init.d/mpd restart

Using mpc: mpd/mpc is higly scriptable so I recommend create some bash files for yourself. You will find the manual to mpc here:

Example: Add Radiohead to current playlist

mpc search artist Radiohead | mpc add
mpc play

Good luck

Further Reading:

Posted in Tutorials, Ubuntu. Tagged with , , , , .

0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

You must be logged in to post a comment.