[pulseaudio-discuss] how to Start a pulseaudio application as a daemon with systemd
Christophe Lohr
christophe.lohr at cegetel.net
Sat May 19 16:04:32 UTC 2018
Le 19/05/2018 à 16:44, Tanu Kaskinen a écrit :
> You can run "PULSE_LOG=99 pacat" to see where pacat tries
> to find the socket,
$ PULSE_LOG=99 pacat
Parsing configuration file '/etc/pulse/client.conf'
Parsing configuration file
'/etc/pulse/client.conf.d/00-disable-autospawn.conf'
Using shared memfd memory pool with 1024 slots of size 64.0 KiB each,
total size is 64.0 MiB, maximum usable slot size is 65472
Trying to connect to
{51a261c88a763f7966ea19eb4a450bb2}unix:/run/user/1000/pulse/native...
parsing address failed:
{51a261c88a763f7966ea19eb4a450bb2}unix:/run/user/1000/pulse/native
Connection failure: Connection refused
pa_context_connect() failed: Connection refused
Why does it look at /user/1000 ?
I'm user 1001 !
$ id
uid=1001(clohr) gid=1001(clohr)
groupes=1001(clohr),27(sudo),29(audio),110(wireshark),114(pulse-access)
> and compare it to "sudo netstat -lxp | grep pulse".
> The latter command should show all socket locations that any pulseaudio
> instance is listening on.
$ sudo netstat -lxp | grep pulse
unix 2 [ ACC ] STREAM LISTENING 474424
23106/systemd /run/user/65534/pulse/native
unix 2 [ ACC ] STREAM LISTENING 477788
23070/systemd /run/user/33/pulse/native
unix 2 [ ACC ] STREAM LISTENING 720251
8555/systemd /run/user/1000/pulse/native
unix 2 [ ACC ] STREAM LISTENING 855796
11301/pulseaudio /run/pulse/native
If I understand well, the last line corresponds to the pulseaudio server
I started in "system whide" mode
The former lines correspond to sockets monitored by systemd for sessions
of users, via pam.d
isn't it?
>> The server is executed as follow:
>> $ pgrep -a pulseaudio
>> 19813 /usr/bin/pulseaudio --system --disallow-exit --realtime
>> --log-target=journal --daemonize=no
>>
>>
>> /etc/pulse/client.conf contains:
>> default-server = /var/run/pulse/native
>> autospawn = no
> Setting default-server should be unnecessary. If libpulse can't connect
> to the per-user daemon, it should automatically try the system-wide
> socket location.
More information about the pulseaudio-discuss
mailing list