10.24. Ncurses-5.9

The Ncurses package contains libraries for terminal-independent handling of character screens.

10.24.1. Installation of Ncurses

The following patch contains updates from the 5.9 branch by the Ncurses developers:

patch -Np1 -i ../ncurses-5.9-branch_update-4.patch

Prepare Ncurses for compilation:

./configure --prefix=/usr --libdir=/lib \
    --with-shared --without-debug --enable-widec \
    --with-manpage-format=normal --enable-pc-files \

The meaning of the new configure option:


This tells Ncurses not to compress its installed manpages.


This tells Ncurses to generate and install .pc files for pkg-config.

Compile the package:


This package has a test suite, but it can only be run after the package is installed. The tests are in the test/ directory. See the README file in that directory for details.

Install the package:

make install

Move the Ncurses static libraries to the proper location:

mv -v /lib/lib{panelw,menuw,formw,ncursesw,ncurses++w}.a /usr/lib

Create symlinks in /usr/lib:

ln -svf ../../lib/$(readlink /lib/libncursesw.so) /usr/lib/libncursesw.so
ln -svf ../../lib/$(readlink /lib/libmenuw.so) /usr/lib/libmenuw.so
ln -svf ../../lib/$(readlink /lib/libpanelw.so) /usr/lib/libpanelw.so
ln -svf ../../lib/$(readlink /lib/libformw.so) /usr/lib/libformw.so
rm -v /lib/lib{ncursesw,menuw,panelw,formw}.so

Many packages that use Ncurses will compile just fine against the widechar libraries, but won't know to look for them. Create linker scripts and symbolic links to allow older and non-widec compatible programs to build properly:

for lib in curses ncurses form panel menu ; do
        echo "INPUT(-l${lib}w)" > /usr/lib/lib${lib}.so
        ln -sfv lib${lib}w.a /usr/lib/lib${lib}.a
ln -sfv libncursesw.so /usr/lib/libcursesw.so
ln -sfv libncursesw.a /usr/lib/libcursesw.a
ln -sfv libncurses++w.a /usr/lib/libncurses++.a
ln -sfv ncursesw5-config /usr/bin/ncurses5-config

10.24.2. Contents of Ncurses

Installed programs: captoinfo (link to tic), clear, infocmp, infotocap (link to tic), ncursesw5-config, reset (link to tset), tabs, tic, toe, tput, tset
Installed libraries: libcursesw.so (link to libncursesw.so), libformw.[a,so], libmenuw.[a,so], libncurses++w.a, libncursesw.[a,so], libpanelw.[a,so]
Installed directories: /usr/share/tabset, /usr/share/terminfo

Short Descriptions


Converts a termcap description into a terminfo description


Clears the screen, if possible


Compares or prints out terminfo descriptions


Converts a terminfo description into a termcap description


Provides configuration information for ncurses


Reinitializes a terminal to its default values


Sets and clears tab stops on a terminal


The terminfo entry-description compiler that translates a terminfo file from source format into the binary format needed for the ncurses library routines. A terminfo file contains information on the capabilities of a certain terminal


Lists all available terminal types, giving the primary name and description for each


Makes the values of terminal-dependent capabilities available to the shell; it can also be used to reset or initialize a terminal or report its long name


Can be used to initialize terminals


A link to libncursesw


Contains functions to display text in many complex ways on a terminal screen; a good example of the use of these functions is the menu displayed during the kernel's make menuconfig


Contains functions to implement forms


Contains functions to implement menus


Contains functions to implement panels