termcap vs terminfo, less, and Mac OS X

Thomas Dickey dickey at radix.net
Fri Jun 2 14:37:29 PDT 2006

On Fri, Jun 02, 2006 at 02:26:07PM -0700, Walt Pawley wrote:
> I've been messing about with FreeBSD lately, though mostly I
> use Mac OS X. I've grown accustomed to using "less" as a pager,
> generally preferring the manner in which it would make all the
> scrolled through crud vanish when I was done pawing about in
> it. But "less" didn't behave that way when telnet'd into the
> the FreeBSD boxes on the LAN - whatever got presented scrolled
> "up" into the terminal program's capture buffer.
> After mucking with this for a couple of days, I believe the
> reason is that the termcap description of "xterm-color" in
> FreeBSD doesn't match the "xterm-color" terminfo description in
> either Mac OS X or Linux (which seem to be identical). In
> particular, the "ti" and "te" capabilities are null.

Most of the Linux's have xterm-color the same as in ncurses.
A couple (I've observed) do as in Mac OS X and choose some flavor of
xterm to replace it.  There's no standard choice for the replacement.

The choice of whether to have ti/te null is arbitrary (half of xterm's
users like the alternate screen, half don't).
> Is this intentional or something that should be generically "fixed"?

The fix is simply not to use "xterm-color".  It doesn't correspond to
any terminal type, is useful only to people who don't care to find out
what the terminal is.

For instance, you've not identified the terminal type.  Find out what
it is...

xterm supports ANSI color, VT220 emulation and UTF-8
There's an faq at

The current version of ncurses is 5.5 (20051010)
There's an faq at

Thomas E. Dickey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20060602/28dc3d1d/attachment.pgp

More information about the freebsd-questions mailing list