How do I make an application think it is running from desktop server (e.g gdm3)?

I have an application binary that works fine if I run it from a terminal in an windows environment (say gdm).

If I run it from raw console (Ctrl+Alt+F3), it emits errors.

But I do need to run this from console.

Is there any way I can run it from console, but make it ‘think’ it is running from a terminal in a windows environment?

What I tried –

  • I already tried “export DISPLAY=:0”, which didn’t do the trick.
  • I suspect it depends on a graphics library, may be opengl for some computations, which is not properly initialized if I run from console.