This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

setting TERM=cygwin in non-cygwin unix [Was: Re: A bit OT: vi intelnet session]


On Mon, 21 Aug 2000, Andreas Zielke wrote:

> I guess this posting is a bit off-topic, but I don't know any news-
> group that would be more appropriate. (If you do, please tell me.)

It can't hurt to get the answer into the mail archive.  This might even be
a FAQ from people learning unix via cygwin.

BTW, the answer applies no only to telnet, but also to ssh, rlogin, etc.


> When I telnet to a machine (running SunOS 5.7), using the telnet-
> program that comes with 1.1.4 Cygwin an start vi I get this error-
> message:
> 
> bash-2.03$ vi
> cygwin: Unknown terminal type
> Visual needs addressable cursor or upline capability

The quick answer is to set your TERM to vt100 or something else that's
pretty close.

The better answer is to make your non-cygwin unix machines aware of the
cygwin TERM type.  There are two ways to do this, depending on if your
unix machine uses termcap or terminfo.

You can get general info about termcap and terminfo by typing 'man
termcap' and 'man terminfo'.  Follow the see-also links for documentation
on the helper programs, including one that converts between termcap and
terminfo sytle information.  Read the manpages; everything you need to
know is there. You may want to ask your sysadmin if your systems use
termcap or terminfo. But they probably use terminfo.

If you use termcap, then you need to add a cygwin entry to the termcap
file.  If you use terminfo, then you need to add a cygwin entry to the
terminfo/c/ directory.

In my environment, we have solaris, irix, hpux, and linux machines.  I
don't have root privilege, so I do this in my home directory and set
TERMINFO env var to point to ~/terminfo.  I've placed into that dir the
terminfo files for any terminal I use.  It looks like this:

~/terminfo/c/cygwin
           i/iris-ansi
           i/iris-ansi-net
           v/vt100
           x/xterm

plus a few others.  Then, my startup files do a

   export TERMINFO=~/terminfo

If you want to be clever, you can set TERMINFO only if your term-type
isn't in the system-wide termfino directory.  That way you ensure that you
use the correct `xterm', if they differ among platforms.

-jeff


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]