[pulseaudio-discuss] how to Start a pulseaudio application as a daemon with systemd
christophe.lohr at cegetel.net
Sat May 19 20:32:16 UTC 2018
Le 19/05/2018 à 18:47, Tanu Kaskinen a écrit :
> Since the address contains the machine id, I'm pretty sure the address
> is from the X server.
Bingo! That's it!
In fact, I'm managing this via a ssh -X
(the idea is to manage audio applications on the distant machine, not on
the local one)
$ unset DISPLAY
$ PULSE_LOG=99 pacat
Parsing configuration file '/etc/pulse/client.conf'
Parsing configuration file
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 /var/run/pulse/native...
Failed to open cookie file '/home/clohr/.config/pulse/cookie': No such
file or directory
Failed to load authentication key '/home/clohr/.config/pulse/cookie': No
such file or directory
Failed to open cookie file '/home/clohr/.pulse-cookie': No such file or
Failed to load authentication key '/home/clohr/.pulse-cookie': No such
file or directory
Got 0 bytes from cookie file '/home/clohr/.config/pulse/cookie',
SHM possible: yes
Protocol version: remote 32, local 32
Negotiated SHM: no
Memfd possible: yes
Negotiated SHM type: private
This seems ok, isn't it?
But why does the client tries X11 stuff despite '/etc/pulse/client.conf'
which says 'default-server = /var/run/pulse/native' ?
> I don't know what you mean by "via pam.d", though.
$ sudo netstat -lxp | grep pulse
unix 2 [ ACC ] STREAM LISTENING 474424
unix 2 [ ACC ] STREAM LISTENING 477788
unix 2 [ ACC ] STREAM LISTENING 720251
this due to /etc/pam.d/systemd-user & co. isn't it ?
(systemd includes too much sorcery for me)
> If you're using the system-wide mode, I think it's best to disable all
> per-user pulseaudio services in systemd. I'm not sure how to do that,
> maybe "sudo systemctl --global disable pulseaudio.socket
> pulseaudio.service" does the trick. This should also prevent the wrong
> address getting stored in X, because when start-pulseaudio-x11 tries to
> load module-x11-publish, that will fail because systemd didn't start a
> pulseaudio daemon for the user.
Should I disable module-x11-publish ?
More information about the pulseaudio-discuss