# Running GUI in DOCKER?

**URL:** <https://forums.docker.com/t/running-gui-in-docker/609>\
**Category:** General\
**Created:** [January 9, 2015, 4:56am UTC](https://forums.docker.com/t/running-gui-in-docker/609 "2015-01-09T04:56:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ankitabarbi](https://avatars.discourse-cdn.com/v4/letter/a/85f322/32.png) [@ankitabarbi](https://forums.docker.com/u/ankitabarbi)\
**Post date:** [January 9, 2015, 4:56am UTC](https://forums.docker.com/t/running-gui-in-docker/609/1 "2015-01-09T04:56:30Z")

</div>

I have created a java gui application and containerized it . to run the container I am giving the command docker run -ti --rm \ -e DISPLAY=$DISPLAY \ -v /tmp/.X11-unix:/tmp/.X11-unix \ ankitabarbi/filetraversal .It is working fine on linux but when I was trying to run the same image on boot2docker it is throwing the error saying can’t connect to X11 window server using ‘:0’ as the value of the DISPLAY variable . Plese suggest how to proceed

---

<div class="post-metadata">

**Author:** ![jvodan](https://avatars.discourse-cdn.com/v4/letter/j/b5a626/32.png) [@jvodan](https://forums.docker.com/u/jvodan)\
**Post date:** [June 28, 2015, 3:37am UTC](https://forums.docker.com/t/running-gui-in-docker/609/2 "2015-06-28T03:37:33Z")

</div>

DISPLAY format is [host]:0.0 (host is dropped on local machine)  
try setting it explicitly as in -e DISPLAY=x.x.x.x:0.0  
where x.x.x.x is the IP address the X server is running (ie the display)

---

<div class="post-metadata">

**Author:** ![ankitabarbi](https://avatars.discourse-cdn.com/v4/letter/a/85f322/32.png) [@ankitabarbi](https://forums.docker.com/u/ankitabarbi)\
**Post date:** [June 29, 2015, 3:45am UTC](https://forums.docker.com/t/running-gui-in-docker/609/3 "2015-06-29T03:45:05Z")

</div>

Thankyou for the reply.but was solved long back.thank you 🙂
