From: Leo Famulari <leo@famulari.name>
To: Bradley Haggerty <bradigger@gmail.com>
Cc: 31769@debbugs.gnu.org
Subject: bug#31769: mpd / pulse control issue
Date: Sun, 10 Jun 2018 23:33:53 -0400 [thread overview]
Message-ID: <20180611033353.GA24092@jasmine.lan> (raw)
In-Reply-To: <CABGw91f0rxauVJNqcGQxrU1ua2c=Lrvb-zmLoKG6_XyP0GENfQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1852 bytes --]
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))
------
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2018-06-11 3:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-09 11:58 bug#31769: mpd / pulse control issue Bradley Haggerty
2018-06-10 2:18 ` 宋文武
2018-06-10 8:15 ` Julien Lepiller
2023-04-26 0:08 ` Maxim Cournoyer
2018-06-11 3:33 ` Leo Famulari [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180611033353.GA24092@jasmine.lan \
--to=leo@famulari.name \
--cc=31769@debbugs.gnu.org \
--cc=bradigger@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).