Is it possible to "spy" on a terminal, displaying the output

Is it possible to "spy" on a terminal, displaying the output


There are a few different ways you can do this, although none
of them is perfect:

* kibitz allows two (or more) people to interact with a shell
(or any arbitary program). Uses include:

- watching or aiding another person's terminal session;
- recording a conversation while retaining the ability to
scroll backwards, save the conversation, or even edit it
while in progress;
- teaming up on games, document editing, or other cooperative
tasks where each person has strengths and weakness that
complement one another.

kibitz comes as part of the expect distribution. See question 3.9.

kibitz requires permission from the person to be spyed upon. To
spy without permission requires less pleasant approaches:

* You can write a program that rummages through Kernel structures
and watches the output buffer for the terminal in question,
displaying characters as they are output. This, obviously, is
not something that should be attempted by anyone who does not
have experience working with the Unix kernel. Furthermore,
whatever method you come up with will probably be quite
non-portable.

* If you want to do this to a particular hard-wired terminal all
the time (e.g. if you want operators to be able to check the
console terminal of a machine from other machines), you can
actually splice a monitor into the cable for the terminal. For
example, plug the monitor output into another machine's serial
port, and run a program on that port that stores its input
somewhere and then transmits it out *another* port, this one
really going to the physical terminal. If you do this, you have
to make sure that any output from the terminal is transmitted
back over the wire, although if you splice only into the
computer->terminal wires, this isn't much of a problem. This is
not something that should be attempted by anyone who is not very
familiar with terminal wiring and such.

* The latest version of screen includes a multi-user mode.
Some details about screen can be found in question 4.10.

* If the system being used has streams (SunOS, SVR4), the advise
program that was posted in volume 28 of comp.sources.misc can
be used. AND it doesn't requirethat it be run first (you do
have to configure your system in advance to automatically push
the advise module on the stream whenever a tty or pty is opened).



Home FAQ