and I’ve tried running “xhost +” before attaching to the container, to no avail.
If I run “ls” from within the container I do not see X0, so I am thinking /tmp/.X11-unix is not really bound. I don’t know where there might be some logs? I saw nothing in the journal, also nothing in /var/log/Xorg.0.log on host.
I’d make sure that your host is actually listening on a real unix socket, these days most X11 servers use abstract unix sockets which aren’t really file based and can’t be bind-mounted.
You may also need to export DISPLAY to a value matching the host.
Hi, well I think host is using the socket, since I was able to run xeyes from a bind mounted docker container. Also of course, the /tmp/.X11-unix/X0 does exists on host so it is creating it. As I mentioned, the LXC doesn’t actually see the “X0” leading me to believe it is not mounted…
Yes! that is correct. I was able to mount it into /root/.X11-unix in the container, and the X socket is visible there.
I looked deeper and realized that I had edited that line: “lxc.mount.entry = tmpfs tmp tmpfs defaults” into the config without stopping the LXC container first. So it was initially not working because that line was missing. So after properly stopping LXC then restart and reattach, I now do have the mount properly there, and was able to run “glxgears” so Yay!. Running "xeyes’ though, logged me out of my session! Not sure what that is.
oh and: I had to run xhost + in the host container because glxgears was not authorized. But hey, its working. Now I can proceed with my project.
Thanks for your help!