[comp.sys.next] remote login, terminal types, Mathematica

zazula@uazhe4.physics.arizona.edu (RALPH ZAZULA) (04/11/91)

Hi.  I'm dialing into my NeXT from school and I'm having some problems.
I'm using an HDS3200 terminal at school which I have set for vt100
emulation.  When I log into my NeXT, it does not automatically sense the
terminal type (vt100) and instead sets it to 'dialup'.  I would like to
find a way to auto-sense the terminal type.  Right now, I manually change
the environment variable TERM so that vi and more work properly.

Also, This terminal does TEK40xx emulation.  Does Mathematica support
TEK40xx terminals?  I saw that /etc/termcap had a bunch of TEK entries.
If so, how do I get Mathematica to do TEK40xx?  I tried setting TERM
to tek4014 and then running the command line version of Mathematica.
The command : Plot[Sin[x],{x,0,1}]  didn't get me any graphics.

Thanks,
Ralph 

   |----------------------------------------------------------------------|
   | Ralph Zazula                               "Computer Addict!"        |
   | University of Arizona                 ---  Department of Physics     |
   |   UAZHEP::ZAZULA                            (DecNet/HEPNet)          |
   |   zazula@uazhe0.physics.arizona.edu         (Internet)               |
   |----------------------------------------------------------------------|
   |   "You can twist perceptions, reality won't budge."  - Neil Peart    |
   |----------------------------------------------------------------------|

eps@toaster.SFSU.EDU (Eric P. Scott) (04/11/91)

In article <1991Apr10.142515.514@arizona.edu>
	zazula@uazhe4.physics.arizona.edu writes:
>            When I log into my NeXT, it does not automatically sense the
>terminal type (vt100) and instead sets it to 'dialup'.  I would like to
>find a way to auto-sense the terminal type.

Well, strictly speaking, you can't, since the "inquire" sequences
for some terminals "crash" others.

+++This is one of those questions that deserves a FAQ entry.

Here's how we dealt with it:  (valid for 1.0/1.0a, 2.0, 2.1)

--8<--CUT-HERE--8<--CUT-HERE--8<--CUT-HERE--8<--CUT-HERE--8<--
# cd /usr/template/user
# mv .login ../.login.orig
# cat - >.login <<EOF
#
# This file gets executed once at login or window startup.
#
switch ($TERM)
case network:
case dialup:
case unknown:
	unsetenv TERMCAP
	set noglob
	@ status=1
	while ($status)
		eval `tset -Q -s -m :\?vt100`
	end
	unset noglob
	set term=$TERM
	breaksw
default:
	set noglob; eval `tset -Q -s`; unset noglob
	set term=$TERM
	stty -tabs
	breaksw
endsw
stty decctlq intr "^C" erase "^?" kill "^U"
cd
EOF
# chmod 644 .login
# chown 0.0 .login
--8<--CUT-HERE--8<--CUT-HERE--8<--CUT-HERE--8<--CUT-HERE--8<--

BTW, the stty -tabs is almost certainly wrong (feel free to
improve on this)!

					-=EPS=-