
For Xwayland, mutter creates the sockets in the standard /tmp/.X11-unix directory. Yet, if that directory already exists, it may have been created by another user with full control over the created socket. To avoid that issue, if the directory /tmp/.X11-unix already exists, check that the permissions are as we expect, i.e. the directory belongs to either root or the user herself, is writable and has the sticky bit. Thanks to fabian@ritter-vogt.de for reporting that issue. https://gitlab.gnome.org/GNOME/mutter/-/issues/1708 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1787>