https://wiki.archlinux.org/api.php?action=feedcontributions&user=Ihre&feedformat=atomArchWiki - User contributions [en]2024-03-19T03:49:51ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Music_Player_Daemon/Tips_and_tricks&diff=239385Music Player Daemon/Tips and tricks2012-12-07T22:44:39Z<p>Ihre: Added systemd instructions for mpdscribble.</p>
<hr />
<div>[[Category:Player]]<br />
[[Category:Daemons and system services]]<br />
Go back to [[Music Player Daemon]].<br />
<br />
==Tips and Tricks==<br />
===Organizing===<br />
MPD doesn't provide a tool to preserve the file structure of your audio files. Check out [http://beets.radbox.org/ beets].<br />
<br />
===Last.fm scrobbling===<br />
To scrobble your songs to [http://www.last.fm Last.fm] when using MPD, there are several possibilities.<br />
<br />
====mpdscribble====<br />
mpdscribble is a daemon, available in the "community" repository (if you prefer, the "git" version is available in the [https://aur.archlinux.org/packages.php?ID=22274 AUR]). This is arguably the best alternative, because it's the semi-official MPD scrobbler and uses the new "idle" feature in MPD for more accurate scrobbling. Also, you do not need root access to configure it, because it doesn't need any changes to {{ic|/etc}} at all. Visit [http://mpd.wikia.com/wiki/Client:Mpdscribble the official website] for more information.<br />
<br />
After you have installed mpdscribble, do the following (not as root):<br />
<br />
{{bc|$ mkdir ~/.mpdscribble}}<br />
* Create the file {{ic|~/.mpdscribble/mpdscribble.conf}} and add the following:<br />
{{hc|~/.mpdscribble/mpdscribble.conf|2=<br />
[mpdscribble] <br />
host = <your mpd host> # optional, defaults to $MPD_HOST or localhost<br />
port = <your mpd port> # optional, defaults to $MPD_PORT or 6600<br />
log = /home/<YOUR_USERNAME>/.mpdscribble/mpdscribble.log<br />
verbose = 2<br />
sleep = 1<br />
musicdir = <your music directory><br />
proxy = <your proxy> # optional, e. g. http://your.proxy:8080, defaults to none<br />
<br />
[last.fm]<br />
# last.fm section, comment if you do not use last.fm<br />
url = http://post.audioscrobbler.com/<br />
username = <your last.fm username><br />
password = <your last.fm password> <br />
journal = /home/<YOUR_USERNAME>/.mpdscribble/lastfm.journal<br />
<br />
[libre.fm]<br />
# libre.fm section, comment if you do not use libre.fm<br />
url = http://turtle.libre.fm/<br />
username = <your libre.fm username><br />
password = <your libre.fm password><br />
journal = /home/<YOUR_USERNAME>/.mpdscribble/librefm.journal<br />
}}<br />
Please note that passwords can also be written down as MD5:<br />
echo -n 'PASSWORD' | md5sum | cut -f 1 -d " "<br />
<br />
* Add {{ic|mpdscribble}} to the file in which you start {{ic|mpd}} as well (e.g. {{ic|~/.xinitrc}}):<br />
{{bc|<br />
pidof mpdscribble >& /dev/null<br />
if [ $? -ne 0 ]; then<br />
mpdscribble &<br />
fi<br />
}}<br />
<br />
====mpdscribble per user with systemd====<br />
<br />
Since systemd is default on new installations, starting mpdscribble with .xinitrc is outdated. mpdscribble should be started per user with systemd. See [[Mpd#Start_MPD_per_user_with_systemd]] and [[Systemd/User]].<br />
<br />
Install mpdscribble<br />
pacman -S mpdscribble<br />
<br />
Create a directory for mpdscribble and copy the example .conf<br />
mkdir ~/.mpdscribble<br />
cp /usr/share/mpdscribble/mpdscribble.conf.example ~/.mpdscribble.conf<br />
<br />
With the current version {{Pkg|mpdscribble 0.22-5}}, adding the sections mentiond above to ~/.mpdscribble.conf isn't necessary. Just add your username and password.<br />
<br />
Then, edit a new file ~/.config/systemd/user/mpdscribble.service<br />
{{hc|~/.config/systemd/user/mpdscribble.service|<br />
[Unit]<br />
Description &#61; MPD Scribbler<br />
<br />
[Service]<br />
ExecStart &#61; /usr/bin/mpdscribble -D<br />
Restart &#61; always<br />
<br />
[Install]<br />
WantedBy &#61; default.target<br />
}}<br />
<br />
Now, enable and start mpdscribble.service as per user <br />
$ systemctl --user enable mpdscribble<br />
$ systemctl --user start mpdscribble<br />
<br />
====Sonata & Ario====<br />
Sonata has built-in support for scrobbling, although that requires the program to run the whole time. Additionally, Sonata doesn't cache the songs if they cannot be forwarded to Last.fm at the time of playing, meaning they will not be added to the statistics.<br />
<br />
====lastfmsubmitd====<br />
The daemon lastfmsubmitd is a daemon which may be installed from the "community" repository as well. To install it, first edit {{ic|/etc/lastfmsubmitd.conf}} to reflect your requirements and add both {{ic|lastfmsubmitd}} and {{ic|lastmp}} to the {{ic|DAEMONS}} array in {{ic|/etc/rc.conf}}.<br />
<br />
====Last.fm playback====<br />
=====Native Last.fm playback=====<br />
Since version 0.16 mpd has a very well working method to [http://mpd.wikia.com/wiki/Last.fm_Radio play back last.fm streams].<br />
{{hc|/etc/mpd.conf|2=<br />
$ playlist_plugin {<br />
name "lastfm"<br />
user "my_username"<br />
password "my_password"<br />
}<br />
}}<br />
Then use e.g. mpc to load streams<br />
{{bc|$ mpc load "lastfm://artist/Beatles"}}<br />
<br />
===Never play on start===<br />
This feature is present in mpd after version 0.16.2. When this feature is enabled, the mpd process will always start in the "paused" state, even if a song was playing when mpd was stopped. Add the line below to your {{ic|mpd.conf}} file to enable this feature.<br />
restore_paused "yes"<br />
<br />
The following sections detail various methods to simulate the same feature for older versions of mpd.<br />
<br />
====Installing mpd from the AUR====<br />
This is the best method currently available, but is only currently (as of April 2011) enabled in the git version. Install [https://aur.archlinux.org/packages.php?ID=19676 mpd-git] from the [[AUR]] and add {{ic|restore_paused "yes"}} to your {{ic|mpd.conf}} file.<br />
<br />
If you have issues with connecting your client to [https://aur.archlinux.org/packages.php?ID=19676 mpd-git], see [[Music Player Daemon/Troubleshooting#Other issues when attempting to connect to mpd with a client]].<br />
<br />
====Method 1====<br />
If you do not want MPD to always play on your system start, but yet you want to preserve the other state information, add the following lines to your {{ic|/etc/rc.d/mpd}} file:<br />
=====Method 1.1=====<br />
Simpler, working method (disables playing on startup of mpd daemon):<br />
start)<br />
...<br />
mpc -q pause #add this line only<br />
add_daemon mpd<br />
stat_done<br />
<br />
To prevent updates from destroying these modifications, add this file to the {{ic|NoUpgrade}} variable in {{ic|/etc/pacman.conf}}:<br />
NoUpgrade = etc/rc.d/mpd<br />
<br />
====Method 2====<br />
Another simpler method, would be to add mpd to your {{ic|[[rc.conf]]}} daemons array and add {{ic|mpc stop}} or {{ic|mpc pause}} to {{ic|/etc/rc.local.shutdown}} and to {{ic|/etc/rc.local}}. (Remember you must have mpc installed to use this method).<br />
<br />
Adding only the order in {{ic|/etc/rc.local}} cannot assure that mpd will play absolutely nothing, since there may be a delay before the stop command is executed. <br />
On the other hand, if you only add the order to {{ic|/etc/rc.local.shutdown}}, that will assure that mpd won't play at all, as long as you properly shutdown your system.<br />
Even though they are redundant, adding it to {{ic|/etc/rc.local}} would serve as a safety for those, presumably, rare occasions when you do not shutdown the system properly.<br />
<br />
====Method 3====<br />
The general idea is to ask mpd to pause music when the user logs out, so that mpd will stick to the "pause" state after a reboot. Sending such command can be achieved using {{Pkg|mpc}}, the command line interface to MPD.<br />
<br />
GDM users can then add {{ic|/usr/bin/mpc pause}} to {{ic|/etc/gdm/PostSession/Default}} (be sure to add it before {{ic|exit 0}}):<br />
<br />
Non-GDM users can use their own login manager's method to launch the line at logout.<br />
<br />
====Example configuration: Output with 44.1 KHz at e. g. 16 bit depth, multiple programs at once====<br />
''Why these formats?'' Because they are standard CDA, because ALSA on its own allows more than one program "to sound" only with dmix — whose resampling algorithm is inferior — and because dmix by default resamples anything lower to 48 KHz (or whatever higher format is playing at the time). Also, some get clicking sounds if at least {{ic|mpd.conf}} is not changed this way.<br />
<br />
''What's the downside?'' These settings cause ''everything'' (if necessary) to be resampled to this format, such as material from DVD or TV which usually is at 48 KHz. But there is no known way to have ALSA dynamically change the format, and particularly if you listen to far more CDs than anything else the occasional 48 → 44.1 isn't too great a loss.<br />
<br />
The following assumes that there are not already other settings which conflict resp. overwrite it. This applies especially to the current user's potential {{ic|~/.asoundrc}} — which MPD as its own user ignores, therefore the following should go to {{ic|/etc/asound.conf}}:<br />
<br />
{{hc|/etc/asound.conf|<br />
defaults.pcm.dmix.rate 44100 # Force 44.1 KHz<br />
defaults.pcm.dmix.format S16_LE # Force 16 bits<br />
}}<br />
<br />
{{hc|/etc/mpd.conf|2=<br />
audio_output {<br />
type "alsa" # Use the ALSA output plugin.<br />
name "HDA Intel" # Can be called anything or nothing tmk, but must be present.<br />
options "dev=dmixer"<br />
device "plug:dmix" # Both lines cause MPD to output to dmix.<br />
format "44100:16:2" # the actual format<br />
auto_resample "no" # This bypasses ALSA's own algorithms, which generally are inferior. See below how to choose a different one.<br />
use_mmap "yes" # Minor speed improvement, should work with all modern cards.<br />
}<br />
<br />
samplerate_converter "0" # MPD's best, most CPU intensive algorithm. See 'man mpd.conf' for others — for anything other than the poorest "internal", libsamplerate must be installed.<br />
}}<br />
<br />
{{Note|MPD gives the mp3 format a special treatment at decoding: It's always put out as 24 bit. (The conversion as forced by the ''format'' line only comes after that.)}}<br />
<br />
If one wants to leave the bit depth decision to ALSA resp. MPD, comment out resp. omit the ''dmix.format'' line and change the one for mpd with ''format'' to "44100:*:2".<br />
<br />
{{Note|''Crossfading'' between files decoded at two different bit depths (say, one mp3 and one 16 bit flac) does not work unless conversion is active.}}<br />
<br />
=== Control MPD with lirc ===<br />
There are already some clients designed for communications between lircd and MPD, however, as far as the practical use, they aren't very useful since their functions are limited.<br />
<br />
It's recommended to use mpc with irexec. mpc is a command line player which only sends the command to MPD and exits immediately, which is perfect for irexec, the command runner included in lirc. What irexec does is that it runs a specified command once received a remote control button.<br />
<br />
First of all, please setup your remotes as referred to the '''[[Lirc]]''' article.<br />
<br />
Edit your favored lirc startup configuration file, default location is {{ic|~/.lircrc}}.<br />
<br />
Fill the file with the following pattern:<br />
begin<br />
prog = irexec<br />
button = <button_name><br />
config = <command_to_run><br />
repeat = <0 or 1><br />
end<br />
<br />
An useful example:<br />
## irexec<br />
begin<br />
prog = irexec<br />
button = play_pause<br />
config = mpc toggle<br />
repeat = 0<br />
end<br />
<br />
begin<br />
prog = irexec<br />
button = stop<br />
config = mpc stop<br />
repeat = 0<br />
end<br />
begin<br />
prog = irexec<br />
button = previous<br />
config = mpc prev<br />
repeat = 0<br />
end<br />
begin<br />
prog = irexec<br />
button = next<br />
config = mpc next<br />
repeat = 0<br />
end<br />
begin<br />
prog = irexec<br />
button = volup<br />
config = mpc volume +2<br />
repeat = 1<br />
end<br />
begin<br />
prog = irexec<br />
button = voldown<br />
config = mpc volume -2<br />
repeat = 1<br />
end<br />
begin<br />
prog = irexec<br />
button = pbc<br />
config = mpc random<br />
repeat = 0<br />
end<br />
begin<br />
prog = irexec<br />
button = pdvd<br />
config = mpc update<br />
repeat = 0<br />
end<br />
begin<br />
prog = irexec<br />
button = right<br />
config = mpc seek +00:00:05<br />
repeat = 0<br />
end<br />
begin<br />
prog = irexec<br />
button = left<br />
config = mpc seek -00:00:05<br />
repeat = 0<br />
end<br />
begin<br />
prog = irexec<br />
button = up<br />
config = mpc seek +1%<br />
repeat = 0<br />
end<br />
begin<br />
prog = irexec<br />
button = down<br />
config = mpc seek -1%<br />
repeat = 0<br />
end<br />
<br />
There are more functions for mpc, run {{ic|man mpc}} for more info.<br />
<br />
===Control MPD with phone===<br />
=====remuco via bluetooth=====<br />
* install [http://remuco.sourceforge.net/index.php/Remuco remuco] -- a wireless remote control for several Linux media players ([https://aur.archlinux.org/packages.php?ID=25072 aur])<br />
* transfer remuco client -- jar/jad files from {{ic|/usr/share/remuco/client/}} to your phone and install it<br />
* run {{ic|remuco-mpd}} (as current user)<br />
* run remuco on your phone, define a new bluetooth remuco connection (pair first if you haven't done this previously) and explore its capabilities<br />
<br />
=====others=====<br />
There are several MPD-specific clients available in the app-store/market of Symbian, Android and iOS.<br />
<br />
=== MPD & PulseAudio ===<br />
<br />
mpd supports both local and remote use of PulseAudio.<br />
<br />
==== Local (with separate mpd user) ====<br />
When run as its own user as per the wiki instructions, mpd will be unable to send sound to another user's pulseaudio server. Rather than setting up pulseaudio as a system-wide daemon, a practice strongly discouraged by upstream, you can instead configure mpd to use pulseaudio's tcp module to send sound to localhost:<br />
<br />
First, uncomment the tcp module in {{ic|/etc/pulse/default.pa}} or {{ic|~/.pulse/default.pa}} and set 127.0.0.1 as an allowed IP address; the home directory takes precedence:<br />
<br />
### Network access (may be configured with paprefs, so leave this commented<br />
### here if you plan to use paprefs)<br />
#load-module module-esound-protocol-tcp<br />
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1<br />
#load-module module-zeroconf-publish<br />
<br />
Additional IP ranges in cidr notation may be added using {{ic|;}} as the separator. Once this is complete, restart pulseaudio:<br />
$ pulseaudio --kill<br />
$ pulseaudio --start -or- start-pulseaudio-x11/kde<br />
<br />
Next, edit {{ic|/etc/mpd.conf}} and add a new pulse output pointing to 127.0.0.1 as a "remote" server:<br />
audio_output {<br />
type "pulse"<br />
name "Local Music Player Daemon"<br />
server "127.0.0.1"<br />
}<br />
<br />
Once this is added, restart mpd:<br />
# systemctl restart mpd<br />
<br />
Enable the output in mpd; you should now have a working local mpd, usable by all users whose pulseaudio servers allow sound from 127.0.0.1.<br />
<br />
==== Remote ====<br />
<br />
As with any PulseAudio-enabled program, mpd can send sound over the network. The complete PulseAudio system is not required on the server running mpd; {{Pkg|libpulse}} is the only requirement to act as a source and is already a dependency of mpd.<br />
<br />
In order to send audio from mpd to another computer follow the directions above, editing {{ic|/etc/mpd.conf}} on the server running mpd using the IP address of the target computer and {{ic|/etc/pulse/default.pa}} or {{ic|~/.pulse/default.pa}} on the target computer using the IP address of the server.<br />
<br />
Once this is done, the server's mpd source should show up on the target computer while playing or paused as a normal source able to be rerouted and controlled as usual; there will be no visible source on the target while mpd is stopped.<br />
<br />
=== Cue Files ===<br />
<br />
To make cue file support actually work, you have to work around a nasty libcue bug. Libcue copied some files directly from libcdio, making it conflict with it. Steps to do to get proper cue support:<br />
<br />
* remove {{Ic|libcdio}} temporary ({{Ic|pacman -Rdd libcdio}})<br />
* install {{Pkg|libcue}}<br />
* install mpd with [[ABS]] or from [[AUR]].<br />
* install {{Ic|libcdio}} again<br />
<br />
Version 0.17 will fix this issue, implementing its very own cue parser, which will then also allow parsing cuesheets, that are embedded into the files tags (CUESHEET tag). This will work for most, if not all relevant music files.<br />
<br />
=== HTTP Streaming ===<br />
Since version 0.15 there is a built-in HTTP streaming daemon/server that comes with MPD. To activate this server simply set it as output device in mpd.conf:<br />
<br />
audio_output { <br />
type "httpd" <br />
name "My HTTP Stream" <br />
encoder "vorbis" # optional, vorbis or lame <br />
port "8000" <br />
# quality "5.0" # do not define if bitrate is defined <br />
bitrate "128" # do not define if quality is defined <br />
format "44100:16:1" <br />
}<br />
<br />
Then to listen to this stream simply open the URL of your mpd server (along with the specified port) in your favorite music player. Note: You may have to specify the file format of the stream using an appropriate file extension in the URL. For example, using Winamp 5.5, You would use http://192.168.1.2:8000/mpd.ogg rather than http://192.168.1.2:8000/.<br />
<br />
To use mpd to connect to the stream from another computer.<br />
<br />
mpc add http://192.168.1.2:8000</div>Ihrehttps://wiki.archlinux.org/index.php?title=Music_Player_Daemon&diff=239384Music Player Daemon2012-12-07T22:05:04Z<p>Ihre: /* Start MPD per user with systemd */</p>
<hr />
<div>[[Category:Player]]<br />
[[Category:Daemons and system services]]<br />
[[de:Music Player Daemon]]<br />
[[es:Music Player Daemon]]<br />
[[fr:MPD]]<br />
[[it:Music Player Daemon]]<br />
[[nl:Music Player Daemon]]<br />
[[pl:Music Player Daemon]]<br />
[[ru:Music Player Daemon]]<br />
[[sr:Music Player Daemon]]<br />
[[tr:Music_Player_Daemon]]<br />
[[zh-CN:Music Player Daemon]]<br />
{{Article summary start}}<br />
{{Article summary text|Installation, configuration and basic troubleshooting of MPD.}}<br />
{{Article summary heading|Required software}}<br />
{{Article summary link|Music Player Daemon|http://mpd.wikia.com}}<br />
{{Article summary heading|Related Articles}}<br />
{{Article summary wiki|MPD/Tips and Tricks}}<br />
{{Article summary wiki|MPD/Troubleshooting}}<br />
{{Article summary heading|Other sources}}<br />
{{Article summary text|[[Wikipedia:MPD|Wikipedia article]]}}<br />
{{Article summary end}}<br />
<br />
'''MPD''' ('''m'''usic '''p'''layer '''d'''aemon) is an audio player that has a server-client architecture. It plays audio files, organizes playlists and maintains a music database all while using very few resources. In order to interface with it, a separate [[#Clients|client]] is needed.<br />
<br />
== Installation ==<br />
=== Stable version ===<br />
The latest stable version of {{Pkg|mpd}} is available in the [[official repositories]].<br />
<br />
You may also want to install [https://github.com/GutenYe/systemd-units/tree/master/mpd mpd-systemd].<br />
<br />
=== Git version ===<br />
Should users wish to run an experimental version, the [[AUR]] offers several from which to choose. For example, {{AUR|mpd-git}}.<br />
<br />
== Setup ==<br />
MPD is able to run globally (settings apply to all users), locally (per user settings), and in multiple instances.<br />
The way of setting up mpd depends on the way it is intended to be used.<br />
A local configuration may prove more useful on a desktop system than on a system that is used by several people simultaneously.<br />
<br />
For a comfortable use, it is sensible to provide MPD access to the following files and directories:<br />
* mpd.db - The music database<br />
* mpd.pid - The file where mpd stores its process ID<br />
* mpd.log - mpd logs here<br />
* mpdstate - mpd's current state is noted here<br />
* playlists - the folder where playlists are saved into<br />
<br />
In order for MPD to be able to play back audio, [[ALSA]], [[PulseAudio]] or [[OSS]] needs to be setup and working.<br />
<br />
=== Global Configuration ===<br />
{{Note|For user-specific permissions, change the "user" line above to reflect one of the system users.}}<br />
{{Warning|Users of PulseAudio with a local mpd have to implement a [[Music Player Daemon/Tips and Tricks#Local (with separate mpd user)|workaround]] in order to run mpd as its own user!}}<br />
<br />
MPD comes with an example configuration file, available at {{ic|/usr/share/doc/mpd/mpdconf.example}}. This file holds an abundance of information on MPD configuration, and holds default mixer values.<br />
<br />
Normally,{{ic|/etc/mpd.conf}} is created when installing mpd. If not, copy the included example file to {{ic|/etc/mpd.conf}}.<br />
# cp /usr/share/doc/mpd/mpdconf.example /etc/mpd.conf<br />
<br />
==== Editing mpd.conf ====<br />
The default Arch install keeps the setup in {{ic|/var/lib/mpd}} and uses "mpd" as default user.<br />
<br />
Edit {{ic|/etc/mpd.conf}} to reflect as such:<br />
{{hc|/etc/mpd.conf|<br />
music_directory "/home/user/music"<br />
playlist_directory "/var/lib/mpd/playlists"<br />
db_file "/var/lib/mpd/mpd.db"<br />
log_file "/var/log/mpd/mpd.log"<br />
pid_file "/run/mpd/mpd.pid"<br />
state_file "/var/lib/mpd/mpdstate"<br />
user "mpd"<br />
# bind_to_address "127.0.0.1"<br />
# port "6600"<br />
}}<br />
Now change permissions for mpd to write to {{ic|/var/log/mpd/mpd.log}}, otherwise mpd will return an error when it is started. The best way is to make the {{ic|/var/log/mpd/mpd.log}} belong to the mpd [[Users and Groups#Group management|user]].<br />
# chown -R mpd /var/log/mpd <br />
Run this to create the /run/mpd dir:<br />
# systemd-tmpfiles --create mpd.conf<br />
To change the volume for mpd independent from other programs, uncomment or add this switch in mpd.conf:<br />
<br />
{{hc|/etc/mpd.conf|<br />
mixer_type "software"<br />
}}<br />
<br />
Users of [[PulseAudio]] will need to make the following modification:<br />
{{hc|/etc/mpd.conf|2=<br />
audio_output {<br />
type "pulse"<br />
name "pulse audio"<br />
}<br />
}}<br />
<br />
Users of [[ALSA]] will want to have the following device definition, which allows software volume control in the MPD client to control the volume separately from other applications.<br />
{{hc|/etc/mpd.conf|2=<br />
audio_output {<br />
type "alsa"<br />
name "My Sound Card"<br />
mixer_type "software" # optional<br />
}<br />
}}<br />
<br />
Changing the group that MPD runs as may result in errors like "output: Failed to open "My ALSA Device"" "[alsa]: Failed to open ALSA device "default": No such file or directory" "player_thread: problems opening audio device while playing "Song Name.mp3""<br />
<br />
This is because by default MPD runs as member of '''audio''' group and the sound devices under {{Ic|/dev/snd/}} are owned by this group, so add user {{Ic|mpd}} to group {{Ic|audio}}.<br />
# gpasswd -a mpd audio<br />
<br />
===== Music directory =====<br />
MPD needs to have {{ic|+x}} permissions on ''all'' parent directories to the music collection (ie. if it's located outside of "mpd" home directory {{ic|/var/lib/mpd}}). By default useradd sets permissions on home directories to {{ic|1700 drwx------}}. Thus users will most likely need to remount the music directory under a directory that mpd has access to -- this only applies if running as the 'mpd' user.<br />
<br />
# mkdir /var/lib/mpd/music<br />
# echo "/home/$USER/music /var/lib/mpd/music none bind" >> /etc/fstab<br />
# mount -a<br />
# systemctl restart mpd.service<br />
Also see [https://bbs.archlinux.org/viewtopic.php?id=86449 this forum thread.]<br />
<br />
An additional solution would be to just create a symbolic link into {{ic|/var/lib/mpd/music}}.<br />
# mkdir /var/lib/mpd/music<br />
# ln -s MUSIC_FOLDER /var/lib/mpd/music/<br />
# systemctl restart mpd.service<br />
<br />
If the music collection is contained under multiple directories, create symbolic links under the main music directory in {{ic|/var/lib/mpd}}. Remember to set permissions accordingly on the directories being linked.<br />
<br />
==== Creating the required files ====<br />
Now, having finished configuring MPD, the files and directories for MPD to write in need to be created:<br />
<br />
Create the directories and files specified in {{ic|/etc/mpd.conf}}:<br />
# mkdir -p /var/lib/mpd/playlists <br />
# touch /var/lib/mpd/{mpd.db,mpdstate} <br />
<br />
Usually the init-script should properly create {{ic|/run/mpd/}} when starting. The daemon will use this directory to create {{ic|mpd.pid}} in it. However, when running mpd as a different user, requires an update to the tmpfiles.d: copy {{ic|/usr/lib/tmpfiles.d/mpd.conf}} to {{ic|/etc/tmpfiles.d/mpd.conf}}:<br />
Change:<br />
d /run/mpd 0755 mpd mpd<br />
to:<br />
d /run/mpd 0755 ''username'' ''groupname''<br />
<br />
Change the file's permissions so that the daemon can modify them.<br />
# chown -R mpd /var/lib/mpd<br />
<br />
==== Create database ====<br />
Creating the database is now accomplished via the update feature of the client, for example {{ic|mpc update}}. You'll need to install the mpc package for this. It is in the official repositories<br />
{{Box RED | Note: | Creating the MPD database as root using {{ic|# mpd --create-db}} is deprecated.}}<br />
<br />
==== Timeline of MPD startup ====<br />
To depict when MPD drops its superuser privileges and assumes those of the user set in the configuration, the timeline of a normal MPD startup is listed here:<br />
<br />
# Since MPD is started as root by systemd, it first reads the {{ic|/etc/mpd.conf}} file.<br />
# MPD reads the user variable in the {{ic|/etc/mpd.conf}} file, and changes from root to this user.<br />
# MPD then reads the contents of the {{ic|/etc/mpd.conf}} file and configures itself accordingly.<br />
<br />
Notice that MPD changes the running user from root to the one named in the {{ic|/etc/mpd.conf}} file. <br />
This way, uses of {{ic|~}} in the configuration file point correctly to the home user's directory, and not root's directory. <br />
It may be worthwhile to change all uses of {{ic|~}} to {{ic|/home/username}} to avoid any confusion over this aspect of MPD's behavior.<br />
<br />
=== Local Configuration (per user) ===<br />
MPD does not need to be run globally as a daemon and can rather work per user. The usual method to configure MPD globally is because the listed files and folders in the default configuration file point to directories owned by root (the {{ic|/var}} directory).<br />
<br />
A less used (but perhaps more sensible) method is to make MPD work with files and directories owned by a normal user. Running MPD as a normal user has the benefits of:<br />
<br />
* A single directory {{ic|~/.mpd}} (or any other directory under {{ic|/home/username}}) that will contain all the MPD configuration files.<br />
* Easier to avoid unforeseen read/write permission errors.<br />
<br />
{{Note|This approach will not work with multiple users to having access to MPD at the same time.}}<br />
<br />
Begin the setup by creating a directory for the required files and the playlists:<br />
<br />
{{bc|mkdir -p ~/.mpd/playlists}}<br />
<br />
Copy the contents of the default MPD configuration file in {{ic|/usr/share/mpd/mpd.conf.example}} to the target user's home directory:<br />
<br />
{{bc|cp /usr/share/doc/mpd/mpdconf.example ~/.mpdconf}}<br />
<br />
Create all of the requisite files:<br />
<br />
{{bc|<nowiki>touch ~/.mpd/{mpd.db,mpd.log,mpd.pid,mpdstate}</nowiki>}}<br />
<br />
Edit {{ic|~/.mpdconf}} to specify these files:<br />
<br />
{{hc|~/.mpdconf|<br />
music_directory "/home/USER/music" # Keep commented if your XDG directory already points to it<br />
playlist_directory "/home/USER/.mpd/playlists"<br />
db_file "/home/USER/.mpd/mpd.db"<br />
log_file "/home/USER/.mpd/mpd.log"<br />
pid_file "/home/USER/.mpd/mpd.pid"<br />
state_file "/home/USER/.mpd/mpdstate"<br />
}}<br />
<br />
or you can use<br />
{{bc|sed "s/var\/lib\/mpd\/music/home\/$USER\/music/;<br />
s/var\/lib\/mpd/home\/$USER\/.mpd/;<br />
s/var\/run\/mpd/home\/$USER\/.mpd/;<br />
s/var\/log\/mpd/home\/$USER\/.mpd/" /etc/mpd.conf > ~/.mpd/mpd.conf}}<br />
<br />
MPD can now be started by typing {{ic|mpd}} on the command line.<br />
<br />
To have MPD start with the X server add it to [[xprofile]].<br />
<br />
==== Start MPD per user with systemd ====<br />
<br />
As recommanded above, it is best to use MPD as a service per user. In this case, we will use {{ic|~/.mpd/mpd.conf}} and not start mpd.service as a daemon for the whole system and all users.<br />
We will NOT use the {{ic|/usr/lib/systemd/system/mpd.service}} which is intended to start the mpd.service as root and for all users.<br />
If you already enabled it, just disable it first:<br />
{{bc| # systemctl disable mpd.service}}<br />
<br />
If you used to start mpd inside your {{ic|~/.xinitrc}}, comment or delete the line<br />
{{bc|mpd ~/.mpdconf}}<br />
<br />
Then, edit a new file ~/.config/systemd/user/mpd.service <br />
{{hc|~/.config/systemd/user/mpd.service|<br />
[Unit]<br />
Description &#61; Music Player Daemon<br />
<br />
[Service]<br />
ExecStart &#61; /usr/bin/mpd --no-daemon<br />
Restart &#61; always<br />
<br />
[Install]<br />
WantedBy &#61; default.target<br />
}}<br />
<br />
Then, add this line to [[xinitrc|.xinitrc]] before any exec <session-command><br />
{{hc|~/.xinitrc|<br />
#run systemd as user instance<br />
systemd --user &<br />
}}<br />
<br />
Log out, log in your xsession.<br />
Let's first check mpd is not running. If yes, just kill it. If not, continue to the next step.<br />
{{bc|$ ps -ef &#124; grep mpd}}<br />
<br />
Now, enable and start mpd.service as per user <br />
$ systemctl --user enable mpd<br />
$ systemctl --user start mpd<br />
<br />
Check the mpd status and see if mpd.service is correctly enabled and started<br />
{{bc|$ systemctl --user status mpd}}<br />
<br />
==== Scripted Configuration ====<br />
Rasi has written a script that will create the proper directory structure, configuration files and prompt for the location of the user's Music directory; it can be downloaded [http://karif.server-speed.net/~carnager/mpdsetup.tar here].<br />
<br />
=== Multi-mpd setup ===<br />
'''Useful if running an icecast server.'''<br />
<br />
For a second MPD (e.g., with icecast output to share music over the network) using the same music and playlist as the one above, simply copy the above configuration file and make a new file (e.g., {{ic|/home/username/.mpd/config-icecast}}), and only change the log_file, error_file, pid_file, and state_file parameters (e.g., {{ic|mpd-icecast.log}}, {{ic|mpd-icecast.error}}, and so on); using the same directory paths for the music and playlist directories would ensure that this second mpd would use the same music collection as the first one e.g., creating and editing a playlist under the first daemon would affect the second daemon as well. Users do not have to create the same playlists all over again for the second daemon. Call this second daemon the same way from {{ic|~/.xinitrc}} above. (Just be sure to have a different port number, so as to not conflict with the first mpd daemon).<br />
<br />
== Clients ==<br />
A separate client is needed to control mpd. Popular options are:<br />
<br />
=== Console ===<br />
*{{App|mpc|Simple KISS client. All basic functionality available|http://mpd.wikia.com/wiki/Client:Mpc|{{Pkg|mpc}}}}<br />
*{{App|ncmpc|A NCurses client for mpd|http://mpd.wikia.com/wiki/Client:Ncmpc|{{Pkg|ncmpc}}}}<br />
*{{App|ncmpcpp|An almost exact clone of ncmpc with some new features written in C++ (tag editor, search engine)|http://unkart.ovh.org/ncmpcpp/|{{Pkg|ncmpcpp}}}}<br />
*{{App|pms|Highly configurable and accessible ncurses client|http://pms.sourceforge.net/|{{AUR|pmus}}}}<br />
=== Graphical ===<br />
*{{App|Ario|A very feature-rich GTK2 GUI client for mpd, inspired by Rhythmbox|http://ario-player.sourceforge.net/|{{Pkg|ario}}}}<br />
*{{App|QmpdClient|A GUI client written with Qt 4.x|http://bitcheese.net/wiki/QMPDClient|{{Pkg|qmpdclient}}}}<br />
*{{App|Sonata|An elegant Python GTK+ client|http://sonata.berlios.de/|{{Pkg|sonata}}}}<br />
*{{App|gmpc|GNOME Client|http://gmpc.wikia.com/wiki/Gnome_Music_Player_Client|{{Pkg|gmpc}}}}<br />
*{{App|Dmpc|Dmenu-based MPC client with a playlist manager and state-saving on playlist changes|http://wintervenom.mine.nu/|{{AUR|dmpc}}}}<br />
<br />
=== Web ===<br />
*{{App|Patchfork|web client for MPD written in PHP and Ajax|http://mpd.wikia.com/wiki/Client:Pitchfork|{{AUR|patchfork-git}}}}.<br />
<br />
See a long list of clients at the [http://mpd.wikia.com/wiki/Clients mpd wiki].<br />
<br />
== External links ==<br />
* [http://mpd.wikia.com/wiki/Clients Sorted List of MPD Clients]<br />
* [http://www.musicpd.org/forum/ MPD forum]</div>Ihrehttps://wiki.archlinux.org/index.php?title=Music_Player_Daemon&diff=239383Music Player Daemon2012-12-07T22:03:57Z<p>Ihre: /* Start MPD per user with systemd */</p>
<hr />
<div>[[Category:Player]]<br />
[[Category:Daemons and system services]]<br />
[[de:Music Player Daemon]]<br />
[[es:Music Player Daemon]]<br />
[[fr:MPD]]<br />
[[it:Music Player Daemon]]<br />
[[nl:Music Player Daemon]]<br />
[[pl:Music Player Daemon]]<br />
[[ru:Music Player Daemon]]<br />
[[sr:Music Player Daemon]]<br />
[[tr:Music_Player_Daemon]]<br />
[[zh-CN:Music Player Daemon]]<br />
{{Article summary start}}<br />
{{Article summary text|Installation, configuration and basic troubleshooting of MPD.}}<br />
{{Article summary heading|Required software}}<br />
{{Article summary link|Music Player Daemon|http://mpd.wikia.com}}<br />
{{Article summary heading|Related Articles}}<br />
{{Article summary wiki|MPD/Tips and Tricks}}<br />
{{Article summary wiki|MPD/Troubleshooting}}<br />
{{Article summary heading|Other sources}}<br />
{{Article summary text|[[Wikipedia:MPD|Wikipedia article]]}}<br />
{{Article summary end}}<br />
<br />
'''MPD''' ('''m'''usic '''p'''layer '''d'''aemon) is an audio player that has a server-client architecture. It plays audio files, organizes playlists and maintains a music database all while using very few resources. In order to interface with it, a separate [[#Clients|client]] is needed.<br />
<br />
== Installation ==<br />
=== Stable version ===<br />
The latest stable version of {{Pkg|mpd}} is available in the [[official repositories]].<br />
<br />
You may also want to install [https://github.com/GutenYe/systemd-units/tree/master/mpd mpd-systemd].<br />
<br />
=== Git version ===<br />
Should users wish to run an experimental version, the [[AUR]] offers several from which to choose. For example, {{AUR|mpd-git}}.<br />
<br />
== Setup ==<br />
MPD is able to run globally (settings apply to all users), locally (per user settings), and in multiple instances.<br />
The way of setting up mpd depends on the way it is intended to be used.<br />
A local configuration may prove more useful on a desktop system than on a system that is used by several people simultaneously.<br />
<br />
For a comfortable use, it is sensible to provide MPD access to the following files and directories:<br />
* mpd.db - The music database<br />
* mpd.pid - The file where mpd stores its process ID<br />
* mpd.log - mpd logs here<br />
* mpdstate - mpd's current state is noted here<br />
* playlists - the folder where playlists are saved into<br />
<br />
In order for MPD to be able to play back audio, [[ALSA]], [[PulseAudio]] or [[OSS]] needs to be setup and working.<br />
<br />
=== Global Configuration ===<br />
{{Note|For user-specific permissions, change the "user" line above to reflect one of the system users.}}<br />
{{Warning|Users of PulseAudio with a local mpd have to implement a [[Music Player Daemon/Tips and Tricks#Local (with separate mpd user)|workaround]] in order to run mpd as its own user!}}<br />
<br />
MPD comes with an example configuration file, available at {{ic|/usr/share/doc/mpd/mpdconf.example}}. This file holds an abundance of information on MPD configuration, and holds default mixer values.<br />
<br />
Normally,{{ic|/etc/mpd.conf}} is created when installing mpd. If not, copy the included example file to {{ic|/etc/mpd.conf}}.<br />
# cp /usr/share/doc/mpd/mpdconf.example /etc/mpd.conf<br />
<br />
==== Editing mpd.conf ====<br />
The default Arch install keeps the setup in {{ic|/var/lib/mpd}} and uses "mpd" as default user.<br />
<br />
Edit {{ic|/etc/mpd.conf}} to reflect as such:<br />
{{hc|/etc/mpd.conf|<br />
music_directory "/home/user/music"<br />
playlist_directory "/var/lib/mpd/playlists"<br />
db_file "/var/lib/mpd/mpd.db"<br />
log_file "/var/log/mpd/mpd.log"<br />
pid_file "/run/mpd/mpd.pid"<br />
state_file "/var/lib/mpd/mpdstate"<br />
user "mpd"<br />
# bind_to_address "127.0.0.1"<br />
# port "6600"<br />
}}<br />
Now change permissions for mpd to write to {{ic|/var/log/mpd/mpd.log}}, otherwise mpd will return an error when it is started. The best way is to make the {{ic|/var/log/mpd/mpd.log}} belong to the mpd [[Users and Groups#Group management|user]].<br />
# chown -R mpd /var/log/mpd <br />
Run this to create the /run/mpd dir:<br />
# systemd-tmpfiles --create mpd.conf<br />
To change the volume for mpd independent from other programs, uncomment or add this switch in mpd.conf:<br />
<br />
{{hc|/etc/mpd.conf|<br />
mixer_type "software"<br />
}}<br />
<br />
Users of [[PulseAudio]] will need to make the following modification:<br />
{{hc|/etc/mpd.conf|2=<br />
audio_output {<br />
type "pulse"<br />
name "pulse audio"<br />
}<br />
}}<br />
<br />
Users of [[ALSA]] will want to have the following device definition, which allows software volume control in the MPD client to control the volume separately from other applications.<br />
{{hc|/etc/mpd.conf|2=<br />
audio_output {<br />
type "alsa"<br />
name "My Sound Card"<br />
mixer_type "software" # optional<br />
}<br />
}}<br />
<br />
Changing the group that MPD runs as may result in errors like "output: Failed to open "My ALSA Device"" "[alsa]: Failed to open ALSA device "default": No such file or directory" "player_thread: problems opening audio device while playing "Song Name.mp3""<br />
<br />
This is because by default MPD runs as member of '''audio''' group and the sound devices under {{Ic|/dev/snd/}} are owned by this group, so add user {{Ic|mpd}} to group {{Ic|audio}}.<br />
# gpasswd -a mpd audio<br />
<br />
===== Music directory =====<br />
MPD needs to have {{ic|+x}} permissions on ''all'' parent directories to the music collection (ie. if it's located outside of "mpd" home directory {{ic|/var/lib/mpd}}). By default useradd sets permissions on home directories to {{ic|1700 drwx------}}. Thus users will most likely need to remount the music directory under a directory that mpd has access to -- this only applies if running as the 'mpd' user.<br />
<br />
# mkdir /var/lib/mpd/music<br />
# echo "/home/$USER/music /var/lib/mpd/music none bind" >> /etc/fstab<br />
# mount -a<br />
# systemctl restart mpd.service<br />
Also see [https://bbs.archlinux.org/viewtopic.php?id=86449 this forum thread.]<br />
<br />
An additional solution would be to just create a symbolic link into {{ic|/var/lib/mpd/music}}.<br />
# mkdir /var/lib/mpd/music<br />
# ln -s MUSIC_FOLDER /var/lib/mpd/music/<br />
# systemctl restart mpd.service<br />
<br />
If the music collection is contained under multiple directories, create symbolic links under the main music directory in {{ic|/var/lib/mpd}}. Remember to set permissions accordingly on the directories being linked.<br />
<br />
==== Creating the required files ====<br />
Now, having finished configuring MPD, the files and directories for MPD to write in need to be created:<br />
<br />
Create the directories and files specified in {{ic|/etc/mpd.conf}}:<br />
# mkdir -p /var/lib/mpd/playlists <br />
# touch /var/lib/mpd/{mpd.db,mpdstate} <br />
<br />
Usually the init-script should properly create {{ic|/run/mpd/}} when starting. The daemon will use this directory to create {{ic|mpd.pid}} in it. However, when running mpd as a different user, requires an update to the tmpfiles.d: copy {{ic|/usr/lib/tmpfiles.d/mpd.conf}} to {{ic|/etc/tmpfiles.d/mpd.conf}}:<br />
Change:<br />
d /run/mpd 0755 mpd mpd<br />
to:<br />
d /run/mpd 0755 ''username'' ''groupname''<br />
<br />
Change the file's permissions so that the daemon can modify them.<br />
# chown -R mpd /var/lib/mpd<br />
<br />
==== Create database ====<br />
Creating the database is now accomplished via the update feature of the client, for example {{ic|mpc update}}. You'll need to install the mpc package for this. It is in the official repositories<br />
{{Box RED | Note: | Creating the MPD database as root using {{ic|# mpd --create-db}} is deprecated.}}<br />
<br />
==== Timeline of MPD startup ====<br />
To depict when MPD drops its superuser privileges and assumes those of the user set in the configuration, the timeline of a normal MPD startup is listed here:<br />
<br />
# Since MPD is started as root by systemd, it first reads the {{ic|/etc/mpd.conf}} file.<br />
# MPD reads the user variable in the {{ic|/etc/mpd.conf}} file, and changes from root to this user.<br />
# MPD then reads the contents of the {{ic|/etc/mpd.conf}} file and configures itself accordingly.<br />
<br />
Notice that MPD changes the running user from root to the one named in the {{ic|/etc/mpd.conf}} file. <br />
This way, uses of {{ic|~}} in the configuration file point correctly to the home user's directory, and not root's directory. <br />
It may be worthwhile to change all uses of {{ic|~}} to {{ic|/home/username}} to avoid any confusion over this aspect of MPD's behavior.<br />
<br />
=== Local Configuration (per user) ===<br />
MPD does not need to be run globally as a daemon and can rather work per user. The usual method to configure MPD globally is because the listed files and folders in the default configuration file point to directories owned by root (the {{ic|/var}} directory).<br />
<br />
A less used (but perhaps more sensible) method is to make MPD work with files and directories owned by a normal user. Running MPD as a normal user has the benefits of:<br />
<br />
* A single directory {{ic|~/.mpd}} (or any other directory under {{ic|/home/username}}) that will contain all the MPD configuration files.<br />
* Easier to avoid unforeseen read/write permission errors.<br />
<br />
{{Note|This approach will not work with multiple users to having access to MPD at the same time.}}<br />
<br />
Begin the setup by creating a directory for the required files and the playlists:<br />
<br />
{{bc|mkdir -p ~/.mpd/playlists}}<br />
<br />
Copy the contents of the default MPD configuration file in {{ic|/usr/share/mpd/mpd.conf.example}} to the target user's home directory:<br />
<br />
{{bc|cp /usr/share/doc/mpd/mpdconf.example ~/.mpdconf}}<br />
<br />
Create all of the requisite files:<br />
<br />
{{bc|<nowiki>touch ~/.mpd/{mpd.db,mpd.log,mpd.pid,mpdstate}</nowiki>}}<br />
<br />
Edit {{ic|~/.mpdconf}} to specify these files:<br />
<br />
{{hc|~/.mpdconf|<br />
music_directory "/home/USER/music" # Keep commented if your XDG directory already points to it<br />
playlist_directory "/home/USER/.mpd/playlists"<br />
db_file "/home/USER/.mpd/mpd.db"<br />
log_file "/home/USER/.mpd/mpd.log"<br />
pid_file "/home/USER/.mpd/mpd.pid"<br />
state_file "/home/USER/.mpd/mpdstate"<br />
}}<br />
<br />
or you can use<br />
{{bc|sed "s/var\/lib\/mpd\/music/home\/$USER\/music/;<br />
s/var\/lib\/mpd/home\/$USER\/.mpd/;<br />
s/var\/run\/mpd/home\/$USER\/.mpd/;<br />
s/var\/log\/mpd/home\/$USER\/.mpd/" /etc/mpd.conf > ~/.mpd/mpd.conf}}<br />
<br />
MPD can now be started by typing {{ic|mpd}} on the command line.<br />
<br />
To have MPD start with the X server add it to [[xprofile]].<br />
<br />
==== Start MPD per user with systemd ====<br />
<br />
As recommanded above, it is best to use MPD as a service per user. In this case, we will use {{ic|~/.mpd/mpd.conf}} and not start mpd.service as a daemon for the whole system and all users.<br />
We will NOT use the {{ic|/usr/lib/systemd/system/mpd.service}} which is intended to start the mpd.service as root and for all users.<br />
If you already enabled it, just disable it first:<br />
{{bc| # systemctl disable mpd.service}}<br />
<br />
If you used to start mpd inside your {{ic|~/.xinitrc}}, comment or delete the line<br />
{{bc|mpd ~/.mpdconf}}<br />
<br />
Then, edit a new file ~/.config/systemd/user/mpd.service <br />
{{hc|~/.config/systemd/user/mpd.service|<br />
[Unit]<br />
Description &#61; Music Player Daemon<br />
<br />
[Service]<br />
ExecStart &#61; /usr/bin/mpd --no-daemon<br />
Restart &#61; always<br />
<br />
[Install]<br />
WantedBy &#61; default.target<br />
}}<br />
<br />
Then, add this line to [[xinitrc|.xinitrc] before any exec <session-command>]<br />
{{hc|~/.xinitrc|<br />
#run systemd as user instance<br />
systemd --user &<br />
}}<br />
<br />
Log out, log in your xsession.<br />
Let's first check mpd is not running. If yes, just kill it. If not, continue to the next step.<br />
{{bc|$ ps -ef &#124; grep mpd}}<br />
<br />
Now, enable and start mpd.service as per user <br />
$ systemctl --user enable mpd<br />
$ systemctl --user start mpd<br />
<br />
Check the mpd status and see if mpd.service is correctly enabled and started<br />
{{bc|$ systemctl --user status mpd}}<br />
<br />
==== Scripted Configuration ====<br />
Rasi has written a script that will create the proper directory structure, configuration files and prompt for the location of the user's Music directory; it can be downloaded [http://karif.server-speed.net/~carnager/mpdsetup.tar here].<br />
<br />
=== Multi-mpd setup ===<br />
'''Useful if running an icecast server.'''<br />
<br />
For a second MPD (e.g., with icecast output to share music over the network) using the same music and playlist as the one above, simply copy the above configuration file and make a new file (e.g., {{ic|/home/username/.mpd/config-icecast}}), and only change the log_file, error_file, pid_file, and state_file parameters (e.g., {{ic|mpd-icecast.log}}, {{ic|mpd-icecast.error}}, and so on); using the same directory paths for the music and playlist directories would ensure that this second mpd would use the same music collection as the first one e.g., creating and editing a playlist under the first daemon would affect the second daemon as well. Users do not have to create the same playlists all over again for the second daemon. Call this second daemon the same way from {{ic|~/.xinitrc}} above. (Just be sure to have a different port number, so as to not conflict with the first mpd daemon).<br />
<br />
== Clients ==<br />
A separate client is needed to control mpd. Popular options are:<br />
<br />
=== Console ===<br />
*{{App|mpc|Simple KISS client. All basic functionality available|http://mpd.wikia.com/wiki/Client:Mpc|{{Pkg|mpc}}}}<br />
*{{App|ncmpc|A NCurses client for mpd|http://mpd.wikia.com/wiki/Client:Ncmpc|{{Pkg|ncmpc}}}}<br />
*{{App|ncmpcpp|An almost exact clone of ncmpc with some new features written in C++ (tag editor, search engine)|http://unkart.ovh.org/ncmpcpp/|{{Pkg|ncmpcpp}}}}<br />
*{{App|pms|Highly configurable and accessible ncurses client|http://pms.sourceforge.net/|{{AUR|pmus}}}}<br />
=== Graphical ===<br />
*{{App|Ario|A very feature-rich GTK2 GUI client for mpd, inspired by Rhythmbox|http://ario-player.sourceforge.net/|{{Pkg|ario}}}}<br />
*{{App|QmpdClient|A GUI client written with Qt 4.x|http://bitcheese.net/wiki/QMPDClient|{{Pkg|qmpdclient}}}}<br />
*{{App|Sonata|An elegant Python GTK+ client|http://sonata.berlios.de/|{{Pkg|sonata}}}}<br />
*{{App|gmpc|GNOME Client|http://gmpc.wikia.com/wiki/Gnome_Music_Player_Client|{{Pkg|gmpc}}}}<br />
*{{App|Dmpc|Dmenu-based MPC client with a playlist manager and state-saving on playlist changes|http://wintervenom.mine.nu/|{{AUR|dmpc}}}}<br />
<br />
=== Web ===<br />
*{{App|Patchfork|web client for MPD written in PHP and Ajax|http://mpd.wikia.com/wiki/Client:Pitchfork|{{AUR|patchfork-git}}}}.<br />
<br />
See a long list of clients at the [http://mpd.wikia.com/wiki/Clients mpd wiki].<br />
<br />
== External links ==<br />
* [http://mpd.wikia.com/wiki/Clients Sorted List of MPD Clients]<br />
* [http://www.musicpd.org/forum/ MPD forum]</div>Ihre