Trying to run something under Xwayland, properly, as a different user is beyond a headache in Plasma Wayland. It just works(tm) under GNOME, see https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/735
This used to work with kwin-5.21.5 but now it fails after kwin-5.22.5 update. $ xhost +SI:localuser:steam localuser:steam being added to access control list $ sudo -u steam glxinfo Password: Error: unable to open display :0 glxinfo is just an example - all xwayland programs fail with a similar message.
I think it doesn't work because the X11 socket (in /tmp/.X11-unix/) is not writable by other users.
(In reply to Vlad Zahorodnii from comment #2) > I think it doesn't work because the X11 socket (in /tmp/.X11-unix/) is not > writable by other users. Excellent, thank you! Now I can start programs like this. xhost +SI:localuser:steam chgrp -R users /tmp/.X11-unix/* chmod -R g=u /tmp/.X11-unix/* sudo -u steam glxinfo But still it would be great if this use case could work without such scripting.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/1646
Git commit 83a036e9d40475d5c07177bf2e8bba9bc0fd4aa5 by Vlad Zahorodnii, on behalf of Weng Xuetian. Committed on 12/11/2021 at 09:02. Pushed by vladz into branch 'master'. Fix XWayland abstract socket address. NUL-termination byte is not needed for abstract socket. This leads to XWayland listening to a wrong address. Confirmed with lsof. M +4 -5 src/xwl/lib/xwaylandsocket.cpp https://invent.kde.org/plasma/kwin/commit/83a036e9d40475d5c07177bf2e8bba9bc0fd4aa5
Git commit 5a9a3e96898bd29ccbf31d9ff92dfb80274ce265 by Vlad Zahorodnii, on behalf of Weng Xuetian. Committed on 12/11/2021 at 09:03. Pushed by vladz into branch 'Plasma/5.23'. Fix XWayland abstract socket address. NUL-termination byte is not needed for abstract socket. This leads to XWayland listening to a wrong address. Confirmed with lsof. (cherry picked from commit 83a036e9d40475d5c07177bf2e8bba9bc0fd4aa5) M +4 -5 src/xwl/lib/xwaylandsocket.cpp https://invent.kde.org/plasma/kwin/commit/5a9a3e96898bd29ccbf31d9ff92dfb80274ce265