delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/02/02/22:02:59

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_44,J_CHICKENPOX_45,RCVD_IN_DNSWL_LOW,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <4987B3CC.8080501@cwilson.fastmail.fm>
Date: Mon, 02 Feb 2009 22:02:36 -0500
From: Charles Wilson <cygwin AT cwilson DOT fastmail DOT fm>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.19) Gecko/20081209 Thunderbird/2.0.0.19 Mnenhy/0.7.5.666
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Get bad results when running ./ncurses from rxvt
References: <C5CDAB9746FE41DB86CAC84BBDB1954D AT WMK>
In-Reply-To: <C5CDAB9746FE41DB86CAC84BBDB1954D@WMK>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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

Bill Klein wrote:
> When I go to the
>  /usr/share/libs/ncurses/test
> directory under by "normal" bash shell and enter
>  ./ncurses
> everything looks good.

Well, you probably do have one special setting: IIRC, the line draw
stuff doesn't work properly even in cmd.exe/bash unless your CYGWIN
variable contains "codepage:oem" (cygwin-1.5 only).

However, rxvt doesn't know anything about code pages, and doesn't care
about "codepage:oem".

> However, when I try this under the rxvt "shell", I am having lots of
> problems.  The install (as documented) sets 
>  TERM=xterm
> 
> I have tried a few other TERM settings including
>  TERM=rxvt
>  TERM=rxvt-color
>  TERM=xterm-color
> 
> and none of those helps.

You're looking in the wrong place.

> In particular, when under ./ncurses I do "f" for acs characters, nothing
> shows. 

Two things:

#1) You need to tell the ncurses test program to use the existing
default colors of your rxvt

$ ncurses -d

Or specify foreground/background yourself (fg,bg):

0 = black  1 = red     2 = green  3 = yellow
4 = blue   5 = magenta 6 = cyan   7 = white

$ ncurses -a 3,4

Otherwise, this silly little test program uses the DEFAULT defaults,
which are (apparently) black on black. Don't ask me why.

> I suspect this is a "user error" - but as I did install both ncurses and
> rxvt right from the Cygwin "setup.exe", I was hoping that someone could
> point me to the "error of my ways" and/or how to fix this.

2) if you want the line draw characters *in rxvt*, then you must use a
font which provides those glyphs at the appropriate place where they
would be expected, if you were using code page 437 in cmd.exe.

There aren't many to choose from. There's only one TrueType font that I
know of: a recoded version of Lucida Console: "Lucida ConsoleP":
http://cygutils.fruitbat.org/bashprompt/index.html
(Ignore the "vgafonts" on that page -- those only work with the Xserver;
but they do have the line draw characters).

So, install that font, and launch rxvt using:

rxvt -fn "LucidaConsoleP-16"

But there's still more: you have to tell your shell (bash) which set of
control characters it should use to cause the terminal emulator (rxvt)
to print the desired characters. This mapping is in the "terminfo"
database, and you pick the right ACS character translation table (among
other things) by setting your TERM variable. So,

rxvt -fn "LucidaConsoleP-16" -tn rxvt-cygwin-native

plus whatever other rxvt options you like.

--
Chuck


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