no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


blog:2022:01:30:2022-01-30_-_x11_forwarding_to_docker_container [2022/01/30 20:21] (current) – created basz
Line 1: Line 1:
 +====== 2022-01-30 - X11 forwarding to docker container ======
  
 +sometime ago i had an issue with X11 forwarding for containers. for quite some time i just used setup SSHd in container and X11 forward via SSH. later on things improved. in fact my [[blog:2021:12:15:2021-12-15_-_containerized_steam|steam containerization]] efforts did use that approach, yet it was not exposed, so maybe it would be good to point it out explicitly.
 +
 +the spell is:
 +<code bash>
 +docker run \
 +  -it \
 +  -rm \
 +  -u "$(id -u):$(id -g)" \
 +  -e DISPLAY \
 +  -v /tmp/.X11-unix:/tmp/.X11-unix \
 +  "your_image_with_x11_app"
 +</code>
 +
 +so the key thing is to forward ''DISPLAY'' variable and path to X11 socket file. simple and straight forward... once you spent enough time on the net googling for quirks. ;)
 +
 +btw: for QT-based applications you may also want to pass ''-e QT_X11_NO_MITSHM=1'', to disabled shared memory usage.
blog/2022/01/30/2022-01-30_-_x11_forwarding_to_docker_container.txt · Last modified: 2022/01/30 20:21 by basz
Back to top
Valid CSS Driven by DokuWiki Recent changes RSS feed Valid XHTML 1.0