I am new user to OpenGL,

I have a question, I have to write a program on a Linux machine to open a display, but the display should be on a windows machine, how can I do this? If possible at all. Running it on linux but displaying on windows. Thanks for any help

Yes, this is possible, in several ways. One is to run an X server on the Windows box, and point the Linux box at the X server on the Windows box for display.

Another is VirtualGL.

VNC may also be an option.

Thank you Dark Photon,

I am not familiar with this concept, I tried to google it and didn’t get any decent information. So what you are saying is to install X server on the windows machine and tell the Linux machine to use that x server for display. Would you be able to provide more information or any links. I read about VirtualGL from the project site. The machines are connected using ethernet. once again thank you for the help.


I’ve done something similar, except that I started with a fairly large OpenGL program that was already running on Windows. A customer wanted to be able to ‘control’ the graphics from his Linux machines. UDP (google it) communications were set up to do this. UDP sends ASCII strings between computers over a network. A listening routine was added to the OpenGL sim to decode the character strings coming in and take appropriate action (i.e. rotate the scene, switch views, split screen, toggle things off and on, etc.). This works over the Internet. Graphics running on a Windows computer in Maryland can be controlled from Linux computers in Los Angeles.

Yuck, UDP fails a lot, face dropped and reordered packets, routing congestion problems. TCP seem heavier at first look but is way more robust and scalable.

Anyway a good start like said Dark Photon is running an X server on the Windows machine.
If you also want hardware acceleration, something like VirtualGL will be mandatory too.

A few X servers for Windows :

Sure. On your Linux box to display a clock on your Linux box, you can do this:

xclock -display :0

or alternatively:

env DISPLAY=:0 xclock

If you wanted to instead run xclock and direct it to display on a remote machine, you’d do one of the following:

xclock -display remotehostname:0
env DISPLAY=remotehostname:0 xclock

You can do the same thing with GL apps, assuming that all of the GL commands you’re using have GLX “wire protocol” forms AND you have permission to connect to the remote display. For instance:

glxgears -display remotehostname:0
env DISPLAY=remotehostname:0 glxgears

There are several ways to set up permission to access to the remote display, including just using ssh and letting it “tunnel” X/GLX protocol through the SSH connection.

A few random links:

The lingo to google for is “remote x display”.