Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(mmserver): try to avoid binding the system x11 abstract socket #43

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

colinmarc
Copy link
Owner

@colinmarc colinmarc commented Feb 7, 2025

A real xserver sometimes creates "abstract" sockets, which transcend the filesystem and can leak into our container (because we don't use a network namespace). That means when running on a system with the system xserver at :1, we would potentially end up colliding with it, and the app would connect to the system xserver instead of xwayland.

Note that we can't just use DISPLAY=/path/to/internal/socket, because that's not supported on even some recent libxcb versions.

However, we can avoid this specific situation by just checking whether an abstract socket exists for a given display number, and choosing a higher number if so.

A real xserver sometimes creates "abstract sockets", which transcend the
filesystem and can leak into our container (because we don't use a
network namespace). That means when running on a system with the system
xserver at :1, we would potentially end up colliding with it, and the app
would connect to the system xserver instead of xwayland.

Note that we can't just use DISPLAY=/path/to/internal/socket, because
that's not supported on even some recent libxcb versions.

However, we can avoid this specific situation by just checking whether
an abstract socket exists for a given display number, and choosing a
higher number if so.
@colinmarc colinmarc force-pushed the xwayland-socket-search branch from 01e62f1 to 5c554cc Compare February 7, 2025 17:24
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.

1 participant