Open stormwatch opened 6 years ago
Yes, you can start gmediarender as any user.
For the record, I ended up with the original provided systemd unit service but then configured pulseaudio unix sockets as described in https://wiki.archlinux.org/index.php/PulseAudio/Examples#Allowing_multiple_users_to_use_PulseAudio_at_the_same_time
in /etc/pulse/default.pa:
load-module module-native-protocol-unix auth-anonymous=1 socket=/tmp/pulse-socket
and in /etc/pulse/client.conf:
default-server = unix:/tmp/pulse-socket
I just spent hours trying to achieve this before I saw your post. Thanks!
There should be a word about this in the doc...
I didn't need to reconfigure Pulseaudio with using
/etc/systemd/user/gmrender-resurrect.service
[Unit]
Description=gmrender-resurrect service
After=network.target sound.target
[Service]
Type=simple
Restart=always
PIDFile=/run/user/%U/gmrenderer.pid
EnvironmentFile=/etc/default/gmediarender
ExecStart=/bin/bash -c ' \
/usr/local/bin/gmediarender \
-f "`hostname`" \
-u "`cat /etc/machine-id`" \
-P /run/user/%U/gmrenderer.pid \
--gstout-initial-volume-db=$INITIAL_VOLUME_DB \
$DAEMON_EXTRA_ARGS \
'
[Install]
WantedBy=multi-user.target
and with
/etc/default/gmediarender
INITIAL_VOLUME_DB=-10
DAEMON_EXTRA_ARGS="--gstout-audiosink=alsasink --gstout-audiodevice=pulse"
Hi all:
I'd like to know if there is a way for gmediarender.service running with user name 'gmediarender' to require pulseaudio (service or socket) as opposed to running pulseaudio as a system-wide daemon.
Would it be better to run gmediarender.service with systemctl --user since pulseaudio is defined as a user service too?
Thanks