Comment 3 for bug 889996

Revision history for this message
Tristan Schmelcher (tschmelcher) wrote : Re: Automatic unity 2D fallback does not work with XDMCP logins over VNC

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.