two-way terminal multiplexing

Pietro Cerutti gahr at gahr.ch
Thu Aug 30 06:41:52 PDT 2007


djembe nazar wrote:
> I am trying to work out a way to do the following for a
> "FreeBSD teaching environment":
> 
> The intention is to have two terminals, one above the other.
> The bottom terminal shows one's own commands and output like
> an ordinary xterm whilst the top terminal shows the commands
> and output of a peer (such as an instructor).
> 
> The pupil is not allowed to enter commands into the
> instructor's terminal, it simply shows what the instructor
> typed and the resulting output of the commands. The same
> is true of the reverse. The overall concept is to allow an
> instructor to tutor a pupil over an appropriate medium such
> as instant messaging whilst allowing the pupil to learn by
> example with a very hands-on approach.
> 
> In the case of a standard 1-to-1 teaching environment, the
> instructor would see his/her own terminal on the bottom and
> the terminal of the pupil on the top. The pupil would see the
> reverse (instructor's terminal above, his/her own terminal
> below).
> 
>      pupil sees:            instructor sees:
>   +-----------------+     +-----------------+
>   | INSTRUCTOR TERM |     |    PUPIL TERM   |
>   +-----------------+     +-----------------+
>   |    PUPIL TERM   |     | INSTRUCTOR TERM |
>   +-----------------+     +-----------------+
> 
> I do not understand how to achieve this. Is this even possible
> given standard unix security with regards to hijacking the
> tty devices of other users on the system?

A solution would be to use a combination of GNU screen(1)
[sysutils/screen] and watch(8) [in the base system].

Screen would be used to multiplex a terminal in two upper and lower
regions, with watch would be used to see the output of another terminal.

I never used it on remote terminals, but you could solve the problem by
letting both the teacher and the pupil connect to a common remote
machine, say lecture-machine.

Once connected (via SSH), both would use screen(1) to create two pseudo
multiplexed terminals, e.g.:

piter            p3       :0:S.0            3:38PM     - /bin/tcsh
piter            p4       :0:S.1            3:38PM     - /bin/tcsh

It would then suffice for both to open watch(8) and watch on one of each
other's screen pseudo terminals.

(not tested)...

Hope this helps,


> 
> --
> D.N
> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"


-- 
Pietro Cerutti

PGP Public Key:
http://gahr.ch/pgp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20070830/e8636d4e/signature.pgp


More information about the freebsd-hackers mailing list