Ncurses libraries and applications

Installation and configuration of ncurses libraries and applications.


This chapter describes the construction and installation of some ncurses applications and libraries in SliTaz. The procedure consists of moving into the /src directory, downloading the sources for the application in question, unpacking, reading the README or INSTALL file(s), compiling and installing the binary in SliTaz. Once the applications are installed, we can create a new initramfs, copy it to the root of the cdrom and generate a new ISO image. For this you can also use mktaziso in SliTaz tools.

Assign an environment variable ($fs)

An environmental variable can't specify the path to the directory, just the name of the directory. We will affect a variable '$fs' to indicate the path to the root filesystem (rootfs). To do this, we venture into the working directory SliTaz/, and type:

 # export fs=$PWD/rootfs

To check:

 # echo $fs

ncurses-5.6 - Terminal utilities and libraries

ncurses ( contains functions to display text in different ways on the screen of a Linux terminal and also provides the terminfo file. Ncurses libraries are used among others by retawq, nano and some games. We install the libraries in /lib and the rest in /usr/bin with a small strip to clean the executables:

 # cd src
 # wget
 # tar xzf ncurses-5.6.tar.gz
 # cd ncurses-5.6
 # ./configure --prefix=/usr \
   --libdir=/lib --sysconfdir=/etc \
   --infodir=/usr/share/info --mandir=/usr/share/man \
   --with-shared --without-debug --without-ada
 # make
 # make DESTDIR=$PWD/_pkg install
 # strip -v _pkg/lib/*
 # strip -v _pkg/usr/bin/*

Copy the libncurses library and some applications in SliTaz. The reset utility is used at the end of the rcS initialization script to remove the Linux logo. If you wish, you can copy the associated utilities (tic, tack, toe, etc), being careful not to delete the link to BusyBox:

 # cp -a _pkg/lib/* $fs/lib
 # cp -ia _pkg/usr/bin/{clear,ncurses5-config,tset,reset} \

Copy terminfo files, we only use a few files. If you want more, you can copy:

 # mkdir -v $fs/usr/share/terminfo
 # mkdir -v $fs/usr/share/terminfo/{a,l,r,v,x}
 # cp _pkg/usr/share/terminfo/a/ansi \
 # cp _pkg/usr/share/terminfo/l/linux \
 # cp _pkg/usr/share/terminfo/r/rxvt \
 # cp _pkg/usr/share/terminfo/x/{xterm,xterm-color,xterm-new,xterm-vt220} \
 # cp _pkg/usr/share/terminfo/v/{vt100,vt102*} \

Copy the tabset files:

 # cp -a _pkg/usr/share/tabset $fs/usr/share

clex-3.16 - File Manager

CLEX ( is a small ncurses file manager (160 KB). The configuration file (rc) is ~/clexrc; ~/.clexbm is used for bookmarks:

 # cd ..
 # wget
 # tar xzf clex-3.16.tar.gz
 # cd clex-3.16
 # ./configure --prefix=/usr --infodir=/usr/share/info \
 # make
 # make DESTDIR=$PWD/_pkg install
 # strip -v _pkg/usr/bin/clex

Install the clex binary in the rootfs of SliTaz:

 # cp _pkg/usr/bin/clex $fs/usr/bin


If we execute the ldd command on clex, the following dependancies should be displayed: => /lib/ (0x40025000) => /lib/ (0x40064000)
        /lib/ => /lib/ (0x40000000)

nano-2.0.6 - Advanced Text Editor

GNU nano ( is a well known, fast, effective GNU/Linux text editor that supports colored syntax. This is the default text editor in SliTaz:

 # cd ..
 # wget
 # tar xzf nano-2.0.6.tar.gz
 # cd nano-2.0.6
 # ./configure --enable-all --enable-extra --prefix=/usr \
   --infodir=/usr/share/info --mandir=/usr/share/man \
 # make
 # make DESTDIR=$PWD/_pkg install
 # strip -v _pkg/usr/bin/nano

Copy the nano binary and the rnano link in SliTaz:

 # cp -a _pkg/usr/bin/* $fs/usr/bin

Copy the configuration files in _pkg/usr/share/nano to our rootfs:

 # cp -a _pkg/usr/share/nano $fs/usr/share


If we execute the ldd command on nano, the following dependancies should be displayed: => /lib/ (0x40025000) => /lib/ (0x40064000)
        /lib/ => /lib/ (0x40000000)


About the language, you can copy the .mo files created when installing nano from /usr/share/locale/(fr,en,de,es,etc)/LC_MESSAGES to the rootfs. Example for the French language:

 # cp -a _pkg/usr/share/locale/fr/LC_MESSAGES $fs/usr/share/locale/fr

Customize nano

You can customize nano via /etc/nanorc or ~/.nanorc for each user of the system. It's in this file that you can define the colors used by nano through the files in /usr/share/nano. You will find a broad example of this file in the archive of nano and SliTaz tools.

For a system configuration file, you can copy the file in SliTaz tools to /etc in the rootfs:

 # cd ..
 # cp -a slitaz-tools-1.1/etc/nanorc $fs/etc

retawq-0.2.6c - Text mode Web browser

retawq ( is a small text-only web browser. We only flag a few useful options when configuring, retawq needs terminfo files, libncurses libraries and libthread:

 # wget
 # tar xzf retawq-0.2.6c.tar.gz
 # cd retawq-0.2.6c
 # ./configure --enable-i18n --enable-local-cgi --path-prefix=/usr \
   --path-doc=/usr/share/doc/retawq --path-man=/usr/share/man
 # make
 # strip -v retawq

Copy the retawq binary in SliTaz:

 # cp retawq $fs/usr/bin

libs => /lib/ (0x40025000) => /lib/ (0x40064000) => /lib/ (0x40074000)
        /lib/ => /lib/ (0x40000000)

You can copy the lipthread library from your host system or use the minimum package glibc-2.3.6 distributed by SliTaz:

 # cp -a /lib/libpthread* $fs/lib
 # strip --strip-unneeded $fs/lib/*


For language, you can copy the .mo files in /i18n of the retawq archive to /usr/share/locale/(fr,en,es,etc)/LC_MESSAGES. Example for the French language, renaming the file to

 # cp -v i18n/ $fs/usr/share/locale/fr/LC_MESSAGES/

Customize retawq

To personalize retawq, you can use a ~/.retawq directory containing a config file. You can also save bookmarks (html) in the root directory of the user. You will find an examples/ in the archive of retawq (or SliTaz tools) containing a bookmarks.html page with a list of favorite web sites. You can also copy the docs (/documents) from retawq to /usr/share/doc/retawq.

htop-6.0.5 - System process viewer

htop ( is software that displays system processes using ncurses.

Returning to the /src directory, download, unpack, configure, compile and clean (with strip):

 # cd ..
 # wget
 # tar xzf htop-0.6.5.tar.gz
 # cd htop-0.6.5
 # ./configure --prefix=/usr --mandir=/usr/share/man
 # make
 # make DESTDIR=$PWD/_pkg install
 # strip -v _pkg/usr/bin/htop

Copy the htop binary in SliTaz:

 # cp _pkg/usr/bin/htop $fs/usr/bin

You can still copy the htop icon found in: _pkg/usr/share/pixmaps.

libs => /lib/ (0xb7f97000) => /lib/ (0xb7f55000) => /lib/ (0xb7e20000)
        /lib/ => /lib/ (0xb7fc9000)

dialog-1.1.20070409 - GUI shell scripts

dialog (, is a utility to build GUI-based consoles:

 # cd ..
 # wget
 # tar xzf dialog.tar.gz
 # cd dialog-1.1-20070409
 # ./configure --enable-nls --with-ncurses --prefix=/usr \
   --sysconfdir=/etc --mandir=/usr/share/man
 # make
 # make DESTDIR=$PWD/_pkg install
 # strip -v _pkg/usr/bin/dialog

Copy dialog binary in SliTaz:

 # cp _pkg/usr/bin/dialog $fs/usr/bin

libs => /lib/ (0x40027000) => /lib/ (0x40066000) => /lib/ (0x40089000)
        /lib/ => /lib/ (0x40000000)


You can install locale files if you wish:

 # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale

The dialog configuration file is /etc/dialogrc and/or ~/.dialogrc for each user. There are also full examples of scripts in the /sample directory in the sources of dialog.

Ninvaders-0.1.1 - Space Invaders clone

ninvaders ( is a clone of the popular Space Invaders game (46 KB). We begin by placing ourselves in the /src directory, then we download, untar, compile, clean using strip and copy the nInvaders binary in /usr/games of SliTaz:

 # cd ..
 # wget
 # tar xzf ninvaders-0.1.1.tar.gz
 # cd ninvaders-0.1.1
 # make
 # strip -v nInvaders
 # cp nInvaders $fs/usr/games

bastet-0.41 - Bastard Tetris clone

A game of Tetris (17 KB):

 # wget
 # tar xzf bastet-0.41.tgz
 # cd bastet-0.41
 # make
 # strip bastet
 # cp bastet $fs/usr/games
 # mkdir -p $fs/var/games
 # touch $fs/var/games/bastet.scores
 # chmod 666 $fs/var/games/bastet.scores

rhapsody-0.28b - IRC chat client

Rhapsody ( is a fast and lightweight chat client supporting the IRC protocol. It provides a menu for managing servers, channels and configuration. It is therefore easy to use:

 # cd ..
 # wget
 # tar xzf rhapsody_0.28b.tgz
 # cd rhapsody-0.28b
 # ./configure -i /usr/bin -d /usr/share/doc/rhapsody
 # make
 # strip -v rhapsody

Install the binary and help files in SliTaz. We must adjust permissions on these files so that everyone can read:

 # cp rhapsody $fs/usr/bin
 # mkdir $fs/usr/share/doc/rhapsody
 # cp -a help $fs/usr/share/doc/rhapsody/help
 # chmod 644 $fs/usr/share/doc/rhapsody/help/*


Rhapsody uses the following libraries: => /lib/ (0x40026000) => /lib/ (0x40066000)
        /lib/ => /lib/ (0x40000000))

Rhapsody use the following libraries:

You can customize rhapsody via ~/.rhapsodyrc or use <Ctrl+T> for options:

Generate the initramfs and an ISO image

To create a new ISO image, you can use 'mktaziso' in SliTaz tools. Or you can create a new initramfs image, copy it to /boot in the root of the cdrom (rootcd) and finally generate an ISO image with genisoimage:

 # cd $fs
 # find . -print | cpio -o -H newc | gzip -9 > ../rootfs.gz
 # cd ..
 # cp rootfs.gz rootcd/boot
 # genisoimage -R -o slitaz-cooking.iso -b boot/isolinux/isolinux.bin \
   -c boot/isolinux/ -no-emul-boot -boot-load-size 4 \
   -V "SliTaz" -input-charset iso8859-1 -boot-info-table rootcd

Following chapter

The next chapter describes the installation of the locales and i18n.

Copyright © SliTaz - GNU General Public License;
Documentation is under GNU Free Documentation License and code is valid xHTML 1.0.