Sharing an X11 Server Across Hosts with FamilyWild
3 hours ago
- X11 connections fail when running apps in containers or over SSH because .Xauthority cookies are tied to a specific hostname.
- The cookie's hostname must match the client's hostname; otherwise the client cannot offer the cookie.
- Fix: rewrite the cookie's family to FamilyWild (0xffff) using xauth nlist and sed, making it match any hostname.
- Unlike xhost+ which disables all access control, FamilyWild keeps the cookie secret while removing only the hostname constraint.
- FamilyWild cookies are less specific; share only with needed environments and set permissions to 0600.