I would like to run a program remotely (through ssh) but with audio going to the remote machine where the program actually runs. This would normally work with ALSA, but pulseaudio apparently checks some session authenticator before allowing connection from a client.
How to make this check less strict?
local: $ ssh remote # remote is running pulseaudio and has sound hardware
remote:$ paplay something.wav
Connection failure: Connection refused
pa_context_connect() failed: Connection refused
remote:$ audacious something.mp3 # opens on local's X11 display
pulseaudio: Failed to connect to server: Connection refused
pulseaudio: Failed to connect to server: Connection refused
pax11publish -r
works on my Ubuntu 19.10. – Stephen Boston Feb 17 '20 at 14:30