PDA

View Full Version : Linux/Windows



nt2010
04-05-2010, 03:41 PM
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

Dark Photon
04-05-2010, 05:44 PM
how can I do this? I... 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.

nt2010
04-06-2010, 05:28 AM
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.

NT

MaxH
04-06-2010, 10:18 AM
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 ...
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.

ZbuffeR
04-06-2010, 12:42 PM
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 :
http://sourceforge.net/projects/xming/
http://sourceforge.net/projects/xwinlogon/
http://x.cygwin.com/

Dark Photon
04-06-2010, 06:52 PM
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.
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:

* Remote X Apps HOWTO (pg 6) (http://tldp.org/HOWTO/Remote-X-Apps-6.html)
* Remote X Display using VBO and GLSL? (http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=249826#Post2498 26)
* Remote execution of GLSL-Programs under Linux? (http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=255494&Searchpa ge=1&Main=49616&Words=%2Bdisplay+%2Bssh&Search=tru e#Post255494)

The lingo to google for is "remote x display" (http://lmgtfy.com/?q=remote+x+display).