[pulseaudio-discuss] Problem: non-interactive pulseaudio ( headless )

Brian Bulkowski brian at bulkowski.org
Mon Aug 26 16:38:40 UTC 2019


Hi,

I've tried a bunch of the online guides, and I find the following 
problem. I am running Debian Buster on a raspberry pi with pulseaudio 12.0

Note that I don't need to run as root. I just need to auto-start, and 
that usually requires running a service (systemd), and I've specified 
not using the root user.

When I attempt to launch my pulseaudio service, I get the following:

  ==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to start 'pulseaudio.service'.
Authenticating as: root
Password:
polkit-agent-helper-1: pam_authenticate failed: Authentication failure
==== AUTHENTICATION FAILED ===
Failed to start pulseaudio.service: Access denied

Appreciated hints would be: how to run a PulseAudio application in a way 
that it auto-start and auto-restart ( it runs on the command line for a 
lot of hours so maybe I'm just good with auto-start ). I have written 
the C code directly to pulseaudio myself so if there anything in terms 
of PulseAudio connect options that's great.

* I am OK running as my user ( the default user on the raspberry pi ) *

I have tried:
Running 'pulseaudio' as my user
Running my app as my user

I have not yet monkeyed with different pulseaudio configuration settings.

Thanks in advance, this is a great library for headless art projects and 
my source will be available. I will certainly write up the results, 
probably for StackOverflow as an even more search-friendly source....

-brian

On 8/26/2019 7:31 AM, Brian Bulkowski wrote:
> Hi!
>
> Heaving read how bad headless is, and how it's "rarely" needed and may 
> not work, I was a bit blase about running my interactive art 
> installation from systemd.
>
> After all, systemd allows me to run as a user.
>
> When I run as a non-interactive user, I get a "pulseaudio can't 
> connect", which is an errno 6.  This happens from systemd, after 
> everything's started, I'm just debugging so I'm running my systemctl 
> start mylousy.service....
>
> From what I read here, the aversion to running as a service is 
> security, and if I run as a user everything should be fine, but it is 
> the connect call that failing.
>
> Regrettably I'm at a place with limited connectivity, but any tips 
> would be welcome, or at least for the next person who is trying to run 
> a perfectly reasonable headless installation.
>
> Thanks & Regards,
>
> -brian
>


More information about the pulseaudio-discuss mailing list