个人工具

UbuntuHelp:MPD

来自Ubuntu中文

跳转至: 导航, 搜索

Music Player Daemon (MPD)

Installing via GUI

Start Synaptic Package Manager ( System > Administration > Synaptic Package Manager ) and in the search box enter mpd. Mark the package mpd for installation, as well as any client that you might want. In this Wiki I will use Sonata as the example. The following packages should be marked for installation:

  • mpd
  • sonata

Click Apply.

Installing via command line (advanced users)

In this example, Sonata is used as the desired client. Open your terminal and enter the following commands. (Please note that the $ is not meant to be a part of the command. It shows whether or not a normal user ($) or root (#) command is being issued.) `$ sudo apt-get update` `$ sudo apt-get install mpd sonata`

Configuring MPD to run as a system service

In Ubuntu, much of the work is done for you with regard to setting up the proper directories and permissions. However, there is still some customization to be done.

Editing /etc/mpd.conf

Almost all of the default /etc/mpd.conf can be left untouched, but there are some things that you may want to change. First of all, it is always a good idea to make a backup of the file in case things go south. `$ sudo cp /etc/mpd.conf /etc/mpd.conf.bak` And now the editing begins. `$ sudo gedit /etc/mpd.conf` The settings that most users will need to be concerned with for personal use are not numerous. In fact, MPD can detect pretty much everything for you. The only setting that you will need to change is the line: `#mixer_type "software"` All you have to do is uncomment (remove the '#') that line and MPD should function perfectly well for common use once you have completed the rest of this setup. If you want to further customize MPD to stream to an IceCast server or a certain type of audio setting, please see the other sections in this wiki on editing mpd.conf.

Giving MPD proper permissions

Unfortunately, by default MPD does not have the proper permissions to access PulseAudio, the default audio setup on most new Ubuntu systems. If MPD plays for you without these steps, then that's great, but if you can play your songs but no sound is emitted, try the following steps. What we need to do is add the user mpd to the groups pulse and pulse-access so that it can access the audio system. `$ sudo usermod -aG pulse,pulse-access mpd`


And there you have it! Connect to your MPD server using your favorite MPD client and you should be good to go!

Configuring MPD to run as a user service

FIXME

Configuring MPD to stream to an IceCast server

FIXME