1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00

services: mpd: Connect to the user's PulseAudio socket.

* gnu/services/audio.scm (mpd-shepherd-service): Set the XDG_RUNTIME_DIR
environment variable.

Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr>
This commit is contained in:
Robert Smith
2019-11-05 23:46:46 +01:00
committed by Tobias Geerinckx-Rice
parent 8f61b53efc
commit 970cb5cece

View File

@@ -140,6 +140,13 @@ audio_output {
"--no-daemon"
#$(mpd-config->file config))
#:pid-file #$(mpd-file-name config "pid")
#:environment-variables
;; Required to detect PulseAudio when run under a user account.
'(#$(string-append
"XDG_RUNTIME_DIR=/run/user/"
(number->string
(passwd:uid
(getpwnam (mpd-configuration-user config))))))
#:log-file #$(mpd-file-name config "log")))
(stop #~(make-kill-destructor))))