X11 Authorization Fails in Containers? Fix It with a One-Line sed
Sharing an X11 Server Across Hosts with FamilyWild
When running X11 apps in containers, chroots, or over SSH with a bind-mounted .Xauthority, you may hit 'Authorization required, but no authorization protocol specified'. The cause: the cookie's hostname doesn't match the client's. The fix: rewrite the cookie's family to FamilyWild (0xffff) using xauth nlist and sed. This makes the cookie match any hostname. Unlike xhost +, which disables access control entirely, FamilyWild keeps the secret required, so it's safer. Just keep the cookie file at 0600 and share it only with trusted environments.
The cookie is present and valid, but its hostname doesn't match, so the client never offers it and X falls back to "no authorization protocol."