From 4162a4c17c919c37e161b75136dc78f7fb1571a7 Mon Sep 17 00:00:00 2001 From: AwesomeAdam54321 Date: Tue, 22 Jun 2021 10:00:18 +0200 Subject: [PATCH] Added pulseaudio-daemon NOTE: You MUST define the $USER variable in the conf file before starting this service, or else it won't start. I opted for making a system service running as my user since it's my personal preference, but if you prefer that this be a user service then you can refer to the runit init system website's FAQ: http://smarden.org/runit/faq.html Instead of exec chpst -u floyd runsvdir /home/floyd/service (if your user is floyd) Replace it with exec chpst -u floyd:audio runsvdir /home/floyd/service To run these services as your user as part of the audio group, which is neccessary for pulseaudio to access your audio device files. If you're already part of the audio group then you can ignore what I just said above. --- sv/pulseaudio-daemon/conf | 4 ++++ sv/pulseaudio-daemon/run | 3 +++ 2 files changed, 7 insertions(+) create mode 100644 sv/pulseaudio-daemon/conf create mode 100644 sv/pulseaudio-daemon/run diff --git a/sv/pulseaudio-daemon/conf b/sv/pulseaudio-daemon/conf new file mode 100644 index 0000000..879a976 --- /dev/null +++ b/sv/pulseaudio-daemon/conf @@ -0,0 +1,4 @@ +#Write your username below in the $USER variable, and change the $HOME variable if that isn't your home directory. +#It's a matter of personal preference if you would like the pulseaudio-daemon to be run as a user service or as a system service running as a user, I went for the latter. +USER= +HOME=/home/$USER diff --git a/sv/pulseaudio-daemon/run b/sv/pulseaudio-daemon/run new file mode 100644 index 0000000..c0ca957 --- /dev/null +++ b/sv/pulseaudio-daemon/run @@ -0,0 +1,3 @@ +#!/bin/sh +[ -r ./conf ] && . ./conf +exec chpst -u $USER:audio pulseaudio --daemonize=no --log-target=syslog