I use the following setup to forward
X11 output from my local machine to the server. I will outline the setup:
X11server and the client are on the same local machine.
X11server runs on my local machine
- The client runs on my local machine as a docker container and is called
- I try to forward graphical output from a program (
R) on the client
Bto the server on host
Here is how the access works:
- My client
Bhas read access to
/tmp/.X11-unix. Hence, it has access to the unix domain socket
- I allow access to this socket to the client
xhost +si:localuser:$(USER)on the host
A. (Which is a server interpreted address which grants access to a single local user.)
All of this works as expected BUT whenever I try to access the socket the first try is not working and I get the error
X11 protocol error: BadAccess (attempt to access private resource denied). When I close the
X11 graphics device again and reopen it everything works. The problem persists even when I use a totally different setup that relies on
X11-forwarding. I could trace the problem back to the
cairo device if I use a
Xlib device access is successful at first try.
Does anyone have experience with programs that access the
X11 server's unix domain socket with a
cairo device or has any kind of idea why this is happening?