2

I used to run programs with commands like this:

docker run -ti \
  --name wireshark \
-e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v $HOME/.Xauthority:/root/.Xauthority \
--privileged \
  -d ubuntu:17.10 /bin/bash

then I could run wireshark using my Ubuntu's system's display. Like this page's example: Running GUI App with docker

Now it is not working. When I run wireshark I get this error:

root@5ad127a8333a:/# wireshark 
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
No protocol specified
QXcbConnection: Could not connect to display :0
Aborted (core dumped)
Paulo Henrique
  • 938
  • 1
  • 13
  • 19

1 Answers1

9

It is possible to solve this with

xhost +

but it would then be wise to do

xhost -

after you no longer use this container.

In fact the more restrictive

xhost +local:docker

is enough

user2915097
  • 30,758
  • 6
  • 57
  • 59