Looking in the unity_support_test source code, I can see the problem. unity_support_test caches the result of the test by creating an empty file at /tmp/unity_support_test.<exit code>. When run with no arguments, if /tmp/unity_support_test.0 exists, it immediately exits with success without checking for support. This scheme is fundamentally incompatible with running multiple X11 servers. In my case, the system has both a physical X11 display with COMPOSITE and GLX run by xserver-xorg and also virtual X11 displays for remote logins run by vnc4server. Once anyone logs in on the physical server and unity_support_test creates the /tmp/unity_support_test.0 file, all following remote logins are guaranteed to incorrectly pass the test.
To fix the bug, unity_support_test either should not cache the results of the test or should cache the results separately for each X11 server. For example, the value of the DISPLAY environment variable could be embedded into the filename. Though there is no guarantee that the configuration of a given X11 server remains constant over time, so it would be more robust to simply not cache at all.
Looking in the unity_support_test source code, I can see the problem. unity_support_test caches the result of the test by creating an empty file at /tmp/unity_ support_ test.<exit code>. When run with no arguments, if /tmp/unity_ support_ test.0 exists, it immediately exits with success without checking for support. This scheme is fundamentally incompatible with running multiple X11 servers. In my case, the system has both a physical X11 display with COMPOSITE and GLX run by xserver-xorg and also virtual X11 displays for remote logins run by vnc4server. Once anyone logs in on the physical server and unity_support_test creates the /tmp/unity_ support_ test.0 file, all following remote logins are guaranteed to incorrectly pass the test.
To fix the bug, unity_support_test either should not cache the results of the test or should cache the results separately for each X11 server. For example, the value of the DISPLAY environment variable could be embedded into the filename. Though there is no guarantee that the configuration of a given X11 server remains constant over time, so it would be more robust to simply not cache at all.