Glam Prestige Journal

Bright entertainment trends with youth appeal.

I have a docker container, and am wanting to use some GUI outside of the container. Problem is, when I try to open a GUI inside the container (for example firefox) it gives me the following Error (this message is from firefox):

Unable to init server: Could not connect: Connection refused
Error: cannot open display: :0

I tried to change the DISPLAY variable to MY_IP_ADDRESS:0, but that didn't really do anything. I also tried to disable access controll for xhost.

I normally start my container via docker-compose, but even when I just start it via the following command it gives me the same Error:

docker run -eDISPLAY=:0 -t -v /tmp/.X11-unix:/tmp/.X11-unix ubuntu:focal

I'm using Ubuntu 22.04 and all my packages are up to date.

Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy