[comp.windows.x] XWatchWin -- a program to watch a window on remote X servers...

drapeau@jessica.stanford.edu (George D. Drapeau) (03/23/89)

We're teaching a hands-on class for people who want to learn X on our
public workstations.  The class is arranged so that everybody has
his/her own workstation, including the instructor.  At some point in
the class, the instructor is typing commands, so we thought that
instead of having to write the commands on a whiteboard, it would be
nice if the students could watch a copy of the window the instructor
was typing in.  Each student would have a copy of the instructor's window on
his/her own workstation, and could just look at what the instructor
typed then type it in a local XTerm window.  More than that, the
students could watch any window on the instructor's server, for
example if the instructor was demostrating a paint program, the users
could watch what the instructor was drawing.

So I wrote 'xwatchwin' which is a quick hack, but it works for our
simple needs.  You can get it via anonymous ftp to expo.lcs.mit.edu.
The manual page should make things clear, but here's a brief
explanation:

Xwatchwin is a program that allows you to peek at a window on another
X server.  You type, for example, "xwatchwin expo xload" and the
program will attempt to connect with the server expo:0.0 and will try
to find a window on that server named "xload".  If it's successful,
you will see a window on your local server that shows you a copy of
the xload on expo.  The program continually updates your copy of the
remote window, and you can specify how often you'd like to get a new
copy.

Besides using it for the class, I've used it to consult people using
X.  For example, one person was trying some shell commands in an XTerm
window, but he couldn't get things right.  So I told him to 'xhost' my
workstation (giving me access to his server), then I ran an xwatchwin
on his XTerm window.  I told him to type again what he had typed
before, and I could see the characters.  I immediately saw his
mistake, and was able to answer him over the phone.  You could use
xwatchwin to help people debug programs or whatever.

I hope you can find some good uses for it.  I had fun hacking it up.
Questions or comments?  Send me mail.


______________________________________________________________________________
George D. Drapeau			Internet: drapeau@jessica.stanford.edu
Workstation Environments Specialist
Academic Information Resources / Systems Development