Return to Level1Techs.com

How can I control a systemd-service audio stream via pulseaudio/pavucontrol?


#1

I am running a spotify connect client on my computer via the following script (uses librespot):

#!/bin/bash

/usr/bin/librespot --name linux --backend pulseaudio --bitrate 160 --disable-audio-cache --enable-volume-normalisation --linear-volume --initial-volume=100 -u "###" -p "###"

If i run it myself from the command-line I can control the volume in pavucontrol. But as soon as I start it via the following systemd service:

[Unit]

Description=spotify-connect server

[After=network.target](https://After=network.target)

[Service]

User=tt7753

Group=users

Restart=always

RestartSec=10

ExecStart=/home/tt7753/spotify/start.sh

[Install]

[WantedBy=multi-user.target](https://WantedBy=multi-user.target)

it doesnt show up anymore as an Ouput-stream in pavucontrol. (Playback works just fine)

Outout of ps -ef | grep pulse:

tt7753 751 1 6 06:25 ? 00:49:02 /usr/bin/pulseaudio --start --log-target=syslog

t7753 18295 1 0 17:18 ? 00:00:00 /usr/bin/librespot --name linux --backend pulseaudio --bitrate 160 --disable-audio-cache --enable-volume-normalisation --linear-volume --initial-volume=100 -u # -p #

tt7753 18307 1 0 17:18 ? 00:00:00 /usr/bin/pulseaudio --start --log-target=syslog

tt7753 19449 17835 0 18:09 pts/0 00:00:00 grep --color=auto pulse

Does anyone know, how I could fix this?