On Thu, Jul 20, 2023 at 08:32:30PM +0200, Rafael Sadowski wrote: > On Thu Jul 20, 2023 at 04:31:55PM +0100, Stuart Henderson wrote: > > On 2023/07/20 17:27, Rafael Sadowski wrote: > > > Let's start with a quote from an old try: > > > > > > "Our Xorg server doesn't run under the same uid as the client, the client > > > needs to create the shared memory area with mode 0666. > > > > > > We are doing the same in misc/screen-shm. Of course, the consequence > > > here would be to do it for all Qt applications." > > > > > > -- https://marc.info/?l=openbsd-ports&m=167110468109188&w=2 > > > > > > There was a veto from sthen@, which was perfectly okay and right. For > > > error analysis and to exclude that this function is not used, I need the > > > shm mode from time to time. I would like to solve it with an environment > > > variable (QT_OPENBSD_SHM_MODE). > > > > From that mail, > > > > "What are the consequences of leaving this as-is? (i.e. what's broken > > now that changing this would fix?)" > > > > Nothing is broken and nothing is would fix for now. It just helps me to > debug Qt application or large ecosystem like KDE plasma. When I increase > the debug level I see that shm could not be init and therefore I can not > exclude that exactly this is a problem. > > Long story short: It helps me not to always have to build Qt myself. >
Are there still places in the Qt library that don't use xcb_shm_attach_fd() to attach shared memory segments to the X server ? This was introduced more than 10 years ago, so that if the X server is not running as root it can still access shared memory segments created by the clients, possibly running as a different uid as the server, and preserving the privacy of the shm contents. In that case 600 is perfectly fine and applications don't need to fallback on non-shm based transports. If Qt is using xcb_shm_attach() or XShmAttach() is that only on OpenBSD because it thinks OpenBSD doesn't have xcb_shm_attach_fd(),i ot is it the same on Linux ? (since Linux is not running X as root anymore either whith systemd, they would face the same issues as you). PS: I remember we once noticed that mesa was also not using xcb_shm_attach_fd() on OpenBSD. I should have a look to confirm this, but I'm not available for the next 2 weeks to do that, sorry. -- Matthieu Herrb