OT: linux vs vt100 termcap problems + screen - help!
Brian K. White
brian at aljex.com
Wed Dec 8 14:44:45 PST 2010
Ugh, I see nothing about setting answerback in screen docs, and a quick
test of screen shows that it does in fact "eat" a ^E without either
answering back itself or passing the ^E to the end terminal and passing
it's response back to the host, so in fact, detecting screen by
_omission_ of answerback seems to be the only way until one of use
learns better. I haven't actually looked at screen's source yet ;)
Also my quick test did not use any extra options to try to be 8bit clean
or utf8 clean etc.
I just did this, I have my putty configured to answer back "Aljex^M"
(this is a standard putty feature, not requiring my enhanced one)
I log into joe random box and:
# ensure MYTERM unset
nj9:~ # unset MYTERM
nj9:~ # echo $MYTERM
# try answerback in the normal direct shell
nj9:~ # read -s -t 1 -p $'\005' MYTERM
nj9:~ # echo $MYTERM
Aljex
# clear MYTERM before screen test
nj9:~ # unset MYTERM
nj9:~ # echo $MYTERM
# enter screen
nj9:~ # screen
nj9:~ # echo $TERM
screen.linux
nj9:~ # echo $MYTERM
# try same answerback test
nj9:~ # read -s -t 1 -p $'\005' MYTERM
nj9:~ # echo $MYTERM
nj9:~ #
The read command timed out after one second and MYTERM was left empty.
So you can detect screen by knowing that your real terminal DOES
answerback, but screen DOES NOT answerback.
This all might be out the window if your 8bit clean configuration
results in the real terminal being able to answerback as if screen were
not there.
--
bkw
More information about the Filepro-list
mailing list