Memo-migrated‎ > ‎

OpenGL with X11 servers on Windows

posted May 11, 2019, 6:47 AM by Teng-Yok Lee   [ updated Jan 2, 2021, 8:35 PM ]

I typically use Windows with ssh -X to access Linux machines so I can avoid dual boot. If I need to run remote applications with X windows, I run VcXsrv (REF) on windows as the X11 server. This typically works except programs that needs OpenGL. If software-based rendering is affordable, my workaround is as follows:

  • On the local windows: Run VcXsrc without native OpenGL supports.
  • ssh to the the remote Linux:
    • Make sure that libgl1-mesa-dev is installed.
      • NOTE: If the nvidia driver is install via .run, it might override libgl1-mesa-dev.
        • To verify, run the following to see whether it is using libGL under mesa or not:
          $ ldd $(which glxinfo) | grep libGL
        • If not, the symlink of /usr/lib/x86_64-linux-gnu/mesa might be broken. In such a case, re-installation of libgl1-mesa-devis needed.
    • Setup env. var. to use mesa's
      $ export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/mesa:$LD_LIBRARY_PATH
    • To confirm, run glxinfo again to see whether direct rendering is Yes:
      $ glxinfo | grep -i direct