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]

Term info in termcap. Telneting from cygwin to a linux box.


I have had a problem using an application that uses information from the
/etc/termcap file for user interaction.  (In my case vim.)  I found a
solution and would like to inform the mailing list so others may learn
from my discovery.

Warning:  I'm am still new to the linux world and may have solved this
problem incorrectly.

When telnet-ing from a cygwin shell in a Windows 2000 box to a Red Hat
6.2 box, I discovered vim complained about my terminal type.  While
telnet-ed, the result of "echo $TERM" was "cygwin" so I did some
research.  I knew the vim in my cygwin shell functioned normally, so I
wondered why the telnet session complained.

I found that vim was searching the /etc/termcap file for information
about the current terminal of the user and it's settings.  The
/etc/termcap file in my local cygwin shell had the following information
which was absent in the Red Hat 6.2 termcap file.  So I grep-ed the
/etc/termcap in the cygwin shell using

grep --line-number cygwin /etc/termcap  (note -n for --line-number will
work)

was

165:cygwin:\

at the 165th line of /etc/termcap in cygwin I found the following

cygwin:\
	:xn@:op=\E[39;49m:tc=linux

I copied the Red Hat's version of /etc/termcap to /etc/termcap.orig add
the 165 and 166 line of cygwin's /etc/termcap to Red Hat's etc/termcap
and tried to telnet and use vi again.

Everything worked as on my local cygwin and other applications such as
more and man were working better now also.

I think I just made the server aware of the settings of the cygwin
terminal.  What I really did I'm not sure.  I will post another message
regarding this if anything strange does occur.  For right now, all is
a.o.k.

Hope I help someone,

Big Mike

--
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]