On Debian 13 GNOME how to forward PipeWire over SSH?
Feb 25, 4:29pm

Forwarding PipeWire (the modern audio and video server used in GNOME) over SSH on Debian 13 (or any Linux distribution using PipeWire) is not as straightforward as forwarding PulseAudio, but it can be achieved using a combination of SSH tunneling and PipeWire's network capabilities. Here’s how you can do it:


1. Prerequisites

  • Ensure PipeWire is installed and running on both the local and remote machines.
  • SSH access to the remote machine.

2. Enable PipeWire Network Support

PipeWire supports network streaming via the pw-jack or pw-pulse modules, but the most reliable method is to use the pipewire-pulse module to emulate PulseAudio and then forward that over SSH.

On the Remote Machine:

  • Ensure the pipewire-pulse module is loaded (it usually is by default on GNOME systems).
  • Check if the PulseAudio compatibility layer is running:
    bash
    pactl info
    If it’s not running, start it with:
    bash
    systemctl --user start pipewire-pulse

3. Forward PulseAudio over SSH

Since PipeWire emulates PulseAudio, you can forward the PulseAudio socket over SSH.

On the Local Machine:

Run the following SSH command to forward the PulseAudio socket:

bash
ssh -X -R /tmp/pulseaudio-socket:/run/user/$(id -u)/pulse/native user@remote-machine
  • -X enables X11 forwarding (optional, only needed if you want GUI apps).
  • -R forwards the local PulseAudio socket to the remote machine.

On the Remote Machine:

Set the PULSE_SERVER environment variable to use the forwarded socket:

bash
export PULSE_SERVER=unix:/tmp/pulseaudio-socket

Now, any audio played on the remote machine will be forwarded to your local machine.


4. Alternative: Use pw-jack for Low-Latency Audio

If you need low-latency audio (e.g., for music production), you can use the JACK compatibility layer in PipeWire.

On the Remote Machine:

  • Start a JACK server with PipeWire:
    bash
    pw-jack jack_dummy
  • Forward the JACK ports over SSH using netjack2 or a similar tool (this is more complex and may require additional setup).

5. Verify Audio Forwarding

  • Play an audio file on the remote machine (e.g., paplay /usr/share/sounds/alsa/Front_Center.wav).
  • If you hear the audio on your local machine, the forwarding is working.

Troubleshooting

  • If audio doesn’t work, check if the PulseAudio socket is correctly forwarded:
    bash
    ls -l /tmp/pulseaudio-socket
  • Ensure the pipewire-pulse service is running on the remote machine:
    bash
    systemctl --user status pipewire-pulse
  • If you encounter permission issues, ensure the /run/user/$(id -u)/pulse directory is accessible.

Notes

  • This method relies on PulseAudio compatibility, so it may not work for all PipeWire-native applications.
  • For video forwarding (e.g., screen sharing), consider using ffmpeg or gstreamer over SSH with X11 forwarding.
Feb 25, 4:29pm

This is a shared conversation and may include unverified content that doesn't reflect Mistral AI's views. Login to resume chatting.