watch(8), xwatchwin as courseware [solved by script/tail]

Andrew Pantyukhin infofarmer at gmail.com
Mon Apr 3 06:29:12 UTC 2006


Hi. I have to teach no-frills freebsd courses. I wonder how
I can arrange all the students seeing on their displays what
I'm typing in my xterm in real-time. I haven't been very
successful with xwatchwin (I've been able to see it in action
but it wasn't very pleasant, and it dumps core on me lately).

watch(1) seems to be ideal for my purposes - students log
on to my box (maybe even gain root privileges if I don't
tweak devfs) and watch my pty. They can even copy and
paste what I'm typing in their xterms. But there's a show-
stopper: it seems that only one snp(4) device can attach to
a tty at the same time and only one watch(1) can use a
snp(4) at the same time.

So what do you suggest?

Hmm... Just as I was typing this I saw a simple solution. I
can use script(1) dumping to a file with -t0 (flush on every
char) and people can just tail -f this file. Performance is
great on a local machine, but is very laggy over NFS... I
tried 'mount -o acregmin=0,acregmax=0' and the
perfomance is almost real-time now.

Great :-) It really is true that many solutions come just as
soon as you try to describe your problem clearly :-)


More information about the freebsd-questions mailing list