You are not logged in.
I have a service that eventually makes a system call to pactl set-sink-volume
This works fine if I run the binary as my local user but throws a connection error if running as a service.
Sep 22 15:45:00 desktop python3[8784]: Connection failure: Connection refused
Sep 22 15:45:00 desktop python3[8784]: pa_context_connect() failed: Connection refused
When creating the service entry I also set that user.
Pulseaudio is running non daemonized. Maybe that’s the trick here?
Pulse audio is running as the X user that is logged in.
Not sure what environment variables I would need to set or if I need to run a daemon instance of pulse audio.
Last edited by paulbono (2020-09-24 12:30:03)
Offline
What are you doing in your service and are you sure you need to run that as a system service? If you can just run that like pulseaudio as a user service that will immediately fix all of these issues, without having to have any special considerations.
Online
Again V1del you post a simple solution that fixes all my issues. I had never written anything as a user service but after you mentioned that it was a thing adding --user and removing the user from the system file fixed everything for me. Thank you so so much!
Offline