# Cannot display pyvista plot in docker container

**URL:** <https://fenicsproject.discourse.group/t/cannot-display-pyvista-plot-in-docker-container/8202>\
**Category:** Errors\
**Created:** [May 1, 2022, 7:48pm UTC](https://fenicsproject.discourse.group/t/cannot-display-pyvista-plot-in-docker-container/8202 "2022-05-01T19:48:15Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![bay\_swiss](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/bay_swiss/32/8778_2.png) [@bay\_swiss](https://fenicsproject.discourse.group/u/bay_swiss)\
**Post date:** [May 10, 2022, 4:30pm UTC](https://fenicsproject.discourse.group/t/cannot-display-pyvista-plot-in-docker-container/8202/9 "2022-05-10T16:30:41Z")

</div>

I found the solution. Basically, if you run docker in VS there is no connection between the container and host’s X-server.  
In the following link there are many ways to solve the issue:

[http://wiki.ros.org/docker/Tutorials/GUI](http://wiki.ros.org/docker/Tutorials/GUI)

I am following (for now) the 1st method that means to run:

```auto
xhost +local:root 

docker run -it \
     --net=host \
     --env="DISPLAY" \
     --env="QT_X11_NO_MITSHM=1" \
     --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
     --volume="$HOME/.Xauthority:/home/developer/.Xauthority:rw" \
     --volume="/media/Discone/Fenics/Docker:/media/Discone/Fenics/Docker" \
     --workdir="/media/Discone/Fenics/Docker"\
     dolfinx/dolfinx

```

of course the following are personal:  
–volume="/media/Discone/Fenics/Docker:/media/Discone/Fenics/Docker"   
–workdir="/media/Discone/Fenics/Docker"\

after working in docker container, run:

```auto
xhost -local:root

```

that returns access control to default.

---

_[View the full topic](https://fenicsproject.discourse.group/t/cannot-display-pyvista-plot-in-docker-container/8202)._
