2022-01-16 18:20:39 +00:00
---
title: "mpd"
2022-01-26 22:35:07 +00:00
tags: [ "Documentation", "Sound" ]
2022-01-16 18:20:39 +00:00
---
2020-01-02 00:04:35 +00:00
# Setup
## Configuration
This is a minimum configuration file for /etc/mpd.conf
2023-06-17 19:28:20 +00:00
> music_directory "/var/lib/mpd/music"
>
> playlist_directory "/var/lib/mpd/playlists"
>
> db_file "/var/lib/mpd/mpd.db"
>
>
> pid_file "/run/mpd/mpd.pid"
>
> state_file "/var/lib/mpd/mpdstate"
>
>
> user "mpd"
>
> audio_output {
> type "pulse"
> name "My Pulse Output"
> }
>
> audio_output {
> type "fifo"
> name "my_fifo"
> path "/tmp/mpd.fifo"
> format "44100:16:2"
> }
2020-01-02 00:04:35 +00:00
You can use alsa instead of pulse, but don't unless you're on a Pi.
Since this is run as the mpd user, you'll need to grant that user pulse acceess, often with the user-group `pulse` or `pulse-access` , but your distro may vary.
2023-06-17 19:28:20 +00:00
```bash
sudo usermod -aG pulse-access mpd
```
2020-01-02 00:04:35 +00:00
Working with mpd will be easier if you have access to its files, so maybe:
2023-06-17 19:28:20 +00:00
```bash
sudo usermod -aG mpd $USER
```
2020-01-02 00:04:35 +00:00
# Notifications (AUR)
Install `mpd-notification` and then start the service:
2023-06-17 19:28:20 +00:00
```bash
systemctl --user enable mpd-notification
```
2020-01-02 00:04:35 +00:00