I’m unable to get audio with X11 forwarding to work. I’m able to see the ardour8 GUI running with no problem with
$ ssh -v -Y -C myremoteserver
and by adding the following to my sshd_config
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost no
I tried setting X11UseLocalhost yes but it didn’t seem to change anything. I read that forwarding the audio can be done manually, but I haven’t been able to get it to work.
Then I decided to take a step back and ask the community, since wanting remote access to Ardour is probably something fairly common. There are some references to X11 forwarding in this discourse, but I wasn’t able to find anything that mentioned setting it up in the first place, other than this which is quite old and makes it seem like it used to just work without additional configuration from what I’ve already done.
My system is pop-os which uses pipewire. I can run ardour8 using pw-jack /opt/Ardour-8.10.0/bin/ardour8 or run it without pw-jack and choose pulseaudio in the Audio/MIDI setup. Either way it only plays audio on the remote machine and not on my local machine.
I also thought about doing this with a more comprehensive RDP setup, but for various reasons, I can’t do that easily on pop-os (at least not with the gnome-remote-desktop package). I would prefer something simple. If there’s something other people are using that works better than what I’m trying to do with X11, please let me know.
@tjb1982 : X-forwarding is what it says: Forwarding of “X”, meaning graphics. This would never forward any audio. Main reason would be that ssh uses TCP which would be terrible for low-latency stuff.
You might say “But aren’t graphics low latency too?” yes, but X forwarding actually fowards INFORMATION allowing your local X to re-render stuff, not the actual “video” of X windows.
I think there ought to be a way to do this if you don’t really care much about low latency. I was planning to use this for auditioning MIDI which is visible in the piano roll, so if the audio arrives late, it’s okay for my usecase. I just don’t know why when I’ve forwarded the socket and copied the cookie over, I still don’t hear sound. E.g.,
and then choose PulseAudio in the Audio/MIDI setup, I was assuming that this would write the audio to that socket and I’d hear it on my local machine (again, out of sync, but I don’t need it to be). But I don’t get any audio at all and I’m not sure how to troubleshoot it.
@florianb@paul I can confirm that I receive pulseaudio from the remote doing this
local$ scp $HOME/.config/pulse/cookie pop-os:.config/pulse/cookie
local$ ssh -Y -C -R /tmp/mypulse:/run/user/1000/pulse/native pop-os
remote$ export PULSE_SERVER=unix:/tmp/mypulse
remote$ pactl info
Server String: unix:/tmp/mypulse
Library Protocol Version: 35
Server Protocol Version: 35
Is Local: yes
Client Index: 832
Tile Size: 65472
User Name: tjb1982
Host Name: chester
Server Name: PulseAudio (on PipeWire 1.0.3)
Server Version: 15.0.0
Default Sample Specification: float32le 2ch 48000Hz
Default Channel Map: front-left,front-right
Default Sink: alsa_output.pci-0000_00_1f.3.analog-stereo
Default Source: alsa_input.pci-0000_00_1f.3.analog-stereo
Cookie: 68d5:00e6
remote$ pactl upload-sample ~/Downloads/file_example_WAV_1MG.wav foo
remote$ pactl play-sample foo
This plays sound on my local machine. I’m just trying to get a similar situation up and running with the audio output from Ardour. I thought that by choosing PulseAudio from the Audio/MIDI setup it would just use the pulseaudio system which is really just PipeWire emulating it (which you can see above from the pactl info output “Server Name: PulseAudio (on PipeWire 1.0.3)”), and the sockets set up like I’ve done here.