Copyright 1997 by Thomas E. Dickey


What is NCURSES?

Ncurses (new curses) is a freely distributable "clone" of System V Release 4.0 (SVr4) curses. Curses is a pun on the term "cursor optimization". It is a library of functions that manage an application's display on character-cell terminals (e.g., VT100).

Who wrote NCURSES?

What platforms does it run on?

The following are known to work (I've built these): The following have been reported to work (since 1.9.8a):

What is the latest version?

At this date (30 January 1997), the current version is 4.0, available at Ftp:

I also maintain patches against that toward the next release (4.1) Ftp:

Official releases:

  • 4.0 (24 December 1996). A change in version numbering addresses a problem exposed by the Linux program.
  • 1.9.9g (1 December 1996).
  • 1.9.9e is broken. A last-minute/untested change causes forms and menus to not refresh.
  • 1.9.8a (ok)
  • 1.9.7a (ok)
  • 1.9.4 is the oldest version that you should consider installing. It comes with Slackware 3.0; earlier releases have a number of problems, including incompatible terminal descriptions.

    Known/Frequent problems

    How do I run the test-programs?

    You must first install the terminfo data (i.e., "make").

    On many systems (those that have a SVr4 curses installed) you can run the test programs using the vendor's terminfo database (e.g., Solaris, IRIX, HP-UX) by setting the TERMINFO variable to point to that instead.

    The terminfo database is big - do I need all of that?

    Not at all. You can load a subset of the terminfo database. I use a variant of this script to load the terminal descriptions that I need on my machine:
    	# uses the -e switch on tic to selectively load descriptions that are
    	# interesting for my testing.
    	if test -f terminfo.src ; then
    		trap "rm -f $TMP" 0 1 2 5 15
    		tic -s -1 -I -e'
    	ansi, ansi-m, color_xterm, ecma+color,
    	klone+acs, klone+color, klone+sgr, klone+sgr-dumb,
    	linux, pcansi-m, rxvt, vt52,
    	vt100, vt102, vt220, xterm' terminfo.src >$TMP
    		tic -s $TMP
    		echo 'oops'
    		exit 1

    My terminal doesn't recognize color

    Check the terminal description, to see if it is installed properly (e.g., in /usr/share/terminfo) by looking at the output of infocmp. It should contain the following capabilities: The most common complaint is that "I can see colors using ls, but not with ncurses applications". This is due to not having installed the terminfo database.

    My terminal is not recognized

    Usually this happens because you have not installed the terminfo database, or it is not in the proper location. If you do not, and the application is unable to locate the terminfo database, the ncurses library will attempt to recover by reading /etc/termcap, translating it into a private terminfo database
    This directory can be a nuisance, because the termcap file often does not contain complete or consistent terminal descriptions. Remove it and correct the problem (i.e., install the terminfo database).

    You may have installed terminfo in the wrong, or an obsolete location:

    I can't cut/paste in xterm

    Ncurses resets my colors to white/black

    This is the way SVr4 curses works. From the XSI Curses specification
    The start_color() function also restores the colours on the terminal to terminal-specific initial values. The initial background colour is assumed to be black for all terminals.

    If your terminal description does not contain the orig_pair or orig_colors capability, you will be unable to reset colors to the pre-curses state. This happens, for example, with aixterm.

    However, if your terminal does support resetting colors to a default state, ncurses will use this when exiting Curses mode. Terminal types that do this include the Linux console, rxvt and the XFree86 xterm.

    Ncurses 4.1 will provide an extension use_default_colors() which allows an application running on a terminal which supports resetting colors to mix the default foreground and background colors with the 8 defined curses colors.

    Handling SIGWINCH (resize events)

    It is possible to make an application resize when running in a windowing environment (e.g., in an xterm). This is not a feature of standard SVr4 curses, though some curses implementations (e.g., HP-UX) support this.

    Within ncurses, there are two ways to accomplish this. One relies on side-effects of the library functions, and is moderately portable. The other is an extension to SVr4 curses.

    How do I report bugs?

    First, check to see if your problem is addressed in this FAQ. Read the INSTALL document, if you have not done so. However, it may not be a known problem. Read on.

    How should I report bugs?

    Send mail to the ncurses-list if you're subscribed. Otherwise, you may email directly to the maintainers, currently:

    If you send email only to one of the other authors, I probably won't see it. I get about half of my bug reports via the ncurses mailing list, some by reading news groups, and the others via direct email.

    More than half of the changes that get introduced without review in the ncurses mailing list introduce a bug. So I find it necessary to review proposed changes.

    When sending patches:

    How do I report problems building ncurses?

    This is a little different from reporting bugs. If you have a machine that I've not ported to, and have problems, I'll require the relevant information:
    	log from running 'configure', with options
    	log from running 'make', with options
    A uuencoded/gzip'd/tar file is preferred, because the logfiles can be awkward to email.

    If you're having trouble building on a known "good" platform, please make sure that you've got a current version of ncurses, and please read the installation instructions.

    Why aren't my bugs being fixed?

    Sorry. This is a hobby. There's a large backlog. Some changes pass review quickly, others are difficult, because one fix may break other functionality. My criteria are less stringent if you provide a short program that demonstrates the problem, or if you're modifying something that you maintain.

    In any case, I will incorporate patches into my beta version only if I have reviewed the patch, tested it (if the patch is not obvious), and repaired any omissions (e.g., portability constraints). Occasionally I have patches (including my own) which cannot pass immediate review; these constitute most of my backlog. The remainder of my backlog consists of issues which highlight incompatibilities between ncurses and SVr4 curses; these are listed in the TO-DO file.

    I use the following guidelines: