PDA

View Full Version : Error: cannot open display



02-24-2004, 07:48 PM
After compiling an OpenGL program using gcc, I can't run it from the terminalby typing "./a.out"
If I do so, I get the following error:
GLUT: Fatal error in a.out: could not open display: ainband600:0.0

where ainband600 is my computer's hostname.

If I open GNOME and run a.out using the "Run" command then the program runs fine.

Can anyone help me out here?
Thanks in advance...

Deiussum
02-25-2004, 08:57 AM
When you say you try to run it from the terminal, do you mean you've logged into your X server and are running it in an xterm, or do you mean you have just logged into your box to a plain terminal login and haven't run startx yet?

You need to be running your app from an X session, so if the latter case, that would be your problem.

03-22-2004, 01:51 AM
Nope, the problem occurred even if I had an X session started.
Turned out it was a problem with GNOME, I had to remove .gconf and .gconfd and shutdown gconftool.
Things worked out fine after that.
Thanks for the response, though.