You are not logged in.
I just installed mpd and rmpc. Here's my `mpd.conf`:
# See: /usr/share/doc/mpd/mpdconf.example
pid_file "/run/mpd/mpd.pid"
db_file "/var/lib/mpd/mpd.db"
state_file "/var/lib/mpd/mpdstate"
playlist_directory "~/Music/Playlists"
music_directory "~/Music/Music"
auto_update "yes"
audio_output {
type "pipewire"
name "PipeWire Sound Server"
}When I open rmpc, it's blank: none of my music shows up.
I'm not super familiar with mpd. Maybe it's not working? I enabled mpd.service. It looks like I'm supposed to start mpd by running `mpd` in the terminal. This outputs:
exception: Default TCP listener setup failed, but this is okay because we have a $XDG_RUNTIME_DIR listener: Failed to bind to '[::]:6600'; Failed to bind socket: Address already in use
exception: Failed to create pid file "/run/mpd/mpd.pid": Permission deniedWhat can I do to fix this?
Last edited by TySpicer (2025-09-19 19:33:22)
Offline
Have a look at the fine Wiki article on mpd
https://wiki.archlinux.org/title/Music_Player_Daemon
Myself installed it yesterday on a client, so my memories are fresh <g>
First you must make a decision if you install it as a user or as a system wide daemon. Each have different configuration paths. As a user daemon ex. you could not use paths like /var/lib cause of access rights.
I installed it for my user, no need it for a multi user or network wide situation.
And: the mpd daemon does "nothing" with your music library itself. For populating the db you must initiate a scan from a mpd client. yours is rmpc, myself use ncmpcpp.
//Edit: OK, you have autoupdate yes in your config, that should be enough.
You should start mpd via the systemd services, either with or without --user on systemctl, depending on your preferred setup (user, system wide). No need to start it a second time via terminal, that leads to your error "Address already in use".
If you go system wide than for ex. music_directory "~/Music/Music" mean the $HOME of the user mpd (system wide mpd runs on this user). I guess this is not where your music is stored...
With current setup maybe post:
systemctl status mpd --no-pageror look at it yourself.
//Edit2
This is my current basic mpd.conf for a setup on my $USER
playlist_directory "$XDG_CONFIG_HOME/mpd/playlists"
pid_file "$XDG_RUNTIME_DIR/mpd/mpd.pid"
state_file "$XDG_RUNTIME_DIR/mpd/state"
sticker_file "$XDG_CACHE_HOME/sticker.sql"
auto_update "yes"
input {
plugin "curl"
}
audio_output {
type "pipewire"
name "PipeWire Sound Server"
}You see that ex. state, pid files stored in the $XDG_* dirs of my $USER, so no permission problems. My music directory is currently not defined, so $XDG_MUSIC_DIR is used.
I start/enable mpd with:
systemctl --user enable mpd.serviceLast edited by GerBra (2025-09-18 07:37:24)
Offline
Thanks for the help! I'll have to try this later.
For the file paths, should "$XDG_CONFIG_HOME" etc. be verbatim, or are these paths I'll have to specify? I assume the config home is ~/.config, but I'm not sure about the others. (It probably says on the wiki, I'll have to check later.)
Offline
These $XDG_ are environment variables which points to some directories in your home dir.
See this wiki article:
https://wiki.archlinux.org/title/XDG_Ba … irectories
You could also:
cat .config/user-dirs.dirsto see what additional placeholders are defined.
Many applications could use these variables in ex. their configuration files
Advantage by using such variables is that such config is shareable between diffferent users.
But you could also use explicit paths if you prefer.
Offline
You enabled which mpd and where is that config located? If just for "local" playback you're strongly suggested to use a user specific mpd: https://wiki.archlinux.org/title/Music_ … figuration
Offline
I'm installing as a user, not system-wide. I enabled mpd.service.
Here's the output of `systemctl status mpd --no-pager`:
● mpd.service - Music Player Daemon
Loaded: loaded (/usr/lib/systemd/system/mpd.service; enabled; preset: disabled)
Drop-In: /usr/lib/systemd/system/mpd.service.d
└─00-arch.conf
Active: active (running) since Thu 2025-09-18 18:35:41 CDT; 47min ago
Invocation: 981ce308bc28479eb80c1eaad8f16533
TriggeredBy: ● mpd.socket
Docs: man:mpd(1)
man:mpd.conf(5)
Main PID: 514 (mpd)
Tasks: 3 (limit: 14083)
Memory: 60.9M (peak: 65.7M)
CPU: 275ms
CGroup: /system.slice/mpd.service
└─514 /usr/bin/mpd --systemd
Warning: some journal files were not opened due to insufficient permissions.I don't have multiple users, so I feel like I should be able to specify a specific directory (rather than generic with environment variables). Could this be a permissions issue?
My mpd.conf is located in ~/.config/mpd. Do I need to point mpd to this file?
I copied the lines GerBra provided for mpd.conf (and commented out my conflicting lines). I can't tell that it worked, but maybe because I don't have my music in the right directory. Where is $XDG_MUSIC_DIR by default? Even then, I'd rather use the directory I'm already used to, so it would be nice to be able to set a custom directory.
Offline
It looks like you have enabled the system wide mpd service. Since you are installing as a user, did you remember to use the --user flag when you enabled the service?
Offline
What output do you get from
systemctl status --user mpd --no-pagerOffline
did you remember to use the --user flag when you enabled the service?
Yes, I used the --user flag. Does it matter if it's
systemctl --user enable mpd.serviceor
systemctl enable mpd.service --user?
I posted `systemctl status --user mpd --no-pager` before, but I've rebooted since then, and it has a different output:
× mpd.service - Music Player Daemon
Loaded: loaded (/usr/lib/systemd/user/mpd.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Thu 2025-09-18 19:47:59 CDT; 8s ago
Invocation: 386634bcb1094440a15f4f6a44310901
Docs: man:mpd(1)
man:mpd.conf(5)
Process: 3216 ExecStart=/usr/bin/mpd --systemd (code=exited, status=1/FAILURE)
Main PID: 3216 (code=exited, status=1/FAILURE)
Mem peak: 17.8M
CPU: 134ms
Sep 18 19:47:59 arch systemd[532]: Starting Music Player Daemon...
Sep 18 19:47:59 arch mpd[3216]: Ignoring the 'pid_file' setting in systemd mode
Sep 18 19:47:59 arch mpd[3216]: exception: Default TCP listener setup failed, but this is okay because we have a $…dy in use
Sep 18 19:47:59 arch mpd[3216]: decoder: Decoder plugin "wildmidi" is unavailable: configuration file does not exi…idity.cfg
Sep 18 19:47:59 arch mpd[3216]: exception: Error on line 16; No value for variable: "XDG_MUSIC_DIR"
Sep 18 19:47:59 arch systemd[532]: mpd.service: Main process exited, code=exited, status=1/FAILURE
Sep 18 19:47:59 arch systemd[532]: mpd.service: Failed with result 'exit-code'.
Sep 18 19:47:59 arch systemd[532]: Failed to start Music Player Daemon.
Hint: Some lines were ellipsized, use -l to show in full.Offline
That error seems pretty clear. Have you tried using a plain directory path instead of the variable?
Jin, Jîyan, Azadî
Offline
Yes, go with @Head_on_a_Stick
If it's easier for you than you could use explicit paths in the whole config.
mpd is one application that make use on this XDG Directory specification. Therefor the var $XDG_CONFIG_HOME is "imported" from mpd - you have no error about this variable, like with $XDG_MUSIC_DIR.
Now it's a bit nasty - in my provided mpd.conf i said that i hasn't set the mpd.conf->music directory to anything. So mpd automatically assume that this will be $XDG_MUSIC_DIR calling the XDG "framework". In my case it uses $HOME/Musik when i don't specify "music directory"
I assume you have now something like:
music directory=$XDG_MUSIC_DIR
which procuce your above error.
The reason is that most of these $XDG_ variables are not imported in your user environment. So for ex. a application could use $XDG_MUSIC_DIR from the "framework" but you could not use $XDG_MUSIC_DIR as a variable (like $HOME) in configs or scripts - cause they are not declared as environment vars.
I always found this a bit silly, i mean the xdg-user-dirs are usefully so why not have them available in my environment ?
Therefor i made a change on my system to have these vars available everywhere (in all my sripts, all configs when they could use env vars). So long time i do following for my user:
mkdir .config/environment.d
ln -srf .config/user-dirs.dirs .config/environment.d/91-xdg-user-dirs.confNow (after reboot) all my XDG_ vars from .config/user-dirs.dirs are available as environment variables.
I also added the predefined XDG vars like XDG_CONFIG_DIR with their values in this file, so i could use them too.
//Edit ftr. (i looked into my system doc)
That is not enough. With above you would only import the user-dirs var into systemd's user environment. To have them also in login environment (printenv) myself export the systemd user env vars into my shell. For bash this could be in .bashrc
export $(/usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator)For probably side effects read this issue on systemd:
https://github.com/systemd/systemd/issues/7641
edit//
Now applications that use the xdg framework have access to these vars AND i could use them wherever i want.
If i want to change the location of one of these, i have only to do this in one place.
Last edited by GerBra (2025-09-19 09:27:18)
Offline
Also
I posted `systemctl status --user mpd --no-pager`
but #6 is NOT a user service - but active and running and enabled.
If you want to run mpd as user service, make sure the system service is stopped and disabled.
Offline
Have you tried using a plain directory path instead of the variable?
That's what I did originally, and I think this would be simpler. My mpd.conf looks like this now:
# See: /usr/share/doc/mpd/mpdconf.example
pid_file "/run/mpd/mpd.pid"
db_file "/var/lib/mpd/mpd.db"
state_file "/var/lib/mpd/mpdstate"
playlist_directory "~/Music/Playlists"
music_directory "~/Music/Music"
auto_update "yes"
input {
plugin "curl"
}
audio_output {
type "pipewire"
name "PipeWire Sound Server"
}Basically the same as before, but with the extra "input" section based on GerBra's config (I don't know what this is, though, do I need it?).
I may have found the issue, though: I went to `/run/mpd`, and there's no `mpd.pid` there. I tried simply creating an empty file there, but running `mpd` still gives the same error:
exception: Default TCP listener setup failed, but this is okay because we have a $XDG_RUNTIME_DIR listener: Failed to bind to '[::]:6600'; Failed to bind socket: Address already in use
exception: Failed to create pid file "/run/mpd/mpd.pid": Permission deniedIs `mpd.pid` the issue, or is there something else wrong?
Last edited by TySpicer (2025-09-19 17:56:00)
Offline
or is there something else wrong?
Something else is wrong: Please understand that you as a user could NOT use directories like " /run/mpd/mpd.pid" or "/var/lib/mpd/mpd.db" !! Not without totally breaking your system
To make it short, from my point... Do following:
sudo systemctl stop mpd
sudo systemctl disable mpdUse this config for your user mpd.conf
pid_file "$XDG_RUNTIME_DIR/mpd/mpd.pid"
state_file "$XDG_RUNTIME_DIR/mpd/state"
sticker_file "$XDG_CACHE_HOME/sticker.sql"
playlist_directory "~/Music/Playlists"
music_directory "~/Music/Music"
auto_update "yes"
input {
plugin "curl"
}
audio_output {
type "pipewire"
name "PipeWire Sound Server"
}As your user
systemctl --user stop mpd.serice # If you currently have any running user mpd service //Edit!!
systemctl --user enable --now mpd.service
systemctl --user status mpd.servicePost the status output if necessary, there should be not errors.
//Edit: For your inspiration look at the example config from the mpd authors:
https://raw.githubusercontent.com/Music … nf.example
You could see the use of literally paths and the use of XDG_ Vars. But: All paths have to be in your $USER home! Only place where you have access right for.
And if any doubt re-read the wiki for a USER setup on mpd:
https://wiki.archlinux.org/title/Music_ … figuration
Last edited by GerBra (2025-09-19 18:43:54)
Offline
IT WORKS!! I appreciate the help!
Just one more thing, which might require a separate topic: it still doesn't see my playlists. Maybe it uses a different file type than what I had before? Currently, my playlist files are .m3u8 files that look like this:
/home/tyspicer/Music/Music/Metal/Periphery - Periphery/01 - Insomnia.mp3
/home/tyspicer/Music/Music/Metal/Periphery - Periphery/02 - The Walk.mp3
/home/tyspicer/Music/Music/Metal/Periphery - Periphery/03 - Letter Experiment.mp3
/home/tyspicer/Music/Music/Metal/Periphery - Periphery/04 - Jetpacks Was Yes (001).mp3
...Is there something still broken with rmpc/mpd, or do I need a different file type for the playlists?
Offline
Hurray!
I'm not absolutely sure about playlists, but this would be m3u with UTF-8 and should not be a problem for mpd.
The path in there looks a bit suspect, normally you don't need paths in m3u playlists, not with your formatting. I mean:
/home/tyspicer/Music/Music/Metal/Periphery - Periphery/01 - Insomnia.mp3
The first piece may me interpreted as the artist....
Test it with a pure m3u, ex. test.m3u
Periphery - Metal/Periphery - Periphery/01 - Insomnia.mp3This would be format artist - (path)filename.mp3
This should work. Or look at your client (rmpc) doku/man-page what playlist formats it supports.
Offline
mpd playlists are .m3u but at least the ones it generates operate on paths relative to the music directory, the "/home/tyspicer/Music/" would have to go.
Idk but from it's general behavior I'd not expect it to handle absolute paths of local files unless it's communicating via a unix socket (prerequisite to have it play random local files in general)
And even then idk whether it would extend that feature to playlists (never tried)
Offline
@seth
/home/tyspicer/Music/Music" would have to go. His music dir is: "~/Music/Music"
//Edit; And you're right, m3u needs only a (relative) path to a music file. Artists/Title should be in the metadata..
Last edited by GerBra (2025-09-19 19:21:39)
Offline
Ah, so I guess I'll have to rebuild my playlists. That's alright, I was planning on doing that anyway! GerBra said the path looks suspect, probably because my folders are genre/album/song. I'd like to change the folder structure to genre/artist/album/song, so I'll have to reconfigure everything eventually.
I did a quick test of this: I took all of the "Periphery - ..." folders, put them in one folder called "Periphery," and renamed the album folders with just the album names. I made a test playlist called `test.m3u` and put the following lines in it:
/Music/Metal/Periphery/Periphery/01 - Insomnia.mp3
/Music/Metal/Periphery/Periphery/02 - The Walk.mp3This reflects the new file paths, and gets rid of the unnecessary parent folders like seth said. In rmpc, I can see the test playlist with the two songs now. Although, it's having trouble playing them (I can play songs from the other menus). It gives me this error:
File '/Music/Metal/Periphery/Periphery/01 - Insomnia.mp3' was listed but not foundSo it found it, but can't find it?
EDIT: I tried deleting /Music in test.m3u, and it still loads the two songs, but can't play them:
/Metal/Periphery/Periphery/01 - Insomnia.mp3
/Metal/Periphery/Periphery/02 - The Walk.mp3Last edited by TySpicer (2025-09-19 19:22:39)
Offline
@seth
/home/tyspicer/Music/Music" would have to go. His music dir is: "~/Music/Music"
"~" is shorthand for "~/home/tyspicer", right? Either way, I think it makes sense that it's more of a relative path.
Offline
Short:
You have this:
home/tyspicer/Music/Music/Metal/Periphery - Periphery/01 - Insomnia.mp3
It should be:
Metal/Periphery - Periphery/01 - Insomnia.mp3
Because your music dir is /home/tyspicer/Music/Music - mpd looks for songs IN THIS directory itself. So you have to strip this from the playlist.
Offline
"Metal/Periphery/Periphery/01 - Insomnia.mp3" but you can also boldly try eg.
bind_to_address "/run/user/1000/mpd.socket"https://mpd.readthedocs.io/en/stable/us … #listeners
You will/might have to adjust your client config, though, because you're not using the default connection.
Edit: nija'd…
Last edited by seth (2025-09-19 19:28:40)
Offline
I got it to work! I just needed to remove the leading slash:
Metal/Periphery/Periphery/01 - Insomnia.mp3
Metal/Periphery/Periphery/02 - The Walk.mp3(I changed the folder structure, so it's two folders named "artist/album" rather than one folder named "artist - album.")
Now I just need to figure out how to actually use rmpc to make playlists. I'm sure I can figure that out. Thanks everyone for the help!
Offline
Happy listening !!
Offline