[comp.sys.ibm.pc.rt] rlogin to an RT prevents using vi

hst@ifcom.UUCP (Hartmut Streppel) (08/14/89)

We have a PC/RT running AIX 2.2.1 connected to our LAN, 
consisting of a Sequent Balance,
a Prime Exl 386, a Bull SPS 7, a Sun and sometimes other workstations,
via TCP/IP. If we use rlogin to login from one of the machines mentioned
above to the RT, and then try to use  vi on the RT, vi fails giving 
the message: "Don't know enough your terminal to use visual"

We have checked the stty settings, the environment variables, the terminfo
files, the configuration of the pts; everything is ok.

The funny thing is: when the system has just been rebooted, a single DEL before
you call vi, might make it work. Is it possible that the driver gets some
new information by this interrupt. Is this a vi problem?

By the way, using telnet we have no problems using vi on the RT.

Any help or ideas? Pleas email!

Hartmut Streppel, InterFace Computer GmbH, Garmischer Str. 4,
8000 Muenchen 2,  West Germany
Tel: +49-89-51086-35, FAX: +49-89-51086-28,  uucp: ...!mcvax!unido!ifcom!hst

jw@pan.UUCP (Jamie Watson) (08/16/89)

In article <396@ifcom.UUCP> hst@ifcom.UUCP (Hartmut Streppel) writes:
>If we use rlogin to login from one of the machines mentioned
>above to the RT, and then try to use  vi on the RT, vi fails giving 
>the message: "Don't know enough your terminal to use visual"

We have seen the same thing using rlogin from MicroVax and Vaxstation
systems.  We have also found that when this happens, logging out from
the RT, and immediately rlogin again almost clears the condition,
whatever it is.

jw

sergio@squid.rtech.com (Sergio Aponte) (08/17/89)

	I have had some luck by setting the pseudo-tty entries to be a vt100
	type window. If you get one where term is set to dumb, vi does not
	work.

	To change these, use "devices" and go 1 by 1, or edit the /etc/ports
	file. There is an entry there for every port. After you change the
	file, there is a good chance you have to re-boot.

	(I personally use the "devices" command so that I don't get in trouble).

	It seems once the prot is "told" you have a dumb terminal, changing
	TERM or doing tset does not fix it. (!!)

	Of course, if anybody else knows better, by all means let me know
	what I have to do.

	Good luck.

-------------------------------------------------------------------------------
| Internet: sergio@squid.rtech.com                Sergio L. Aponte, MTS @ RTI |
| UUCP: {sun,mtxinu,pyramid,pacbell,hoptoad,amdahl,cpsc6a}!rtech!squid!sergio |
-------------------------------------------------------------------------------

brunner@bullhead.uucp (08/29/89)

>In article <396@ifcom.UUCP> hst@ifcom.UUCP (Hartmut Streppel) writes:
>If we use rlogin to login from one of the machines mentioned
>above to the RT, and then try to use  vi on the RT, vi fails giving 
>the message: "Don't know enough your terminal to use visual"

The error is due to an initial sanity check in the vok routine in ex_v.c,
the portion of the ex/vi code which checks for terminal characteristics.

If the global WCOLS hasn't been set prior to entry into this routine,
then there is insufficient info to divide the screen buffer into lines.

So, why hasn't WCOLS been set? Both rlogin and telnet make an effort to
determin the TERM shell variable in the local environment and pass it to
the remote host, where it may be reset during the remote host login. Check
your .cshrc/.login on the remote host for settings, you may want to have
your term variable host dependent, set in a switch statement in .login

switch ($host) # ibmpa lan hosts
	case ibmsupt:
		set	TERM = "ibmaed"
		breaksw
	case dumbbunny:
		set	TERM = "dumb"
		breaksw
	case dialbunny:
		set	TERM = "dialup"
		breaksw
	default:
		set	TERM = "vt100"
endsw

P.S. Your mailage may vary with AIX, check ttys(5) for supported types
and echo $term (or $TERM) on both ends of the pipe.

An equivalent problem was reported as an APAR, xterm via telnet didn't
force the remote host to use the local host's notion of the term shell
variable. This is NOT a bug. Telnet/rlogin are general remote terminal
routines, if the local setting for term were forced on the remote host
it would be very inconvient, passing vt100 is always safe (even to TOPS
and VMS hosts on the Internet), but the remote host may not support X
or the Advanced Experimental Display or whatever. It is preferable to
have a screen-oriented application (e.g., vi) bail out to line mode when
the environment is either unsupported or not available during telnet/rlogin
initiation. One can always set term in the login environment or "by hand".




Eric Brunner, IBM AWD Palo Alto
inet: brunner@monet.berkeley.edu or brunner%ibmsupt@uunet.uu.net
uucp: uunet!ibmsupt!brunner		(415) 855-4486

karish@forel.stanford.edu (Chuck Karish) (08/29/89)

In article <1934@ibmpa.UUCP> brunner@ibmsupt.UUCP () wrote:
>>In article <396@ifcom.UUCP> hst@ifcom.UUCP (Hartmut Streppel) writes:
>>If we use rlogin to login from one of the machines mentioned
>>above to the RT, and then try to use  vi on the RT, vi fails giving 
>>the message: "Don't know enough your terminal to use visual"

>The error is due to an initial sanity check in the vok routine in ex_v.c,
>the portion of the ex/vi code which checks for terminal characteristics.

>If the global WCOLS hasn't been set prior to entry into this routine,
>then there is insufficient info to divide the screen buffer into lines.

>So, why hasn't WCOLS been set? Both rlogin and telnet make an effort to
>determin the TERM shell variable in the local environment and pass it to
>the remote host, where it may be reset during the remote host login. Check
>your .cshrc/.login on the remote host for settings, you may want to have
>your term variable host dependent, set in a switch statement in .login...

Of course, the switch in .login is useless if you log in on a network
port.  I have my .kshrc prompt me for the terminal type.

It doesn't work.

The TERM variable is set to a name that has a good terminfo entry, but
vi still won't come up in full-screen mode if I open the connection with
rlogin.

When I use telnet vi works fine.


	Chuck Karish		karish@mindcraft.com
	(415) 493-9000		karish@forel.stanford.edu

vlruo02@dutrun.UUCP (Ge van Geldorp) (08/30/89)

In article <1934@ibmpa.UUCP> brunner@ibmsupt.UUCP () writes:
>So, why hasn't WCOLS been set? Both rlogin and telnet make an effort to
>determin the TERM shell variable in the local environment and pass it to
>the remote host, where it may be reset during the remote host login. Check
>your .cshrc/.login on the remote host for settings, you may want to have
>your term variable host dependent, set in a switch statement in .login

[deleted stuff]

>P.S. Your mailage may vary with AIX, check ttys(5) for supported types
>and echo $term (or $TERM) on both ends of the pipe.

You seem to be talking about AOS, I can't comment on that since our
machines runs AIX. However, I think the original poster was also running
AIX, because the problem he describes sounds very familiar to me.
As far as I can tell, the problem has nothing to do with the setting of
the $TERM variable. It has to do with a bug in rlogind. If you use
rlogin to login to an AIX machine, the window size (number of rows/cols)
is not always transferred correctly to the AIX machine. You can confirm
this by issuing the termdef -l and/or termdef -c commands. If the window
size was not transferred correctly, both commands will return 0 (yes,
that's zero, not an empty string). I suppose vi calls the termdef(3)
(or the setupterm(3) routine, which in turn calls termdef(3)) routine
on startup and gets this garbage back, after which it gives up.
One of the systems from which I use rlogin to go to an AIX machine runs
UTek, the Tektronix version of **ix. Recently, we upgraded the UTek
version and we got a new version of rlogin. This version has a new flag,
-w. The documentation says this flag is used to force correct transfer
of the window size to some versions of rlogind based on the BSD 4.3
rlogind. The BSD 4.3 rlogind appearantly does not handle the necessary
out-of-band data transfer needed for the window size exchange correctly.
When I use this -w flag, vi on the RT works correctly...
(BTW, if the problem was really with the $TERM variable, vi wouldn't
complain "Don't know enough about your terminal to use visual" but would
say "xxxx: Unknown terminal type". Try it.)
I reported my problems with rlogin/vi several months ago to IBM but haven't
received a fix yet. Now, would somebody at IBM please take a good look
at it please please please?


Ge van Geldorp.
(ge@dutlru2.tudelft.nl)