====== 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: docker run \ -it \ -rm \ -u "$(id -u):$(id -g)" \ -e DISPLAY \ -v /tmp/.X11-unix:/tmp/.X11-unix \ "your_image_with_x11_app" 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.