Hi, all.
Thanks for all the answers. The illustration below shows the whole idea
of the problem.
+-------+ +-----------+
| xterm | | tip |
+-------+ +-----------+
| | |
| | |
| pty pty | | tty
. . . . . . . . . . . . . . . . . . .
| | |
| | |
+--------------+ |
external equipment
The xterm process starts another process which sole purpose is to copy
everything from its output to its input and vice versa. This other
process could as well be tip as suggested by many of the answers.
I wrote a C program that did the job, copying stdin to stdout and
forking a process that copies stdout to stdin.
What I really hoped was that xterm had a ´hidden capability´ or there
were some other program that could do the trick directly:
+-------------------+
| terminal emulator |
+-------------------+
|
|
| tty
. . . . . . . . . . . . . . . . . . . . .
|
|
|
external equipment
This does not seem to be possible, so the tip solution is the simplest,
I guess. The following advice is from
Michael.Fong_at_DWNPLAZA.NCOM.nt.gov.au
edit /etc/remote and put in this entry
hardwire:\
:dv=/dev/tty0a:br¦9600:el=^C^S^Q^U^D:ie=%$:oe=^D:
Then type "tip hardwire"
I also got an inhouse answer that a former employee made the following
script to be put in place of tip (this seems old, there may be something
with stty and redirections, I think).
#!/bin/sh5
trap "kill \`ps -aux | grep 'cat -u /dev/'$1 | grep -v grep | awk
'{print \$2}'\` ; stty sane; exit" 2
echo "ttyterm: terminate with <cntr>c"
sleep 10 >/dev/$1 &
stty -echo raw >/dev/$1
cat -u /dev/$1 &
stty -echo cbreak
cat -u | tr '\012' '\015' >/dev/$1
I got some suggestions about downloading kermit which I did (from
http://www.columbia.edu/kermit/). It did however seem to be quite a
large program (The doc were 100 pages) so I did choose the simpler
solution abov.
Thanks to Thomas Leitner, Jim Belonis, Anthony Talltree, Peter Reynolds,
wmills_at_WellsFargo.com, Dr, Tom Blinn and Michael Fong
--
|||
\|/ ;_;
What does a process need | /"\
to become a daemon ? | \v/
| |
- a fork o---/!\---
| |_|
| _/ \_
Lars Bro (lbr_at_dksin.dk) Adtranz Signal +45 36 39 01 88
Received on Fri Apr 09 1999 - 07:50:52 NZST