X-Spam-Check-By: sourceware.org
Message-ID: <ba40711f0702060748w4c0ddf0evea3731e13fa63d1a@mail.gmail.com>
Date: Tue, 6 Feb 2007 10:48:15 -0500
From: "Lev Bishop" <lev.bishop@gmail.com>
To: cygwin@cygwin.com
Subject: Re: less doesn't recognize capabilities of remote terminal
In-Reply-To: <20070206032524.GC15739@suncomp2.spk.agilent.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
References: <20070205213405.GA15739@suncomp2.spk.agilent.com> 	 <20070206032524.GC15739@suncomp2.spk.agilent.com>
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On 2/5/07, Gary Johnson wrote:
> On 2007-02-05, Gary Johnson wrote:
> > I recently got Cygwin's sshd running on my Windows XP machine.  It
> > seems to basically work fine, allowing me to login from any of
> > several machines running various flavors of Unix.  Cygwin's less
> > command, however, doesn't seem to recognize the capabilities of my
> > remote terminal.
> >
> > For example, I often use ssh to login to my Windows machine from
> > another machine running SunOS 5.8, using an xterm version "XFree86
> > 4.1.0(165)".  When I use less to read a file, I get a warning
> > message:
> >
> >     $ less /usr/share/doc/Cygwin/terminfo-5.5_20061104.README
> >     WARNING: terminal is not fully functional
> >     /usr/share/doc/Cygwin/terminfo-5.5_20061104.README  (press RETURN)
>
> Update:  If I simply set TERM=xterm (instead of xterm-16color), less
> works fine:
>
>     TERM=xterm less /usr/share/doc/Cygwin/terminfo-5.5_20061104.README
>
> The difference between the two terminfo entries is:
<snip>
> That xterm-16color terminfo is from Cygwin's /usr/lib/terminfo.  The
> xterm-16color terminfo from the xterm-165 release that I have on the
> Sun machine is different, but its setb and setf strings also lack
> the leading \E's.  The same is true for the xterm-16color terminfo
> from a Red Hat Linux 9 machine with xterm-174.
>
> This is just a guess, but I wonder if the setb and setf entries are
> long-standing errors in the xterm terminfo data that haven't been
> detected because applications use setab and setaf instead.  But then
> why does only Cygwin's less complain?

The cygwin-distributed less doesn't use terminfo. It was built with
-ltermcap. The cygwin-distributed /etc/termcap doesn't have an entry
for xterm-16color. Thus, less complains. Possible solutions inlclude
adding an xterm-16color line to /etc/termcap (could just be an
additional alias to xterm), or installing libncurses-devel,
downloading the less source package and building it yourself (the
build process will automatically use ncurses if it's available).

Lev

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

