Compdigitec Labs

« | Home | »

Running a GUI application in Docker

By admin | January 30, 2021

apt-get update && apt-get install -y openssh-server vim xpra

# Allow container to connect to GUI?
xhost +
docker run --rm -v /tmp/.X11-unix:/tmp/.X11-unix -p 2222:2222 -e DISPLAY --security-opt seccomp:unconfined -it <image> bash

sudo mkdir -p /run/user/1000
sudo chown ubuntu:ubuntu /run/user/1000

xpra start ssh:ubuntu@localhost:2222 --exit-with-children --start-child="xfce4-terminal"

If you found this article helpful or interesting, please help Compdigitec spread the word. Don’t forget to subscribe to Compdigitec Labs for more useful and interesting articles!

Topics: Linux | 3 Comments »

3 Responses to “Running a GUI application in Docker”

  1. French Bulldogs Says:
    September 29th, 2021 at 02:05

    … [Trackback]

    […] Info to that Topic: compdigitec.com/labs/2021/01/30/running-a-gui-application-in-docker/ […]

  2. https://www.originmushrooms.net Says:
    October 20th, 2021 at 07:10

    … [Trackback]

    […] Read More here to that Topic: compdigitec.com/labs/2021/01/30/running-a-gui-application-in-docker/ […]

  3. บาคาร่า1688 Says:
    November 14th, 2021 at 18:57

    … [Trackback]

    […] Info to that Topic: compdigitec.com/labs/2021/01/30/running-a-gui-application-in-docker/ […]

Comments