Gnome Music Player Client

This guide describes how to install mpd as a user service in ubuntu.

The screenshots are taken on xubuntu jaunty, but should also work on ubuntu intrepid.

Step 1

Install mpd. In a terminal, write the below:

sudo apt-get install mpd

Mpd-user-setup-guide-step 1

Step 2

By default ubuntu installs mpd as a system service. We don't want this, so let's remove it from startup.

If mpd is running stop it first. (not in screenshot)

/etc/init.d/mpd stop

sudo update-rc.d mpd disable


Alternatively you can edit the file /etc/default/mpd as root and set the value of START_MPD to false.


Step 3

Extract and copy the default config file.

gunzip -c /usr/share/doc/mpd/examples/mpd.conf.gz > ~/.mpdconf

Mpd-user-setup-guide-step 3

Step 4-7

Now we are going to edit the config file

gedit ~/.mpdconf

First we change all paths to point to: ~/.mpd. You need to change the following entries:

  • music_directory
  • playlist_directory
  • db_file
  • log_file
  • error_file
  • pid_file
  • state_file

Mpd-user-setup-guide-step 5

This is important, comment the user entry. This is normally used if mpd runs as system service. But we don't need it now.

If you don't comment this field, you will get an error trying to run it. Mpd-user-setup-guide-step 6

Now we are going to setup an audio_output {} This step is optional, you can also choose to let mpd autodetect.

I setup an pulse output, because this is what ubuntu intrepid uses by default.

Insert in the audio output section the following block

audio_output {
    type "pulse"
    name "My Pulse Output"

Mpd-user-setup-guide-step 7

Step 8

Create the needed directories.

mkdir -p ~/.mpd/playlists

If the music_directory you specified does not exist, create that one too. On jaunty ~/Music exists by default.

Step 9

run mpd.


If everything is ok, it directly detaches itself. (so it looks like it exits)

It might complain that the db_file cannot be found, you can safely ignore this. Mpd-user-setup-guide-step 9

Step 10

Run gmpc. As you can see in the below screenshot I do not see any music. This is because I have no music in my music directory. Mpd-user-setup-guide-step 10

Step 11-13

Add music to the music directory and tell mpd to update its database.

Mpd-user-setup-guide-step 11 Mpd-user-setup-guide-step 12

Mpd-user-setup-guide-step 13

Step 14

Gmpc should tell you when mpd finished updating its database. You will then see the music in the file browser.

Mpd-user-setup-guide-step 14

Step 15

Add the music and press play.

Mpd-user-setup-guide-step 15

Step 16

Listen to your music.

Mpd-user-setup-guide-step 16

If you encountered errors using this guide, you can get help via several channels, as described in getting help.

Step 17 (optional)

You most likely want to have mpd started automatically when logging into your desktop.

How this is done depends on the desktop you run.

On gnome you can add it using the session manager. (System -> Preferences -> Sessions -> Startup Programs -> Add)

A new system to have this consitent between desktops, is to create an autostart file in ~/.config/autostart/.

In the screenshot below is an example.

[Desktop Entry]
Name=Music Player Daemon

Mpd-user-setup-guide-step 17