GNU bug report logs - #31769
mpd / pulse control issue

Previous Next

Package: guix;

Reported by: Bradley Haggerty <bradigger <at> gmail.com>

Date: Sat, 9 Jun 2018 13:04:02 UTC

Severity: normal

Full log


Message #14 received at 31769 <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: Bradley Haggerty <bradigger <at> gmail.com>
Cc: 31769 <at> debbugs.gnu.org
Subject: Re: bug#31769: mpd / pulse control issue
Date: Sun, 10 Jun 2018 23:33:53 -0400
[Message part 1 (text/plain, inline)]
On Sat, Jun 09, 2018 at 06:58:03AM -0500, Bradley Haggerty wrote:
> When I start my computer, mpd can play my music fine, but pavucontrol can't
> connect to pulse and show my volume controls. If I kill pulse and open
> pavucontrol, all my volume controls are visible, but then mpd can't play
> music.

As 宋文武 and Julien said, this should be fixed in our service but it might be
tricky to do without being able to listen to music ;)

In the meantime, If it suits your needs, you can run MPD with your
unprivileged user instead of at the system level.

Below is a file I use to start MPD as my own user on GuixSD, and it
seems to do the right thing regarding PulseAudio, although I use
pulsemixer instead of pavucontrol.

I originally copied the file from Dave Thompson... any mistakes are my
own :)

By the way, the file should be named '~/.config/shepherd/init.scm'.

------
;; To use this automatically, add something like the following line to
;; whatever gets sourced for a login shell:
;;
;; [[ -z $(pgrep -U $(id --user) shepherd) ]] && shepherd & > /dev/null
;;
;; Or, just invoke `shepherd`.

(use-modules (ice-9 match)
             (srfi srfi-1)
             (system repl server))

(define (touch-file file)
  (close-port (open-file file "a0b")))

(register-services

  (make <service>
    #:provides '(mpd)
    #:requires '() 
    #:start (lambda args
              (define (mpd-dir file)
                (string-append (getenv "HOME") "/.mpd/" file))
              (unless (file-exists? (mpd-dir "playlists"))
                (mkdir (mpd-dir "playlists")))
              (touch-file (mpd-dir "database"))
              (fork+exec-command
               (list "mpd" "--no-daemon")))
    #:stop (make-kill-destructor)))

(action 'shepherd 'daemonize)

(for-each start '(mpd))
------
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 2 years and 48 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.