Re: Connecting to two displays ?



On Tue, 23 May 2000 06:15:37 -0000, Noel Burton-Krahn said:
> Interesting idea.  Gtk talks to an X server over a socket.  The X
> server talks back, so connecting to two servers doesn't make much
> sense.  However, you could write a simple redirecting X server which
> forwards traffic between an X app and your primary display and copies
> traffic to a secondary display.  Ssh does X forwarding.
> 
> 
> X App ---------> Forking X server --------> primary display
>       <---------            |      <------ 
>                             |
>                             +-------------> secondary display

Well, there's things that it *DOES* make sense to allow connections to
multiple X servers.  For instance, XEmacs allows opening windows on
more than one X server.  This is very handy when I leave XEmacs open, with
windows on the display in my office - then I can also ssh in from home and
get it to display a window on my HOME machine as well.

The idea of a 'forking X server' is interesting, but fraught with danger.
For instance, what should it do if the X app hands it a call to XAllocColor(),
and there's room in the colormap on one display, but the other one is
full?  Or an X font available on one display but not the other? etc etc

If all the original poster was trying to do was get a snapshot of a window
and display it elsewhere, I'd definitely suggest using brute force and
at least looking into using 'xv' or other tool that supports grabbing
the contents of a window.  I think you can get xwd/xwud to do it as well,
although they struck me as klunky the last time I looked at them (which
was before xv came out).  Read the xv 3.10 license carefully though,
it may not be usable in your environment, but 2.21 should be OK....


-- 
				Valdis Kletnieks
				Operating Systems Analyst
				Virginia Tech





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]