title: linux: detecting if you're running in a vnc session
body: <p>I have an OpenGL program that will not run correctly inside a VNC session.  In order to start it remotely in a VNC session, I need to run it via <em>vglrun</em>.</p>
  
  <p>I already have a wrapper script that launches the binary, but I need a reliable way to detect if I should run it via <em>vglrun</em> or to run the app as is.</p>
  
  <p>I'm currently using thinlinc, which appears to modify LD_LIBRARY_PATH, PATH, and several other environment variables. So worst case I could check to see if thinlinc is present there, but I was hoping there might be a more generic way to detect if you're running inside of a VNC session.</p>