As I said. the issue arises as ssh uses unix sockets for remote connections: AFAIR, the XShm extensions detects a remote condition for TCP sockets, however, not for unix sockets. Therefore, it doesn't bail out early: the problem originates from ssh tunneling a remote connection using unix sockets. The issue could be fixed on the ssh side by disallowing Xshm, this would however require ssh to track the X traffic - and intercept it. I do know that the xcb backend is able to run without Xshm. So the best bet would be to do a test during init of the xcb plugin and back off - ie disable the use of the Xshm extension.