[pulseaudio-discuss] Problem: non-interactive pulseaudio ( headless )
brian at bulkowski.org
Thu Aug 29 19:02:58 UTC 2019
Not like people are jumping to help out.... but
There seems to be a .service file floating around the internet which
says the service type is "notify", which doesn't work. Getting to a more
normal form of service file seems to get past the auth problems I was
The next step was to understand cookie files. The pulseaudio system file
says it can't read the cookie file in two known locations, even though
there are files there and an existing path. I've tried using the 'pulse'
user and 'pulse' group, although there are many paths to test.
Using the environment variable didn't seem to pick up an existing cookie
file. I wish there was some kind of message saying that the path was
ignored or something. Of course there are many possibilities of
misspelling or misunderstanding.
What I have noticed is there is a cookie file created by the pulseaudio
daemon on startup. However, it's created as rw only on the pulse _user_,
where it would be far nicer if the file was created 'r' on the pulse
group as well. That would allow a pretty sensible use of the group
system to determine which users could access that created cookie file.
However, if I have a cookie file, I will figure out a way to get the
over to the headless user I intend.
Any hints appreciated, otherwise I'll just keep posting my signposts
hoping it helps someone else.
On 8/26/2019 9:38 AM, Brian Bulkowski wrote:
> 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
> 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
> 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
> On 8/26/2019 7:31 AM, Brian Bulkowski wrote:
>> 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,
More information about the pulseaudio-discuss