--- Begin Message ---
Subject: |
[PATCH] services: mpd: add pulseaudio support |
Date: |
Tue, 5 Nov 2019 23:46:46 +0100 |
Set the XDG_RUNTIME_PATH environment variable in the mpd service so
that it can detect pulseaudio when run under a user account.
---
gnu/services/audio.scm | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm
index 471c5fd95f..424ccc7c8f 100644
--- a/gnu/services/audio.scm
+++ b/gnu/services/audio.scm
@@ -140,6 +140,12 @@ audio_output {
"--no-daemon"
#$(mpd-config->file config))
#:pid-file #$(mpd-file-name config "pid")
+ #:environment-variables
+ '(#$(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))))
--
2.23.0
--- End Message ---
--- Begin Message ---
Subject: |
Re: [bug#38075] [PATCH] services: mpd: add pulseaudio support |
Date: |
Fri, 08 Nov 2019 21:34:58 +0100 |
Robert,
Thanks for the patch!
Robert Smith 写道:
+ #:environment-variables
+ '(#$(string-append
+ "XDG_RUNTIME_DIR=/run/user/"
+ (number->string
+ (passwd:uid
+ (getpwnam (mpd-configuration-user
config))))))
Like Ludo', I'm surprised this isn't the default. My XDG-foo is
weak, though.
Your patch failed to break my set-up (better luck next time) so
I've pushed it as 970cb5ceceaa85765230a9f896a43783cdcb4e6c with
the following tweaks:
- Adjusted the commit message to follow the GNU change log
standards & Guix's conventions
- Promoted your commenty commit message to first-class comment
- Removed a trailing space after ‘passwd:uid’ (git diff/show/…
should highlight this)
Kind regards,
T G-R
signature.asc
Description: PGP signature
--- End Message ---