Skip to content

Container

allow container gui apps access to Xserver

$ xhost local:root
# or xhost +
# But this will cause "access control disabled, clients can connect from any host"
$ docker run -it --rm \
    -e DISPLAY \
    -u $(id -u $USER):$(id -g $USER) \
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    sshipway/xclock

stackoverflow solution


Last update: August 6, 2021