[comp.sources.wanted] Wanted: X display multiplexer

rgh@shell.com (Richard G. Hash) (05/08/91)

I'm looking for method to run an X client and output it to multiple
displays, with one master and zero or more slave displays. Server
mods/changes and/or hardware setups not desired.

Idea is to use it for training/demonstration purposes. I keep thinking
"surely someone else has already done this!!" (is there an "xmux"?).

I've browsed thru the sources for xscope (James Peterson), which is going
to take alot of hacking before I can make it do what I want. Xscope
sits between your client and the X server, and I've got the idea it
could be beat into handling multiple servers... This is as close as
I've found, but surely ... !

Any ideas or references very welcome,
Thanks,
-- 
Richard G. Hash    Shell Bellaire Research Center   (713) 245-7311
E-Mail: rgh@shell.com            or   rgh@shell.uucp
    or  rgh%shell.uucp@sun.com   or   rgh%shell.uucp@rice.edu
    or  ...!{sun,bcm,rice,psuvax1,decwrl,cs.utexas.edu}!shell!rgh

rcsmith@anagld.analytics.com (Ray Smith) (05/10/91)

rgh@shell.com (Richard G. Hash) writes:

>I'm looking for method to run an X client and output it to multiple
>displays, with one master and zero or more slave displays. Server
>mods/changes and/or hardware setups not desired.

>Idea is to use it for training/demonstration purposes. I keep thinking
>"surely someone else has already done this!!" (is there an "xmux"?).

>I've browsed thru the sources for xscope (James Peterson), which is going
>to take alot of hacking before I can make it do what I want. Xscope
>sits between your client and the X server, and I've got the idea it
>could be beat into handling multiple servers... This is as close as
>I've found, but surely ... !

>Any ideas or references very welcome,
>Thanks,
>-- 
>Richard G. Hash    Shell Bellaire Research Center   (713) 245-7311
>E-Mail: rgh@shell.com            or   rgh@shell.uucp
>    or  rgh%shell.uucp@sun.com   or   rgh%shell.uucp@rice.edu
>    or  ...!{sun,bcm,rice,psuvax1,decwrl,cs.utexas.edu}!shell!rgh

Richard,
	It sounds like you want something written at Brown University
called "xmx". Included below is the orignal announcement (with how to get it) 
and the README.

-Ray
============
ANNOUNCEMENT
============
From: jsb@cs.brown.edu (John Bazik)
Newsgroups: comp.archives
Subject: [xpert] Announcing XMX
Message-ID: <1990Dec7.180346.3470@ox.com>
Date: 7 Dec 90 18:03:46 GMT
Followup-To: comp.windows.x
Organization: Brown University Department of Computer Science
Lines: 44
X-Original-Newsgroups: comp.windows.x

Archive-name: x11/multi-window/xmx/1990-12-06
Archive: wilma.cs.brown.edu:/pub/xmx.tar.Z [128.148.31.66]
Original-posting-by: jsb@cs.brown.edu (John Bazik)
Original-subject: Announcing XMX
Reposted-by: emv@ox.com (Edward Vielmetti)


                                   X M X
                         An X Protocol Multiplexor

                                Version 1.0

XMX is an X protocol multiplexor.  It is a standalone utility for displaying
an X Windows session on multiple displays.  XMX takes advantage of the
networked nature of the X Window System by tapping the communication link
between an X client and an X server.  In this way, XMX works with any
X clients and any X servers, without the need to modify either.

XMX connects to N servers like an X client, then accepts connections from
M clients like an X server.  One of those servers is designated the "master"
from which input is directed to the clients.  The other servers are "slaves."
Slave servers receive only those protocol requests that are necessary for
them to maintain a visual look-alike of the master server's display.

This software was developed at Brown University for use in our electronic
classroom.  Some version of it has been in use here since 1988.

XMX runs on Sun3's and Sun4's, and has been tested on a DecStation 3100.

XMX is now available for anonymous ftp:

                host:   wilma.cs.brown.edu (128.148.31.66)
                file:   pub/xmx.tar.Z

XMX is currently undergoing further development.  Your comments and
suggestions are welcome.

By the way, I would have posted this to comp.windows.x.announce, but
it doesn't exist at our site.  Are we the only ones?

John Bazik
jsb@cs.brown.edu
uunet!brunix!jsb
jsb@browncs.bitnet

********************************************************************************

======
README
======

                                    X M X
                          An X Protocol Multiplexor

                                 Version 1.0
-------------------------------------------------------------------------
OVERVIEW

XMX is an X protocol multiplexor.  It is a standalone utility for displaying
an X Windows session on multiple displays.  XMX takes advantage of the
networked nature of the X Window System by tapping the communication link
between an X client and an X server.  In this way, XMX works with any
X clients and any X servers, without the need to modify either.

It's tempting to call this "broadcast software," and that is certainly the
effect.  In reality, though, XMX is "multicast" software.  It must know
all the slave machines ahead of time and it connects to each one directly.
XMX is more like mail than news.

XMX connects to N servers like an X client, then accepts connections from
M clients like an X server.  One of those servers is designated the "master"
from which input is directed to the clients.  The other servers are "slaves."
Slave servers receive only those protocol requests that are necessary for
them to maintain a visual look-alike of the master server's display.

This software was developed at Brown University for use in our electronic
classroom.  Some version of it has been in use here since 1988.
-------------------------------------------------------------------------
COPYING IT

The Computer Science Department at Brown University distributes XMX
under the following Copyright:

	Copyright 1988, 1989, 1990, Brown University, Providence, RI.
	Permission to use, copy, modify and distribute this software and
	its documentation for any purpose other than its incorporation into
	a commercial product, is hereby granted, provided that this
	copyright notice appears on all copies and the distribution is only
	within the organization represented by the person receiving the
	software from Brown.  Brown requests notification of any
	important modifications to this software or its documentation.

Please note that we explicity prohibit you from distributing this
outside of your organization.  Tell them to get it from us.
-------------------------------------------------------------------------
CAVEAT

This is a preliminary distribution.  XMX has many known limitations and
a few bugs.  It is being actively developed and your input is solicited.
So, too, is your patience.
-------------------------------------------------------------------------
BUILDING IT

XMX does not rely on Xlib or any other lib for that matter.  It does
require certain X11 include files (X.h, Xproto.h, Xlib.h, Xatom.h, Xutil.h).
If you have these files installed in /usr/include/X11, then all you
need to do is run "make".

If you keep these include files somewhere else, you'll need to add a -I
switch to CFLAGS in the Makefile.

XMX has been compiled and tested on various sun4's and on a dec 3100.
-------------------------------------------------------------------------
USING IT

Since XMX is not itself an X server, it expects to connect to X servers
that are already running.  These servers must be willing to accept
client connections from whatever machine XMX is running on (see xhost(1)).
See the rx(1) utility, included with this distribution.

Since examples are easier to understand than lengthy explanations, here's
an example.  Assume X servers are running on machines named larry, moe and
curly:

	abbott% xmx :1 -p -display moe larry curly
	XMX Version 1.0, ready.

Now XMX is running on abbott, accepting connections via display abbott:1,
(socket 6001), displaying on moe, larry and curly, but only taking input
from moe.  Moe is the master server.  We could have said moe:0, but XMX
relaxes this convention and assumes you mean display zero if you don't
specify.  The -p option tells XMX to echo pointer movements to the slaves.

	costello% setenv DISPLAY abbott:1
	costello% xterm&

Setting the DISPLAY environment variable causes any X clients run in
this shell to connect to XMX.  The xterm we ran here appears on larry,
curly and moe via XMX.  What's more, since xterm inherited the environment
variable from the shell, anything typed at it will also be multicast.

Included with this distribution is the document "Running an XMX
Broadcast Session in the Sun Lab" (./lab.me).  This is the guide that
we distribute to TA's at Brown who are responsible for running their
class' demos.  It is very site-specific, but contains some helpful
information.
-------------------------------------------------------------------------
BUGS AND LIMITATIONS

Protocol extensions not supported yet.

XMX will list extensions it does not support in reply to XListExtensions
request.

Doesn't do decnet.

Servers must be "clean" at xmx startup:
	Must have identical sets of allocated Atoms.
	Must have empty default root colormaps.
	Window managers may break if master has preexisting resources
		not present on slaves.

Doesn't accept the null string for a hostname.  Use "unix" instead.
-------------------------------------------------------------------------
COMING SOON

Cleaner code!

Bugs fixed!

All standard MIT protocol extensions supported.

Better colormap handling.

Real Atom mapping.

Better tolerance of preexisting resources, esp on slaves.

Better (configurable?) pointer motion.

A facility for recording and playing back the slave (no input) protocol
stream.

Support for "late-joiners."

A nifty X interface to rx and xmx!

A tech report.
-------------------------------------------------------------------------
XMX was written by

John Bazik
Dept. of Computer Science, Box 1910
Brown University
Providence, RI  02912

(401) 863-7600
jsb@cs.brown.edu
uunet!brunix!jsb
jsb@browncs.bitnet
-- 
Ray Smith          Computer Sciences Corporation - Systems Engineering Division
                   Formerly Analytics, Inc.  
rcsmith@analytics.com -or- {uunet,aplcen,wb3ffv,sundc}!anagld!rcsmith -or- 
RCSmith@DOCKMASTER.NCSC.MIL