Running X11 app but getting blank window panes

I’ve set up an lxc profile by binding the X11 unix domain socket to the container. Xeyes works fine. The container is a 18.04 ubuntu while the host is a 20.04. The program i’m trying to run is qucs-s using qt4. When it starts running, i get

Warning: X Error: BadAccess (attempt to access private resource denied) 10
Extension: 130 (MIT-SHM)
Minor opcode: 1 (X_ShmAttach)
Resource id: 0x15d

A window frame appears, but the buttons and other resources are missing. The hotspot areas still register the mouse clicks, so unseen buttons are still clickable. Ok so why is this happening? If xeyes, xcalc work, doesn’t it mean everything else should work?

For Qt applications, you need QT_X11_NO_MITSHM set to 1 in your environment.

Is this because lxc drops some kind of capability or is this a general thing with QT and X11? Because shouldn’t being able to access the exposed x11 listening unix domain socket mean the application should be able to use all applicable x11 apis?

MIT SHM relies on having a shared memory space, most likely creating temporary files in /dev/shm (or /run/shm these days), as that’s not shared with the container, things don’t work. The containers also sit in different IPC namespaces which could similarly prevent access to shared memory.