how to Start a pulseaudio application as a daemon with systemd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
'/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 /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
directory
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',
expected 256
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.

This:

$ 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


this due to  /etc/pam.d/systemd-user & co. isn't it ?
/usr/lib/systemd/user/pulseaudio.socket
/usr/lib/systemd/user/sockets.target.wants/pulseaudio.socket

(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 ?

Best regards
Christophe




[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux