narayan@cs.iastate.edu (Pankaj Narayan) (01/12/90)
I'm a novice at X, and have a few elementary questions: 1. I'm running a program that draws a curve for the Normal Distribution split in three windows, so that each of the windows contains 1/3rd of the curve. Well, now I want to have each of these windows to appear on a different machine's console....I can get all 3 together to go someplace by simply setting up the DISPLAY var to be that remote machine name; but here I want to put EACH window on a different display----choose 3 servers within one program, as it were. Question is: can I do this, and if so, how ? 2. I want to have a program running that will distribute the workload to three separate machines, where each machine computes that part of the curve that is meant to be drawn to ONE (of the 3, as above) of the windows. I realize I can run 3 different programs at the 3 machines, connecting to the same server to get 3 windows on one display, but I'd like to have one program that actually distributes the work; are there X window primitives that support this, or does anyone know of any method to do this in UNIX (on Sun's across an Ethernet) ?? Please e-mail or post whichever is more convenient. thanks pankaj narayan iowa state univ.
rws@EXPO.LCS.MIT.EDU (Bob Scheifler) (01/14/90)
but here I want to put EACH window on a different display----choose 3 servers within one program, as it were. You haven't stated whether you are using Xlib or some toolkit. At the Xlib level, you can simply call XOpenDisplay more than once, using a different display string each time, to connect to more than one display. You'll have to invent some mechanism, like special command line options, to allow the user to specify which displays to use. If you are using an Xt-based toolkit, then you should be able to do the same sort of thing, call XtToolkitInitialize, then XtCreateApplicationContext, and then call XtOpenDisplay multiple times. For non-Xt based toolkits, you'll have to consult their documentation to see if this is possible. I'd like to have one program that actually distributes the work; are there X window primitives that support this, or does anyone know of any method to do this in UNIX (on Sun's across an Ethernet) ?? There are no X primitives for getting the processes set up and communicating. On Suns, you should try using the Sun RPC and remote execution facilities to accomplish this.