Skip to content

Set sticky bit on WSLg X11 runtime directory#5

Closed
Copilot wants to merge 12 commits intomainfrom
copilot/fix-issue-1122-resolution
Closed

Set sticky bit on WSLg X11 runtime directory#5
Copilot wants to merge 12 commits intomainfrom
copilot/fix-issue-1122-resolution

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 2, 2026

WSLg creates the X11 socket directory used by XWayland, but the directory lacks the sticky bit, causing XWayland to refuse to start in GNOME/KDE scenarios. The fix must avoid the prior approach that removed the runtime directory creation.

  • Behavioral fix
    • Keep creating /mnt/wslg/.X11-unix, but set its permissions to 01777 so the bind-mounted /tmp/.X11-unix satisfies XWayland’s sticky-bit requirement.

Example adjustment:

constexpr auto c_x11RuntimeDirMode = S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO;
THROW_LAST_ERROR_IF(chmod(c_x11RuntimeDir, c_x11RuntimeDirMode) < 0);
Original prompt

Please fix microsoft#1122 . Also, you cannot use the exact same operation as microsoft#1137 because it involves the restrictions of microsoft#1137 (comment) .


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 9 commits February 2, 2026 13:11
Co-authored-by: linghengqian <20187731+linghengqian@users.noreply.github.com>
Co-authored-by: linghengqian <20187731+linghengqian@users.noreply.github.com>
Co-authored-by: linghengqian <20187731+linghengqian@users.noreply.github.com>
Co-authored-by: linghengqian <20187731+linghengqian@users.noreply.github.com>
Co-authored-by: linghengqian <20187731+linghengqian@users.noreply.github.com>
Co-authored-by: linghengqian <20187731+linghengqian@users.noreply.github.com>
Co-authored-by: linghengqian <20187731+linghengqian@users.noreply.github.com>
Co-authored-by: linghengqian <20187731+linghengqian@users.noreply.github.com>
Co-authored-by: linghengqian <20187731+linghengqian@users.noreply.github.com>
Copilot AI and others added 2 commits February 2, 2026 13:49
Co-authored-by: linghengqian <20187731+linghengqian@users.noreply.github.com>
Co-authored-by: linghengqian <20187731+linghengqian@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix issue 1122 with different approach Set sticky bit on WSLg X11 runtime directory Feb 2, 2026
Copilot AI requested a review from linghengqian February 2, 2026 13:50
@linghengqian linghengqian deleted the copilot/fix-issue-1122-resolution branch February 14, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

/tmp/.X11-unix is missing the sticky bit

2 participants