X11 forwarding of a GUI app running in docker

前端 未结 4 717
南旧
南旧 2021-01-01 02:31

First off: I have read the answers to similar questions on SO, but none of them worked.

The situation:

  • App with GUI is running in a docker container (C
4条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-01 02:53

    This works in any scenario.

    Install xhost if you don't have it. Then, in bash,

    export DISPLAY=:0.0
    xhost +local:docker
    

    After this run your docker run command (or whatever docker command you are running) with -e DISPLAY=$DISPLAY

提交回复
热议问题