[comp.unix.questions] vi question - unknown terminal type

ratazzie@lonex.radc.af.mil (Edward P. Ratazzi) (02/01/91)

Recently, I added some new termcap entries to the end of our /etc/termcap
file.  Everything seems to work O.K. with these terminals, EXCEPT vi.  
When vi is started, we get an 'Unknown terminal type' message.  The terminal
name IS in /etc/termcap.  Where else does vi look?  What might be the problem?


-- 
E. Paul Ratazzi                                |      ratazzie@lonex.radc.af.mil
Microelectronics Reliability Division          |            COMPMAIL:  e.ratazzi
Rome Laboratory                                |                  (315) 330-2946
"Exploring the Invisible Frontier"             |                    DSN 587-2946

gwyn@smoke.brl.mil (Doug Gwyn) (02/01/91)

In article <1991Jan31.160558.815@lonex.radc.af.mil> ratazzie@lonex.radc.af.mil (Edward P. Ratazzi) writes:
>Recently, I added some new termcap entries to the end of our /etc/termcap
>file.  Everything seems to work O.K. with these terminals, EXCEPT vi.  
>When vi is started, we get an 'Unknown terminal type' message.  The terminal
>name IS in /etc/termcap.  Where else does vi look?  What might be the problem?

(1)  Make sure that the environment variable TERM is properly set -- not
just a shell variable.

(2)  Some systems have both termcap and terminfo, which are alternative
implementations of the same basic idea.  Applications use one or the other
but not both.  (Indeed, most system software doesn't use either!)  So it
could well be that "vi" is using terminfo, not termcap, and you would need
to use the "tic" utility to add a terminfo description for your TERM type.

bill@twg.bc.ca (Bill Irwin) (03/01/91)

ratazzie@lonex.radc.af.mil (Edward P. Ratazzi) writes:

} Recently, I added some new termcap entries to the end of our /etc/termcap
} file.  Everything seems to work O.K. with these terminals, EXCEPT vi.
} When vi is started, we get an 'Unknown terminal type' message.  The terminal
} name IS in /etc/termcap.  Where else does vi look?  What might be the problem?

I've also seen situations where a previous termcap description
does not terminate correctly, thereby including your new terminal
definition as part of the previous one.

The way to verify if this is your problem is to move your new
entry to the top of the termcap file, making it the first entry
read.  If you still have the unknown terminal problem, then this
wasn't the cause of it.

} E. Paul Ratazzi                                |      ratazzie@lonex.radc.af.mil
} Microelectronics Reliability Division          |            COMPMAIL:  e.ratazzi
} Rome Laboratory                                |                  (315) 330-2946
} "Exploring the Invisible Frontier"             |                    DSN 587-2946
-- 
Bill Irwin    -       The Westrheim Group     -    Vancouver, BC, Canada
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
uunet!van-bc!twg!bill     (604) 431-9600 (voice) |     Your Computer  
bill@twg.bc.ca            (604) 430-4329 (fax)   |    Systems Partner

art@pilikia.pegasus.com (Art Neilson) (03/01/91)

In article <967@twg.bc.ca> bill@twg.bc.ca (Bill Irwin) writes:
>ratazzie@lonex.radc.af.mil (Edward P. Ratazzi) writes:
>
>} Recently, I added some new termcap entries to the end of our /etc/termcap
>} file.  Everything seems to work O.K. with these terminals, EXCEPT vi.
>} When vi is started, we get an 'Unknown terminal type' message.  The terminal
>} name IS in /etc/termcap.  Where else does vi look?  What might be the problem?
>
>I've also seen situations where a previous termcap description
>does not terminate correctly, thereby including your new terminal
>definition as part of the previous one.

Or perhaps the system Edward is on has terminfo.
If his system does have terminfo, vi probably uses it.
-- 
Arthur W. Neilson III		| INET: art@pilikia.pegasus.com
Bank of Hawaii Tech Support	| UUCP: uunet!ucsd!nosc!pilikia!art

ratazzie@lonex.radc.af.mil (Edward P. Ratazzi) (03/02/91)

In article <1991Mar01.091710.25962@pilikia.pegasus.com> art@pilikia.pegasus.com (Art Neilson) writes:
>In article <967@twg.bc.ca> bill@twg.bc.ca (Bill Irwin) writes:
>>ratazzie@lonex.radc.af.mil (Edward P. Ratazzi) writes:
>>
>>} Recently, I added some new termcap entries to the end of our /etc/termcap
>>} file.  Everything seems to work O.K. with these terminals, EXCEPT vi.
>>} When vi is started, we get an 'Unknown terminal type' message.  The terminal
>>} name IS in /etc/termcap.  Where else does vi look?  What might be the problem?
>>
>>I've also seen situations where a previous termcap description
>>does not terminate correctly, thereby including your new terminal
>>definition as part of the previous one.
>
>Or perhaps the system Edward is on has terminfo.
>If his system does have terminfo, vi probably uses it.
>--
Yup, that's it.  I had just upgraded from SunOS 4.0.3 to SunOS 4.1.1.  In
that upgrade, vi goes from being termcap-dependent to terminfo-dependent.
So, after I modified termcap, I had to "tic" (see man tic) the termcap into
the terminfo database. --> Problem solved.


-- 
E. Paul Ratazzi                                |      ratazzie@lonex.radc.af.mil
Microelectronics Reliability Division          |            COMPMAIL:  e.ratazzi
Rome Laboratory                                |                  (315) 330-2946
"Exploring the Invisible Frontier"             |                    DSN 587-2946

guy@auspex.auspex.com (Guy Harris) (03/03/91)

>Yup, that's it.  I had just upgraded from SunOS 4.0.3 to SunOS 4.1.1.  In
>that upgrade, vi goes from being termcap-dependent to terminfo-dependent.

And for those of you curious why this was done, read the message titled
"vi and non-ascii characters" in this very newsgroup/mailing list - the
SunOS 4.1[.x] "vi" is based on the System V Release 3.1 "vi", because
the latter version, unlike the 4.3BSD-vintage "vi" used prior to that,
supports 8-bit character sets such as ISO Latin #1, and making the
4.3BSD-vintage one handle 8-bit character sets would have been a lot
more complicated than just switching to the S5R3.1 "vi". 

mike@idca.tds.philips.nl (Mike Corrall) (03/04/91)

Has the original poster remembered to set $TERM to the right value?
In SYS V you should adjust /etc/ttytype entry for the line in use.

root@tyrell.gtc.de (System Operator) (03/08/91)

bill@twg.bc.ca (Bill Irwin) writes:
>} file.  Everything seems to work O.K. with these terminals, EXCEPT vi.

Did you set you $TERM environment var. properly?

-Rod
-- 
                     Rodney Volz - 7000 Stuttgart 1 - FRG
 ============> ...uunet!mcsun!unido!gtc!aragon!tyrell!rodney <=============
  rodney@tyrell.gtc.de * rodney@delos.stgt.sub.org * rodney@mcshh.hanse.de 
  \_____________ May your children and mine live in peace. ______________/