Page 1 of 4 123 ... LastLast
Results 1 to 10 of 38

Thread: HOWTO: Install and Customize Music Player Daemon in Ubuntu (v2)

  1. #1
    Join Date
    Apr 2005
    Beans
    22

    Arrow HOWTO: Install and Customize Music Player Daemon in Ubuntu (v2)

    Edit: This guide is ridiculously ancient, and I haven't used it in years, so take anything it says with a pinch of salt!
    Note: This is an update of the original post Here by Zenwhen
    What is Music Player Daemon ?

    Music Player Daemon (MPD) allows remote access for playing music and managing playlists. MPD is designed for integrating a computer into a stereo system that provides control for music playback over a local network. It is also makes a great desktop music player, especially if you are a console junkie, like frontend options, or restart X often.
    Why should I use it instead of Rhythmbox or Muine?

    MPD is light on your resources, and high on extensibility. The daemon is easy to interact with, develop front ends for, and configure with intuitive configuration scripts. If that doesn't convince you, perhaps the pretty screenshots and features coming later in this thread will. I personally use it mainly so that I can sit on my sofa with my laptop, yet still play music through my main speaker system using my main computer.

    How do I get Music Player Daemon?

    As log as you have configured your repositories correctly, installing mpd is as simple as typing into the console:
    Code:
    apt-get install mpd mpc gmpc
    How do I configure Music Player Daemon

    In these instructions, we shall be configuring mpd to run as a system service. This will mean that it will start on boot, and run as it's own user (for security). We will also have a seperate folder where it stores it's music list (we can use symbolic links to add other directories)

    Type this into the console:
    Code:
    sudo dpkg-reconfigure mpd
    This will bring up a console-interface to configure mpd. Use the keyboard to move around. Do the following:
    1. When it asks if you want to configure as a system service, choose <Yes>
    2. Hit Enter on the next three windows - where it asks you for the directories for the music and playlist, and the port number to use
    3. Hit <Yes> for the state file. This means that it will save your playlist and music position when you turn off the computer (or restart mpd)
    4. Choose either <Yes> or <No> for restart on upgrade. I chose <No>

    It will then quit and start mpd for you.

    Now, people have been having trouble getting this to work on Hoary (myself included) and I found that this was easily solved by adding a single line to the mpd.conf saying 'ao_driver "alsa09"'. If you type the following into the console this will be done automatically:
    Code:
    sudo  echo ao_driver \"alsa09\" >> /etc/mpd.conf
    after this restart mpd with the following command:
    Code:
    sudo /etc/init.d/mpd restart
    How do I add music to Music Player Daemon
    You add music by adding symbolic links to the music directory, which is set to /usr/share/mpd/music/ with the above steps.
    Say, for example, you store your music in your home directory, under the "mp3s" folder, you would issue the following command:
    Code:
    sudo ln -s $HOME/mp3s /usr/share/mpd/music
    you then need to tell mpd to rebuild it's music database. You can do this through the graphical client, gmpc, or using mpc by typing
    Code:
    mpc update
    How do I use Music Player Daemon
    The GTK client for mpd is called gmpc.

    Using this to manage MPD and update your database will make using MPD effortless, and its playlist options are as as good as any, though not as complicated. You may have noticed a set of panel launchers there on that screenshot that look like media player controls. Those are custom application launchers added to the gnome panel with a right click that point to some commands that can be sent to mpc (the command line media player daemon client). Some of the more common commands are:

    Code:
    mpc                         Displays status
    mpc play <number>           Start playing at <number> (default: 1)
    mpc next                    Play the next song in the current playlist
    mpc prev                    Play the previous song in the current playlist
    mpc pause                   Pauses the currently playing song
    mpc stop                    Stop the currently playing playlists
    For a complete list of commands for mpc, type
    Code:
    mpc --help
    The icons on the launchers are the same as used in gmpc, and they should be installed to the folder /usr/share/mpc/

    If you decided not to install mpd as a system service, you will have to start mpd with the "mpd" command before music playing works. You can either add a launcher to run that command, run it from the terminal whenever you start up, or you can add it to "gnome-session-properties" as a startup command.

    After that, you will be able to run GMPC, have a nice pop-up window whenever the song changes, control it in a winamp like fashion with he GUI, and control it from your taskbar. You can control it from the terminal without booting into X with the mpc commands, and can control it with FoxyTunes.

    If you noticed that I said the word "control" a lot in that last paragraph, you are right. MPD gives you total control over your music library, and gives you the ability to control it from wherever you wish, however you wish, access it how you wish, and from any OS you wish using any desktop environment you wish. There are also clients for all of the major desktop environments; including KDE and even Windows.

    I will answer any questions you raise to the best of my ability. Enjoy!

    Troubleshooting
    Here will be a list of errors people hhve had and the possible fixes. If you have a problem not listed here, it is worth taknig a look at the /var/log/mpd/errors.log file (by default this is only accesible by root):
    When I click play on gmpc, it flickers the song title and then does nothing
    • Make sure you have the correct sound driver chosen, for me this was adding the ao_driver line to the mpd.conf



    Getting Extra Help
    As I said, I and anybody else who knows will help here, but there are a couple of other good places to ask for help:
    • The Music Player Daemon Wiki
    • On IRC, the #mpd channel on freenode
    • The man page for mpd is very helpful and explains the mpd.conf file settings ( man mpd )

    Note: This post is mostly based off of a post by Zenwhen Here , but I thought I would re-create it in the Hoary section, and update it with hoary specifics.
    Last edited by Xgkkp; January 4th, 2012 at 03:33 PM. Reason: Update with warning about post age, and remove an image to avoid breaking it

  2. #2
    Join Date
    May 2005
    Location
    Paris, France
    Beans
    468
    Distro
    Edgy Eft Testing

    Re: HOWTO: Install and Customize Music Player Daemon in Ubuntu (v2)

    Hello,

    thanks for this howto but I have a problem.

    I installed mpg on the server, and mpd, mpc and kmp on the client.

    The server should be well configurated, but I can't really say so cause I am not at home right now..

    The client can connect to server, finds the files to play, plays them, but I hear nothing .. while I can listen to music with amarok.

    Is there anything done wrong ?

  3. #3
    Join Date
    Apr 2005
    Location
    Under the Jolly Roger
    Beans
    571

    Re: HOWTO: Install and Customize Music Player Daemon in Ubuntu (v2)

    Quote Originally Posted by geearf
    The client can connect to server, finds the files to play, plays them, but I hear nothing .. while I can listen to music with amarok.

    Is there anything done wrong ?
    Are the speakers hooked up to the server, or to the client? MPD doesn't transmit audio across the network, it just allows you to control it remotely.
    My sole duty is to my own happiness and well-being. I recognize no other.

  4. #4
    Join Date
    Mar 2005
    Location
    Paris, France
    Beans
    153

    Re: HOWTO: Install and Customize Music Player Daemon in Ubuntu (v2)

    is there a way to do like xmms when you hit q on an item on the playlist?

    it queues the song so it is play next and then revert back to where it was before the queued and you can queue many items.

  5. #5
    Join Date
    May 2005
    Location
    Paris, France
    Beans
    468
    Distro
    Edgy Eft Testing

    Re: HOWTO: Install and Customize Music Player Daemon in Ubuntu (v2)

    Quote Originally Posted by Stormy Eyes
    Are the speakers hooked up to the server, or to the client? MPD doesn't transmit audio across the network, it just allows you to control it remotely.
    Oops sorry I did not answer you, the yes I wanted to get music over the internet, which was not possible this way, but It helped me scaring my mother from work (without intention), so it was still fun

    thanks

  6. #6
    Join Date
    Dec 2005
    Beans
    338

    Re: HOWTO: Install and Customize Music Player Daemon in Ubuntu (v2)

    If it does not forward the stream to the local box, then I would definitely prefer running xmms through X-forwarded ssh connection. It would be more secure, at least.
    Besides, I believe there are obscure ways to make xmms work with a remote-enabled esd daemon on the client box, thus forwarding the sound too.

  7. #7
    Join Date
    Jan 2005
    Beans
    47

    Re: HOWTO: Install and Customize Music Player Daemon in Ubuntu (v2)

    Quote Originally Posted by IdoMcFly
    is there a way to do like xmms when you hit q on an item on the playlist?

    it queues the song so it is play next and then revert back to where it was before the queued and you can queue many items.
    This isn't availible in mpd yet. There is a patch around to support this kind of behauviour in the svn version of mpd, but that isn't intergrated yet.

    It's a shame gmpc 0.12.0 just went into dapper and isn't availible on breezy, it's been out for quiet a while. gmpc 0.12 is an improvement, stability wise, over the older version of gmpc.

  8. #8
    Join Date
    Jan 2005
    Beans
    47

    Re: HOWTO: Install and Customize Music Player Daemon in Ubuntu (v2)

    Quote Originally Posted by Alex.P
    If it does not forward the stream to the local box, then I would definitely prefer running xmms through X-forwarded ssh connection. It would be more secure, at least.
    Besides, I believe there are obscure ways to make xmms work with a remote-enabled esd daemon on the client box, thus forwarding the sound too.
    This trick can be done, and is done, with mpd too.
    If you install the development version of mpd you can, in combination with icecast, setup a streaming server.

  9. #9
    Join Date
    Apr 2006
    Beans
    46

    Re: HOWTO: Install and Customize Music Player Daemon in Ubuntu (v2)

    Hi,

    When i run

    Code:
    sudo dpkg-reconfigure mpd
    nothing happen in the terminal ...
    All the packages are installed

    Tnx,
    Luca.

  10. #10
    Join Date
    Oct 2006
    Beans
    Hidden!

    Re: HOWTO: Install and Customize Music Player Daemon in Ubuntu (v2)

    Hi

    I am having the same problem as ShinjiLeery. Is there a way around this? I tried modifying /etc/mpd.conf manually but I\that wasn't successful either.

    I am running Ubuntu 6.10, and have mpd, mpc and gmpc installed (but not working).

    Thanks

Page 1 of 4 123 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •