Quick Linux Help:
Installing ncurses

What

ncurses is a library for controlling a screen's display from a programming language such as C/C++. A decription is available at: http://www.clark.net/pub/dickey/ncurses/ncurses.lsm.

Where

ncurses can be obtained from the directories at ftp://ftp.clark.net/pub/dickey/ncurses. You should grab ncurses-4.2.tar.gz and the roll up patch patch-4.2-990213.sh.

How to Install

It is assumed you have put ncurses-4.2.tar.gz in /tmp.

$ cd /tmp
$ tar zxvf ncurses-4.2.tar.gz
$ cd ncurses-4.2

It is assumed you have put patch-4.2-990213.sh in /tmp/ncurses-4.2.

If one looks at the contents of patch-4.2-990213.sh, we see it looks for the file dist.mk. This file exists inside the newly created ncurses-4.2 directory.

$ chmod u+x patch-4.2-990213.sh
$ ./patch-4.2-990213.sh

Viewing the INSTALL file shows the various options. This prepares to build everything.

$ ./configure --with-shared
$ make

At this point you may go into the test directory and run the sample programs to convince yourself the ncurses build is working.

To install, become root.

# make install

Books

Programming with curses by John Strang. O'Reilly & Associates, Inc. ISBN 0-937175-02-1. This book is pretty lame.

termcap & terminfo by John Strang, Linda Mui, and Tim O'Reilly. O'Reilly & Associates, Inc. ISBN 0-937175-22-6. Fairly comprehensive information.

Advanced C Programming for Displays by Marc J. Rochkind. Prentice Hall Software Series. ISBN 0-13-010240-7. Lots of code and explains many concepts.

Other Resources

Check out the .html files in http://www.clark.net/pub/dickey/ncurses/. It contains a good Synopsis and History, Introduction, FAQ, Hacker's Guide, and Announcements.

The Linux Documentation Project has some pages about Character Cell Graphics in their Linux Programmers Guide.

Don't over look the man pages: $ man ncurses.

This page last updated 31-Mar-2010 21:59:13.
Linux Quick Help by MindPrint