summary refs log tree commit diff
path: root/gnu/services/audio.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2019-11-15 20:11:35 +0100
committerMarius Bakke <mbakke@fastmail.com>2019-11-15 20:11:35 +0100
commitf056553c6b8ffa36f4ce9fb1c3602a8f4b1de242 (patch)
tree80c815216a3717cf00b615c9cb8840c113eaf79f /gnu/services/audio.scm
parent2c9d34166983565120f831284df57a07e2edd2f9 (diff)
parent528b52390d216d8a8cd13dfcd1e6e40a6448e6c2 (diff)
downloadguix-f056553c6b8ffa36f4ce9fb1c3602a8f4b1de242.tar.gz
Merge branch 'master' into staging
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))))