[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/01: services: mpd: Connect to the user's PulseAudio socket.
From: |
guix-commits |
Subject: |
01/01: services: mpd: Connect to the user's PulseAudio socket. |
Date: |
Fri, 8 Nov 2019 15:34:15 -0500 (EST) |
nckx pushed a commit to branch master
in repository guix.
commit 970cb5ceceaa85765230a9f896a43783cdcb4e6c
Author: Robert Smith <address@hidden>
Date: Tue Nov 5 23:46:46 2019 +0100
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 <address@hidden>
---
gnu/services/audio.scm | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm
index 471c5fd..345d822 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))))