Outfile not working

Greetings. I am fairly new to the linux OS. I’ve gotten things to compile and run normally in the console mode. However, I am trying to compile the NeHe tutorials, but the outfile doesnt do anything. Run it in console, it says “Fatal Error, cant open display”. In GNOME, it does nothing. No window opens, or anything.

I think I am doing something stupid, but I dont know what. Any input would be appreciated.

Can’t open display is usually caused by a wrong setting of the DISPLAY environment variable, which defines where the window should be opened. As X can open Windows on other machines, too, it needs to know where it should open the window.

To solve it you have to set the DISPLAY environment variable. The details depend on which shell you’re using. For bash/sh/ksh etc use “export DISPLAY=:0”, for csh/tcsh use “setenv DISPLAY :0”. If you want to display on another machine use “<hostname>:0” instead of “:0”.

The other, less common, reason is that you logged in as a different user than the one who runs the program. To protect itself from snoops, X per default does not allow anybody but the original user to open windows. To turn that off you have to call “xhost +” as the original user with a valid DISPLAY setting.

Hope it helps

A more common reason for “can’t open display” is that you’re not running X(as Cyrgon says).How exactly are you running it from GNOME?Try opening a terminal (like xterm) and running it from the command line.It should at least print an error message if nothing else happens.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.