Wikia

Music Player Daemon Community Wiki

Watchlist Recent changes

MPD on OSX

Redirected from Osx

Contents

Running MPD on OSXEdit

PrerequisitesEdit

  • A Mac
  • An internet connection

Package ManagersEdit

MacPortsEdit

MacPorts is a packaging system for OSX based on BSD's port system. You will issue these commands from within Terminal.app or a sufficient replacement, such as iTerm.

You can install it simply by using
$sudo port install mpd
(assuming you have administrator or higher privileges).

FinkEdit

Fink is a package management system for OSX that utilizes the apt-get utility. Usage is similar to MacPorts.

$sudo fink install mpd...

If you are trying to run on OSX 10.5, you may have to use the --no-daemon option as documented in the Fink package description.

HomebrewEdit

Homebrew is a package management system for OSX with some similarities to GNU Stow.

$brew install mpd

Building from sourceEdit

If you're the geeky person who likes to build from source, you can do so without any problems. You will need to download and install the Apple Developer Tools [1]. You can omit the --prefix on the ./configure step if you want. For this example, we're going to use mpd version 0.13.0.

curl http://www.musicpd.org/uploads/files/mpd-0.13.0.tar.gz -o mpd.tar.gz
open mpd.tar.gz
cd mpd-0.13.0
./configure --prefix=/usr/local
make
sudo make install

LaunchD Edit

create a file (mpd.plist) like this one:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com
    /DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
        <key>Debug</key>
        <false/>
        <key>inetdCompatibility</key>
        <false/>
        <key>Label</key>
        <string>org.macports.mpd</string>
        <key>OnDemand</key>
        <false/>
        <key>Program</key>
        <string>/opt/local/bin/daemondo</string>
        <key>ProgramArguments</key>
        <array>
                <string>--label=mpd</string>
                <string>--start-cmd</string>
                <string>/opt/local/bin/mpd</string>
                <string>/opt/local/etc/mpd.conf</string>
                <string>;</string>
                <string>--stop-cmd</string>
                <string>/opt/local/bin/mpd</string>
                <string>--kill</string>
                <string>/opt/local/etc/mpd.conf</string>
                <string>;</string>
        </array>
        <key>RunAtLoad</key>
        <true/>
    </dict>
    </plist>

then save it and run launchctl load mpd.plist (or sudo launchctl load mpd.plist) then mpd will be launched

If you place the mpd.plist script in /Library/LaunchDaemons it will launch again when you reboot.

you may need to install daemondo

mpd and daemondo can be installed using macports [2][3]

Applescript Edit

launch the script editor application and copy the following lines

do shell script "/opt/local/bin/mpd /opt/local/etc/mpd.conf"

Compile it to check it works. Note that /opt/local/bin/mpd is the path for a macports installation, adjust it to your needs.

Save the script in a chosen folder and in the format field select "application", then go to the system preferences and put the application you just created in the start-up list for your user.

Now mpd should start on boot with settings given in /opt/local/etc/mpd.conf.

Troubleshooting Edit

If you have issues with mpd crashing when you change songs mid-song, try adding mixer_type "software" to your mpd conf file. If the change of the mixer_type doesn't solve the problems, try to run mpd in foreground with the option "--no-daemon"


It's worth mentioning for those of you using Homebrew: the above plist assumes you have daemondo installed. Deamondo is a component of MacPorts core package and not available in Homebrew. So installing Macports is needed for the above config. Note: This does not mean you have to install anything, you can just install MacPorts and forget you have it.

Pages on Music Player Daemon Community Wiki

Add a Page
542pages on
this wiki

Latest Photos

Add a Photo
100photos on this wiki
See more >

Recent Wiki Activity

See more >

Around Wikia's network

Random Wiki