This is the mail archive of the cygwin 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]
Other format: [Raw text]

Re: Get bad results when running ./ncurses from rxvt


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]