QXcbConnection: Could not connect to display unix:0 on Fedora 24 despite xhost local:root
Hello! This looks cool. Managed to get it running on an Ubuntu 16.04 by using "xhost local:root" from https://github.com/jfrazelle/dockerfiles/issues/6, but I'm struggling on a Fedora 24 .. where it still fails with "QXcbConnection: Could not connect to display unix:0", despite xhost local:root (which resolved the same error message on Ubuntu).
I'm assuming that on Fedora security locked down more tight, but don't know where/how.. any clue?
This is NOT through Wayland on Fedora 24, that would be fun too, but later.. ;-) Normal X11 GNOME session.
You could try using
xhost +
You could try using
xhost +
doesn't help, still the same message
Would you mind posting the exact command you use to run the container?
as on https://blog.jessfraz.com/post/docker-containers-on-the-desktop/, so e.g.
docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=unix$DISPLAY --name cathode jess/1995
BUT I just figured it out! Fedora 24 comes with SELinux ON by default. That didn't help.. ;-)
setenforce 0 (AND xhost +) makes it work! Now when I have a minute I'll just have to learn more SELinux to figure out how to permit just this, whatever exactly it is that would need to be permitted for this.
Closing this. (Not sure if you guys maintain docs that should be updated about this?)
I don't think there are any docs right now. But some kind of FAQ .md might be nice to have