delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/02/05/22:25:57

X-Spam-Check-By: sourceware.org
Date: Mon, 5 Feb 2007 19:25:24 -0800
From: Gary Johnson <garyjohn AT spk DOT agilent DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: less doesn't recognize capabilities of remote terminal
Message-ID: <20070206032524.GC15739@suncomp2.spk.agilent.com>
Mail-Followup-To: cygwin AT cygwin DOT com
References: <20070205213405 DOT GA15739 AT suncomp2 DOT spk DOT agilent DOT com>
MIME-Version: 1.0
In-Reply-To: <20070205213405.GA15739@suncomp2.spk.agilent.com>
User-Agent: Mutt/1.5.12 (2006-07-14)
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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:

    $ infocmp xterm xterm-16color
    comparing xterm to xterm-16color.
        comparing booleans.
        comparing numbers.
            colors: 8, 16.
            pairs: 64, 256.
        comparing strings.
            setab: '\E[4%p1%dm', '\E[%?%p1%{8}%<%t%p1%'('%+%e%p1%{92}%+%;%dm'.
            setaf: '\E[3%p1%dm', '\E[%?%p1%{8}%<%t%p1%{30}%+%e%p1%'R'%+%;%dm'.
            setb: '\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m', '%p1%{8}%/%{6}%*%{4}%+\E[%d%p1%{8}%m%Pa%?%ga%{1}%=%t4%e%ga%{3}%=%t6%e%ga%{4}%=%t1%e%ga%{6}%=%t3%e%ga%d%;m'.
            setf: '\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m', '%p1%{8}%/%{6}%*%{3}%+\E[%d%p1%{8}%m%Pa%?%ga%{1}%=%t4%e%ga%{3}%=%t6%e%ga%{4}%=%t1%e%ga%{6}%=%t3%e%ga%d%;m'.

(The setb and setf lines are really long and may have wrapped
horribly.)  What any of those strings has to do with scrolling, I
don't know.  The xterm-16color entries for setb and setf look
suspicious to me since neither starts with \E.

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?

Regards,
Gary

-- 
Gary Johnson                 | Agilent Technologies
garyjohn AT spk DOT agilent DOT com     | Wireless Division
                             | Spokane, Washington, USA

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019