3

I am trying to run a OpenGL program which does not need a window, this program creates a file. This is done on a debian xfce, so far so good.

Then i try to run the program from another computer using ssh, if the xfce is on with a monitor, I can compile and run the program with DISPLAY=:0 (so glut is opened for like a millisecond and closed).

The problem is when i reboot and I disconnect the monitor, xfce won't launch the GUI, and glut will not launch.

VirtualGL is not what i want, hidden window is not what I want, I want to run the OpenGL program from terminal without the X GUI. Or to be able to force xfce to boot GUI and make it login in the GUI so i can launch glut.

A small example would be nice.

1 Answer 1

1

With the current driver models, what you want to do it impossible in a way that works reliably. All the OpenGL implementations that so far exist for Linux absolutely require some kind to window (and be it an invisible, hidden 1×1 pixels small one) to create an OpenGL context.

Note that in the near future with the introduction of Wayland and a larger EGL based, OpenGL infrastructure is about to change. But we are not there yet.

Also if you can live with a slow, software implementation, Mesa has a sidekick library called "OSMesa" that gives you a OpenGL context that renders to a memory region provided by your program. But OSMesa won't use any kind of GPU acceleration.

Sign up to request clarification or add additional context in comments.

2 Comments

So is there a way to launch the window without a monitor?? If i login to the linux, then remove the monitor display cable and run glut, it runs well, but if i reboot it will not, I need a way to force linux to run in x without a monitor connected then a way to make it login so I can run freeglut from ssh.. Thanks for your reply.
@user3797639: You should always be able to start an X server even if there's no display connected. If the X server refuses to start, you can forcibly add a display configuration in xorg.conf. Or you can trick the graphics card into thinking that a display is connected, by pulling the green analogue output pin to signal ground using a 150 ohms resistor.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.