X Windows desktop

If I have a multi-card X windows installation is there a way to set which display my OpenGL program renders on? I think the X devices are named somthing like 0:0, how do I pass that to OpenGL?

tbc++

you can do this by setting your “DISPLAY” environment variable. If you have two X servers on localhost, and want to display your GL app on the first then do this:

export DISPLAY=localhost:0;
./glapp;

on the second,

export DISPLAY=localhost:1;
./glapp;

“export” is the command you use in the bash shell.

If I wanted to display it on both, could I create a batch script and run the program twice, once for each display.

tbc++

I think XOpenDisplay allows to specify which display to connect on. man could help you more.

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