Wikia

Gnome Music Player Client

Watchlist Recent changes

MPD INSTALL USER SERVICE UBUNTU

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.png

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

Disable-mpd.png


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

Disable-mpd-default.png


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.png

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.png

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.png


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.png

Step 8

Create the needed directories.

mkdir ~/.mpd
mkdir ~/.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.

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.png

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.png

Step 11-13

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

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


Mpd-user-setup-guide-step 13.png

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.png

Step 15

Add the music and press play.

Mpd-user-setup-guide-step 15.png

Step 16

Listen to your music.

Mpd-user-setup-guide-step 16.png

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]
Encoding=UTF-8
Version=0.9.4
Type=Application
Name=Music Player Daemon
Comment=
Exec=mpd
StartupNotify=false
Terminal=false
Hidden=false


Mpd-user-setup-guide-step 17.png


Pages on Gnome Music Player Client

Add a Page
140pages on
this wiki
Advertisement | Your ad here

Latest Photos

Add a Photo
229photos on this wiki
See more >

Recent Wiki Activity

See more >

Around Wikia's network

Random Wiki