mviereck / x11docker

Run GUI applications and desktops in docker and podman containers. Focus on security.
MIT License
5.62k stars 378 forks source link

Pulseaudio `x11docker -p` passthrough fails over remote `x2go` sessions #373

Closed sar closed 3 years ago

sar commented 3 years ago

Source audio from containers with x11docker -p flag does not passthrough to clients when running over x2go session on a remote docker host.

Linux clients are able to access the remote KVM's pulseaudio but the nested x11docker -p docker container has no sound output over the same x2go session. Here's an example config:

-----------------------------------------------
|    Client = x2go =>   |  Remote KVM XFCE    |
|                       | Remote Audio OK     |
|                       | x11docker -p        |
|                       | No Container Audio  |
-----------------------------------------------

Steps to Reproduce

  1. Configure x2goserver.service on the remote docker host KVM
  2. Set the session properties from x2goclient to auto configure pulseaudio passthrough
  3. Connect to a remote session passing the runtime cmd x11docker -p <image> or remote into a full DE (xfce, mate) and run the container manually
  4. Source audio from the remote DE works, but not from the x11docker container

Error Message Could not find any relevant error messages emitted with flags -p -v (verbose), docker attaches --volume /dev/snd:/dev/snd:rw in the runtime args.

x11docker WARNING: Sharing device file: /dev/snd

Notes Similar to using ssh -X remotely into an x11docker host, x2go auto configures remote sound, compression, and persistent session restore.

Applications can be individually forwarded with commands x11docker <options> <image> <command> or forwarding entire DE (xfce, mate, etc) and running containers manually them.

mviereck commented 3 years ago

Could not find any relevant error messages emitted with flags -p -v (verbose), docker attaches --volume /dev/snd:/dev/snd:rw in the runtime args.

x11docker WARNING: Sharing device file: /dev/snd

This does not look correct. With option --pulseaudio x11docker does not share dev/snd. It only does with option --alsa that is used as a fallback if --pulseaudio is not possible. In that case you should get a message like:

x11docker note: Option --pulseaudio: command pactl failed.
  Is pulseaudio running at all on your host?
  Fallback: Enabling option --alsa

If you don't see such a message, please run with option --debug instead of --verbose and show me the output.

mviereck commented 3 years ago

Not heard back, closing.