ar2015
ar2015

Reputation: 6150

freeglut (something): failed to open display ''

I compiled a C++ code under Linux (Ubuntu) and everything is fine as far as I connect a monitor to my PC.

My code shows some graphics and then it saves their screenshots. The runtime graphic is not important to me but the screenshots.

But if I run the code remotely, I face with the following runtime error:

freeglut (something): failed to open display ''

If I forward x (ssh -v -X) everything would be find. But what if I don't do that?!

How to get around it? I don't care if anything is displayed or not. Is it possible to define a temporary virtual screen on the remote computer or get around this problem in any other way? I just need the screenshot files.

Upvotes: 11

Views: 5299

Answers (1)

rostamn739
rostamn739

Reputation: 421

I suggest you try XVFD as your X server on the remote machine

Quote form this answer: Does using Xvfb to run OpenGL effects version?

Xvfb is an X server which whole purpose is to provide X11 services without having dedicated graphics hardware

This allows you to have both a GL context and a window without using a GPU

Upvotes: 0

Related Questions