aboutsummaryrefslogtreecommitdiff
path: root/gnu/services/audio.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/services/audio.scm')
-rw-r--r--gnu/services/audio.scm7
1 files changed, 7 insertions, 0 deletions
diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm
index 471c5fd95f..345d8225b2 100644
--- a/gnu/services/audio.scm
+++ b/gnu/services/audio.scm
@@ -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))))