# HG changeset patch # User Paul Issott # Date 1230041423 0 # Node ID 11e425da85eb6140494dddc188cedc12c303f7f4 # Parent 161b08baab378f0703c13d7f4daeebdb1985be70 en: Add scratchbook pages diff -r 161b08baab37 -r 11e425da85eb en/doc/scratchbook/base-apps.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/en/doc/scratchbook/base-apps.html Tue Dec 23 14:10:23 2008 +0000 @@ -0,0 +1,553 @@ + + + + SliTaz Scratchbook - Base Applications + + + + + + + + + + + + + + + +
+
+ + +

Base Applications

+

+Install and configure libraries and basic applications. +

+ + +

About

+

+This chaper describes the facilities libraries and basic text applications supplied with +SliTaz. +

+

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
+
+ +

bc-1.06 - Text mode calculator

+

+The application bc (www.gnu.org/software/bc/) provides +a small calculator. When compiling the utility, dc is also built, +but not installed by SliTaz. Note that dc is also available with BusyBox. If you decide to copy dc, you +need to delete the link to BusyBox (if it exists). We use a directory _pkg (package) for installation, +use strip to clean the executables and copy the utilities: +

+
 # cd src
+ # wget http://ftp.gnu.org/pub/gnu/bc/bc-1.06.tar.gz
+ # tar xzfv bc-1.06.tar.gz
+ # cd bc-1.06
+ # ./configure --prefix=/usr --infodir=/usr/share/info \
+   --mandir=/usr/share/man
+ # make
+ # make DESTDIR=$PWD/_pkg install
+ # strip -vs _pkg/usr/bin/*
+ # cp -avi _pkg/usr/bin/bc $fs/usr/bin
+
+

libs

+

+A small ldd on bc should produce: +

+
        libc.so.6 => /lib/libc.so.6 (0x40029000)
+        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
+
+ +

zlib-1.2.3 - Compression libraries

+

+The zlib (http://www.zlib.net/) package provides compression +and decompression functions used by among others, the SSH server Dropbear and the X server: +

+
 # cd ..
+ # wget http://www.gzip.org/zlib/zlib-1.2.3.tar.bz2
+ # tar xjfv zlib-1.2.3.tar.bz2
+ # cd zlib-1.2.3
+ # ./configure --shared --prefix=/usr
+ # make
+ # strip -vs libz.so*
+ # cp -av libz.so* $fs/usr/lib
+
+ +

pcre-7.4 - Perl-compatible regular expressions

+

+The package pcre (http://www.pcre.org/) provides libraries of +functions for Perl compatible regular expressions used by among others, the web server Lighttpd: +

+
 # cd ..
+ # wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-7.4.tar.gz
+ # tar xzfv pcre-7.4.tar.gz
+ # cd pcre-7.4
+ # ./configure --prefix=/usr
+ # make
+ # make DESTDIR=$PWD/_pkg install
+ # strip -vs _pkg/usr/bin/*
+ # strip -vs _pkg/usr/lib/*
+ # cp -av _pkg/usr/bin/* $fs/usr/bin
+ # cp -av _pkg/usr/lib/*.so* $fs/usr/lib
+
+ +

e2fsprogs-1.39 - Filesystem management utilities

+

+The e3fsprogs (http://e2fsprogs.sourceforge.net/) provides +utilities for handling ext2 and ext3 filesystems. We will not take all of them because we need the space. +It should be noted that we use fsck of BusyBox: +

+
 # cd ..
+ # wget http://puzzle.dl.sourceforge.net/sourceforge/e2fsprogs/e2fsprogs-1.39.tar.gz
+ # tar xzf e2fsprogs-1.39.tar.gz
+ # cd e2fsprogs-1.39
+ # ./configure --prefix=/usr --with-root-prefix="" \
+   --enable-elf-shlibs --disable-evms --sysconfdir=/etc \
+   --infodir=/usr/share/info --mandir=/usr/share/man
+ # make
+ # make DESTDIR=$PWD/_pkg install
+ # strip -vs _pkg/sbin/*
+ # strip -vs _pkg/lib/*
+ # strip -vs _pkg/usr/bin/*
+ # strip -vs _pkg/usr/sbin/*
+ # strip -vs _pkg/usr/lib/*
+
+

+Install the utilities, configuration files and libraries in the rootfs of SliTaz. Be careful if you +used fsck, that you didn't destroy the link to BusyBox: +

+
 # cp -i _pkg/sbin/{badblocks,blkid,dumpe2fs,e2fsck,e2image} $fs/sbin
+ # cp -i _pkg/sbin/{e2label,findfs,logsave,mke2fs,mkfs.*} $fs/sbin
+ # cp -i _pkg/sbin/{resize2fs,tune2fs} $fs/sbin
+ # cp -a _pkg/lib/* $fs/lib
+ # rm -rf $fs/lib/libss*
+ # cp -a _pkg/etc/* $fs/etc
+ # cp -a _pkg/usr/bin/* $fs/usr/bin
+ # cp -a _pkg/usr/sbin/* $fs/usr/sbin
+ # cp -ad _pkg/usr/lib/*.so $fs/usr/lib
+ # rm -rf $fs/usr/lib/libss*
+
+

+You can also copy files from the French locale: +

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

Dropbear-0.50 - Lightweight SSH client and server

+

+Dropbear (http://matt.ucc.asn.au/dropbear/dropbear.html) +is a small secure client/server supporting SSH 2. Dropbear is compatible with +OpenSSH and uses ~/.ssh/authorized_keys for the management of public keys. Dropbear also +provides a version of scp, which must be compiled with 'make scp': +

+
 # cd ..
+ # wget http://matt.ucc.asn.au/dropbear/releases/dropbear-0.50.tar.gz
+ # tar xzf dropbear-0.50.tar.gz
+ # cd dropbear-0.50
+ # ./configure --prefix=/usr
+ # make
+ # make scp
+ # make DESTDIR=$PWD/_pkg install
+ # strip -v scp
+ # strip -v _pkg/usr/bin/*
+ # strip -v _pkg/usr/sbin/*
+
+

+Install the client and tools in /usr/bin, and the server in /usr/sbin: +

+
 # cp scp $fs/usr/bin
+ # cp -a _pkg/usr/bin/* $fs/usr/bin
+ # cp -a _pkg/usr/sbin/* $fs/usr/sbin
+
+

libs

+
        libutil.so.1 => /lib/libutil.so.1 (0x40025000)
+        libz.so.1 => /usr/lib/libz.so.1 (0x40028000)
+        libcrypt.so.1 => /lib/libcrypt.so.1 (0x4003b000)
+        libc.so.6 => /lib/libc.so.6 (0x40068000)
+        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
+
+

+Copy the library libutil.so.1 to $fs/lib, is this is not already the case. Other libraries +should be present following the construction of the base system: +

+
 # cp -a /lib/libutil* $fs/lib
+
+

Configure Dropbear

+

+The user configuration files authorized_keys and known_hosts are in ~/.ssh. This directory and the +file known_hosts are created automatically the first time the user launches dbclient. The system +configuration files for the Dropbear server are in /etc/Dropbear: +

+
 # mkdir $fs/etc/dropbear
+
+

+You must generate the secure keys before starting the Dropbear server on SliTaz. +You can use dropbearkey with the following commands: +

+
 # dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key
+ # dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key
+
+

+On SliTaz, you can start the SSH server with the command: +

+
 # /etc/init.d/dropbear start
+
+ +

lighttpd-1.4.18 - HTTP Web server

+

+Lighttpd (www.lighttpd.net) is a light, secure and powerful web server. +The project is very active and the server's configuration simple. It supports virtual hosts, CGI scripts, +and allows intelligent management of the CPU: +

+
 # cd ..
+ # wget http://www.lighttpd.net/download/lighttpd-1.4.18.tar.gz
+ # tar xzf lighttpd-1.4.18.tar.gz
+ # cd lighttpd-1.4.18
+ # ./configure -enable-shared --disable-ipv6 --prefix=/usr \
+   --libdir=/usr/lib/lighttpd --mandir=/usr/share/man
+ # make
+ # make DESTDIR=$PWD/_pkg install
+ # strip -vs _pkg/usr/bin/*
+ # strip -vs _pkg/usr/sbin/*
+ # strip -vs _pkg/usr/lib/lighttpd/*
+
+

+Install the server and generated libraries. We will then copy some of the modules (9): +

+
 # cp _pkg/usr/bin/* $fs/usr/bin
+ # cp _pkg/usr/sbin/* $fs/usr/sbin
+ # mkdir $fs/usr/lib/lighttpd
+ Modules :
+ # cp _pkg/usr/lib/lighttpd/mod_access.so $fs/usr/lib/lighttpd
+ # cp _pkg/usr/lib/lighttpd/mod_accesslog.so $fs/usr/lib/lighttpd
+ # cp _pkg/usr/lib/lighttpd/mod_alias.so $fs/usr/lib/lighttpd
+ # cp _pkg/usr/lib/lighttpd/mod_auth.so $fs/usr/lib/lighttpd
+ # cp _pkg/usr/lib/lighttpd/mod_cgi.so $fs/usr/lib/lighttpd
+ # cp _pkg/usr/lib/lighttpd/mod_compress.so $fs/usr/lib/lighttpd
+ # cp _pkg/usr/lib/lighttpd/mod_rewrite.so $fs/usr/lib/lighttpd
+ # cp _pkg/usr/lib/lighttpd/mod_status.so $fs/usr/lib/lighttpd
+ # cp _pkg/usr/lib/lighttpd/mod_userdir.so $fs/usr/lib/lighttpd
+
+

libs

+

+There should be a libdl.so.2 library; if missing, we can copy: +

+
 # cp -a /lib/libdl* $fs/lib
+
+

/var/www - root of documents served

+

+/var/www is the root directory of documents served by default. You can access this via the url http://localhost/. +This directory contains an index.html automatically displayed by a query. +We will create the directory /var/www, to see what's placed inside: +

+
 # mkdir -p $fs/var/www
+
+

lighttpd.conf - Lighttpd configuration file

+

+The Lighttpd main configuration file is located at /etc/lighttpd and is called lighttpd.conf. +The configuration file SliTaz provides is self-explanatary, just browse. You can find other examples on the +Lighttpd website and as well as a example configuration in /doc in the Lighttpd archive: +

+
 # cp -a ../slitaz-tools-1.1/etc/lighttpd $fs/etc
+
+

+Creating the directory containing the log files: +

+
 # mkdir $fs/var/log/lighttpd
+
+

User and group www

+

+We will add a user and a group for the web server, it adds security and there is no reason for it to be run a root. +The default user on SliTaz is 'www', but you can change this in the configuration file lighttpd.conf. +The BusyBox application adduser has some limitations, so we add user 'www' manually. We also change permissions on +the directory of web server logs: +

+
 # echo "www:x:80:80:www:/var/www:/bin/sh" >> $fs/etc/passwd
+ # echo "www:*:13509:0:99999:7:::" >> $fs/etc/shadow
+ # echo "www:*:13509:0:99999:7:::" >> $fs/etc/shadow-
+ # chroot $fs /bin/ash
+ /# addgroup -g 80 www
+ /# chown www.www /var/log/lighttpd
+ # exit
+
+

+To start the web server, you can use script /etc/init.d/lighttpd provided by SliTaz tools, by typing: +/etc/init.d/lighttpd start. You can also automate its +launch at boot with a link /etc/init.d/lighttpd pointing to /etc/rc.d/60lighttpd. +

+ +

iptables-1.3.7 - Netfilter, Linux firewall

+

+Netfilter (www.netfilter.org) is the module which provides the Linux +kernel firewall functions, shared internet connections (NAT) and the archiving of network traffic. +The iptables command allows you to configure Netfilter using iptables-restore +and iptable-save, to save and restore the Netfilter configuration: +

+
 # cd ..
+ # wget http://www.netfilter.org/projects/iptables/files/iptables-1.3.7.tar.bz2
+ # tar xjf iptables-1.3.7.tar.bz2
+ # cd iptables-1.3.7
+ # make KERNEL_DIR=../linux-2.6.20 BINDIR=/sbin \
+   LIBDIR=/lib MANDIR=/usr/share/man
+ # make KERNEL_DIR=../linux-2.6.20 BINDIR=/sbin \
+   LIBDIR=/lib MANDIR=/usr/share/man \
+   DESTDIR=$PWD/_pkg install
+ # strip  _pkg/sbin/*
+ # strip  _pkg/lib/iptables/*
+
+

+Installing the iptables* applications and libraries sufficient for a basic firewall: +

+
 # cp -a _pkg/sbin/iptables* $fs/sbin
+ # mkdir $fs/lib/iptables
+ # cp -a _pkg/lib/iptables/{libipt_standard.so,libipt_conntrack.so} \
+   $fs/lib/iptables
+ # cp -a _pkg/lib/iptables/{libipt_tcp.so,libipt_udp.so} $fs/lib/iptables
+
+

+To satisfy the iptables dependencies, you must copy the libnsl* library: +

+
 # cp -va /lib/libnsl* $fs/lib/tls
+ # strip $fs/lib/libnsl*
+
+ +

sqlite-3.5.1 - Small SQL database engine

+

+This package provides sqlite3 (www.sqlite.org) and sqlite3.so* +libraries. SQLite is fast and efficient and integrates directly to programs using database files: +

+
 # cd ..
+ # wget http://www.sqlite.org/sqlite-3.5.1.tar.gz
+ # tar xzf sqlite-3.5.1.tar.gz
+ # cd sqlite-3.5.1
+ # ./configure --prefix=/usr --disable-tcl
+ # make
+ # make DESTDIR=$PWD/_pkg install
+ # strip _pkg/usr/lib/*.so*
+ # strip _pkg/usr/bin/*
+
+

+Installing the sqlite3 utility and libraries in the rootfs of SliTaz: +

+
 # cp -a _pkg/usr/lib/*.so* $fs/usr/lib
+ # cp -a _pkg/usr/bin/* $fs/usr/bin
+
+ +

cdrkit-1.1.5 - Tools for manipulating cdrom and ISO images

+

+cdrkit (www.cdrkit.org) provides tools for manipulating cdroms. +SliTaz installs by default wodim for burning and genisoimage to create an ISO image. +The compilation is a bit different (cmake), but shouldn't pose any problems: +

+
 # cd ..
+ # wget http://cdrkit.org/releases/cdrkit-1.1.5.tar.gz
+ # tar xzf cdrkit-1.1.5.tar.gz
+ # cd cdrkit-1.1.5
+ # make
+ # make install PREFIX=$PWD/_pkg/usr
+ # strip -v _pkg/usr/bin/*
+ # strip -v _pkg/usr/sbin/*
+ # cp _pkg/usr/bin/genisoimage $fs/usr/bin
+ # cp _pkg/usr/bin/wodim $fs/usr/bin
+
+

+Copy the library libcap.so.1 required by wodim: +

+
 # cp -a /lib/libcap.so* $fs/lib
+
+ +

cpio-2.8 - Archiver

+

+cpio (http://www.gnu.org/software/cpio/) provides tools for +manipulating cpio archives. The archive format is used for packages and the SliTaz initramfs image of the cdrom. +Note that BusyBox provides a version of cpio that only unpacks archives: +

+
 # cd ..
+ # wget ftp://sunsite.cnlab-switch.ch/mirror/gnu/cpio/cpio-2.8.tar.gz
+ # tar xzf cpio-2.8.tar.gz
+ # cd cpio-2.8
+ # ./configure --prefix=/usr --bindir=/bin \
+   --libexecdir=/usr/bin --mandir=/usr/share/man \
+   --infodir=/usr/share/info
+ # make
+ # make DESTDIR=$PWD/_pkg install
+ # strip -v _pkg/bin/*
+ # strip -v _pkg/usr/bin/*
+
+

+Installing cpio in /bin and rmt in /usr/bin. You can also install the French locale files: +

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

microperl-5.8.8 - A tiny Perl

+

+Microperl is a tiny implementation of Perl using the most basic functions of the language. +You can find more info in the source archive and the file README.micro. +We use a small sed on the configuration file that searches for microperl modules +in /usr/lib/perl5. We also create a link to the #! /usr/bin/perl script: +

+
 # wget http://ftp.funet.fi/pub/CPAN/src/perl-5.8.8.tar.gz
+ # tar xzf perl-5.8.8.tar.gz
+ # cd perl-5.8.8
+ # sed -i s/'usr\/local'/'usr'/ uconfig.sh
+ # sed -i s/'perl5\/5.9'/'perl5'/ uconfig.sh
+ # sed -i s/'unknown'/'i486-pc-linux-gnu'/ uconfig.sh
+ # make -f Makefile.micro regen_uconfig
+ # make -f Makefile.micro
+ # strip microperl
+ # cp microperl $fs/usr/bin
+ # chroot $fs /bin/ash
+ /# cd /usr/bin
+ /# ln -s microperl perl
+ /# exit
+
+ +

module-init-tools-3.2 - Utilities for manipulating kernel modules

+

+The module-init-tools +from kernel.org: modprobe, insmod, rmmod and lsmod. We have chosen to use these because we can compile +modutils/modprobe to support compressed (.gz) modules to save space. To do this we use the option +--enable-zlib, we then clean and copy the binaries. We do not take everything that has been created, +only what we need: depmod, insmod, modinfo, modprobe and rmmod in /sbin and lsmod in /bin: +

+
 # cd ..
+ # wget http://ftp.kernel.org/pub/linux/utils/kernel/module-init-tools/module-init-tools-3.2.tar.bz2
+ # tar xjf module-init-tools-3.2.tar.bz2
+ # cd module-init-tools-3.2
+ # ./configure --enable-zlib --prefix=/usr --sbindir=/sbin --bindir=/bin \
+   --sysconfdir=/etc --infodir=/usr/share/info --mandir=/usr/share/man
+ # make
+ # make DESTDIR=$PWD/_pkg install
+ # strip -v _pkg/sbin/{depmod,insmod,modinfo,modprobe,rmmod}
+ # strip -v _pkg/bin/lsmod
+ # cp -i _pkg/sbin/{depmod,insmod,modinfo,modprobe,rmmod} $fs/sbin
+ # cp -i _pkg/bin/lsmod $fs/bin
+ # cd ..
+
+ +

Copy kernel modules

+

+Copy files from linux-2.6.20/_pkg: +

+
 # cp -a linux-2.6.20/_pkg/lib/* $fs/lib
+
+

Compress kernel modules

+

+Compress modules, this step will us gain back around 50% of available space. +We begin by moving into the rootfs, then we search for all files with the +.ko extension, and compress them. You +can also do this with the 'gzmodtaz.sh' script found in SliTaz tools: +

+
 # cd $fs
+
+

+With 'gztazmod.sh': +

+
 # cp -v ../src/slitaz-tools-1.1/utils/gztazmod.sh sbin
+ # ./sbin/gztazmod.sh lib/modules/2.6.20-slitaz
+
+

+Or by hand: +

+
 # cd lib/modules/2.6.20-slitaz
+ # find . -name "*.ko" -exec gzip '{}' \;
+ # sed 's/\.ko/.ko.gz/g' modules.dep > tmp.dep
+ # rm modules.dep
+ # mv tmp.dep modules.dep
+
+ +

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-test.iso -b boot/isolinux/isolinux.bin \
+   -c boot/isolinux/boot.cat -no-emul-boot -boot-load-size 4 \
+   -V "SliTaz" -input-charset iso8859-1 -boot-info-table rootcd
+
+

+Test iso image: +

+
 # qemu -cdrom slitaz-test.iso
+
+ +

Following chapter

+

+The next chapter is called Base Ncurses. It +covers the installation and configuration of the ncurses libraries and +applications. +

+ + +
+ + + + +
+ Copyright © 2008 SliTaz - + GNU General Public License;
+ Documentation is under + GNU Free Documentation License + and code is valid xHTML 1.0. +
+ + + diff -r 161b08baab37 -r 11e425da85eb en/doc/scratchbook/base-ncurses.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/en/doc/scratchbook/base-ncurses.html Tue Dec 23 14:10:23 2008 +0000 @@ -0,0 +1,444 @@ + + + + SliTaz Scratchbook - Base Ncurses + + + + + + + + + + + + + + + +
+
+ + +

Ncurses libraries and applications

+

+Installation and configuration of ncurses libraries and applications. +

+ + +

About

+

+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 (dickey.his.com/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 ftp://invisible-island.net/ncurses/ncurses-5.6.tar.gz
+ # 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 libcurses 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/libncurses.so* $fs/lib
+ # cp -ia _pkg/usr/bin/{clear,ncurses5-config,tset,reset} \
+   $fs/usr/bin
+
+

+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 \
+   $fs/usr/share/terminfo/a
+ # cp _pkg/usr/share/terminfo/l/linux \
+   $fs/usr/share/terminfo/l
+ # cp _pkg/usr/share/terminfo/r/rxvt \
+   $fs/usr/share/terminfo/r
+ # cp _pkg/usr/share/terminfo/x/{xterm,xterm-color,xterm-new,xterm-vt220} \
+   $fs/usr/share/terminfo/x
+ # cp _pkg/usr/share/terminfo/v/{vt100,vt102*} \
+   $fs/usr/share/terminfo/v
+
+

+Copy the tabset files: +

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

clex-3.16 - File Manager

+

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

+
 # cd ..
+ # wget http://www.clex.sk/download/clex-3.16.tar.gz
+ # tar xzf clex-3.16.tar.gz
+ # cd clex-3.16
+ # ./configure --prefix=/usr --infodir=/usr/share/info \
+   --mandir=/usr/share/man
+ # 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
+
+

libs

+

+If we execute the ldd command on clex, the following dependancies should be displayed: +

+
        libncurses.so.5 => /lib/libncurses.so.5 (0x40025000)
+        libc.so.6 => /lib/libc.so.6 (0x40064000)
+        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
+
+ +

nano-2.0.6 - Advanced Text Editor

+

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

+
 # cd ..
+ # wget http://www.nano-editor.org/dist/v2.0/nano-2.0.6.tar.gz
+ # 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 \
+   --sysconfdir=/etc
+ # 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
+
+

libs

+

+If we execute the ldd command on nano, the following dependancies +should be displayed: +

+
        libncurses.so.5 => /lib/libncurses.so.5 (0x40025000)
+        libc.so.6 => /lib/libc.so.6 (0x40064000)
+        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
+
+

locale

+

+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 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 (retawq.sourceforge.net) +is a small text-only web browser. We only flag a few useful options when configuring, +retawq needs terminfo files, libcurses libraries and libthread: +

+
 # wget http://switch.dl.sourceforge.net/sourceforge/retawq/retawq-0.2.6c.tar.gz
+ # 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

+
        libncurses.so.5 => /lib/libncurses.so.5 (0x40025000)
+        libpthread.so.0 => /lib/libpthread.so.0 (0x40064000)
+        libc.so.6 => /lib/libc.so.6 (0x40074000)
+        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (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/*
+
+

locale

+

+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 retawq.mo: +

+
 # cp -v i18n/fr.mo $fs/usr/share/locale/fr/LC_MESSAGES/retawq.mo
+
+

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 (htop.sourceforge.net/) is software +that displays system processes using ncurses. +

+

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

+
 # cd ..
+ # wget http://switch.dl.sourceforge.net/sourceforge/htop/htop-0.6.5.tar.gz
+ # 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

+
        libm.so.6 => /lib/libm.so.6 (0xb7f97000)
+        libncurses.so.5 => /lib/libncurses.so.5 (0xb7f55000)
+        libc.so.6 => /lib/libc.so.6 (0xb7e20000)
+        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0xb7fc9000)
+
+ +

dialog-1.1.20070409 - GUI shell scripts

+

+ +dialog (invisible-island.net/dialog/dialog.html), +is a utility to build GUI-based consoles: +

+
 # cd ..
+ # wget ftp://invisible-island.net/dialog/dialog.tar.gz
+ # 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

+
        libncurses.so.5 => /lib/libncurses.so.5 (0x40027000)
+        libm.so.6 => /lib/libm.so.6 (0x40066000)
+        libc.so.6 => /lib/libc.so.6 (0x40089000)
+        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
+
+

locale

+

+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 (http://ninvaders.sourceforge.net/) +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 http://ovh.dl.sourceforge.net/sourceforge/ninvaders/ninvaders-0.1.1.tar.gz
+ # 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 http://fph.altervista.org/prog/bastet-0.41.tgz
+ # 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 (http://rhapsody.sourceforge.net/) +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 http://switch.dl.sourceforge.net/sourceforge/rhapsody/rhapsody_0.28b.tgz
+ # 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/*
+
+

libs

+

+Rhapsody uses the following libraries: +

+
        libncurses.so.5 => /lib/libncurses.so.5 (0x40026000)
+        libc.so.6 => /lib/libc.so.6 (0x40066000)
+        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (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/boot.cat -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 © 2008 SliTaz - + GNU General Public License;
+ Documentation is under + GNU Free Documentation License + and code is valid xHTML 1.0. +
+ + + diff -r 161b08baab37 -r 11e425da85eb en/doc/scratchbook/base-system.html --- a/en/doc/scratchbook/base-system.html Fri Dec 19 12:31:56 2008 +0100 +++ b/en/doc/scratchbook/base-system.html Tue Dec 23 14:10:23 2008 +0000 @@ -18,8 +18,8 @@ @@ -647,6 +647,11 @@

# qemu -cdrom slitaz-cooking.iso
 
+

Following chapter

+

+The next chapter Base applications provides all the instructions to install +and configure the basic applications and libraries. +

diff -r 161b08baab37 -r 11e425da85eb en/doc/scratchbook/boot-scripts.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/en/doc/scratchbook/boot-scripts.html Tue Dec 23 14:10:23 2008 +0000 @@ -0,0 +1,207 @@ + + + + SliTaz Scratchbook - Boot Scripts + + + + + + + + + + + + + + + +
+
+ +

Boot scripts

+

+The startup and shutdown scripts with their configuration files. +

+ + + + +

SliTaz and startup

+ +

+SliTaz does not use a level of execution (runlevel), the +system is initialized via a primary script and its main +configuration file. This script itself launches some other smaller +scripts which deal with the internationalization or the +commands placed for the system to start. +

+ + +

/etc/init.d/* - Directory of scripts and daemons

+

+The directory /etc/init.d contains all of the rc scripts, +scripts finishing with '.sh' are simple shell scripts and +daemons such as 'dropbear' or 'lighttpd' are scripts +that launch a service. The daemon scripts can start, stop or +restart through the command: +

+
 # /etc/init.d/daemon [start|stop|restart]
+
+

+On SliTaz you will find a /etc/init.d/README describing the +basic function of rc scripts. Also note that all startup +scripts and daemons can call upon the /etc/init.d/rc.functions +file. This file makes it possible to include various functions +in rc scripts. SliTaz uses a function status to check whether +the previous command has succeeded (0) or not. +

+ + +

/etc/init.d/rcS - Primary initialization script

+

+The /etc/init.d/rcS script configures all the +basic services and initializes the base system. It begins by +mounting the filesystems and starts services like syslogd, klogd, +mdev and cleans up the system and so on. It +uses the configuration file /etc/rcS.conf to locate which daemons +and scripts to launch at startup. You can browse the script +to know which commands are executed: +

+
 # nano rootfs/etc/init.d/rcS 
+
+ + + +

Specific scripts and daemons

+ +

bootopts.sh - LiveCD mode options

+

+This script is used to configure the LiveCD options passed +at boot time and is readable via the /proc/cmdline file. +This is the script that allows you to use a USB key or +external hard disk /home partition with the option home=usb +or home=sda[1-9] or directly specify the language and +keyboard parameters. +

+ +

network.sh - Initializing the network

+

+This script searches the network.sh configuration file +/etc/network.conf for the network interface to use; if one wants to +launch the DHCP client (or not) or if you want to use a fixed +(static) IP. On SliTaz the /etc/init.d/network.sh +script configures the network interfaces to start using the +information contained in /etc/network.conf. If the variable +$DHCP is equal to yes, then the /etc/init.d/network.sh +script launches the DHCP client on the $INTERFACE interface. +

+ +

i18n.sh - Internationalization

+

+SliTaz backs up the configuration of the default locale in +/etc/locale.conf which is read by /etc/profile at each +login. The /etc/locale.conf is generated during boot time +thanks to the /etc/i18n.sh script. This script launches the +'tazlocale' application if /etc/locale.conf doesn't exist. +We use the same process for the keyboard layout using 'tazkmap' +and the /etc/kmap.conf configuration file. Both applications +are installed and located in /sbin and use dialog and the +ncurses library. The script also checks whether the +configuration file for the time zone /etc/TZ exists, +otherwise it creates one relying on the keyboard configuration. +

+ +

local.sh - Local commands

+

+The /etc/init.d/local.sh script allows the system administrator +to add local commands to be executed at boot. Example: +

+
#!/bin/sh
+# /etc/init.d/local.sh: Local startup commands.
+# All commands here will be executed at boot time.
+#
+. /etc/init.d/rc.functions
+
+echo "Starting local startup commands... "
+
+
+ +

rc.shutdown

+

+This script is invoked by /etc/inittab during system shutdown. +It also stops all daemons via the variable RUN_DAEMONS in +the primary /etc/rcS.conf configuration file. +

+ + +

/etc/inittab - Configuration file init

+

+The first file read by the Kernel at boot. It defines the +initialization script (/etc/init.d/rcS), shells (ttys) and +actions in the event of a reboot or disruption. You will find +a complete example with accompanying notes in SliTaz tools: +

+
# /etc/inittab: init configuration for SliTaz GNU/Linux.
+# Boot-time system configuration/initialization script.
+#
+::sysinit:/etc/init.d/rcS
+
+# /sbin/getty respawn shell invocations for selected ttys.
+tty1::respawn:/sbin/getty 38400 tty1
+tty2::respawn:/sbin/getty 38400 tty2
+tty3::respawn:/sbin/getty 38400 tty3
+tty4::respawn:/sbin/getty 38400 tty4
+tty5::respawn:/sbin/getty 38400 tty5
+tty6::respawn:/sbin/getty 38400 tty6
+
+# Stuff to do when restarting the init 
+# process, or before rebooting.
+::restart:/etc/init.d/rc.shutdown
+::restart:/sbin/init
+::ctrlaltdel:/sbin/reboot
+::shutdown:/etc/init.d/rc.shutdown
+
+
+

Following chapter

+

+The next chapter continues on with the X window system. +

+ + +
+ + + + +
+ Copyright © 2008 SliTaz - + GNU General Public License;
+ Documentation is under + GNU Free Documentation License + and code is valid xHTML 1.0. +
+ + + diff -r 161b08baab37 -r 11e425da85eb en/doc/scratchbook/gtk-apps.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/en/doc/scratchbook/gtk-apps.html Tue Dec 23 14:10:23 2008 +0000 @@ -0,0 +1,303 @@ + + + + SliTaz Scratchbook - GTK+ Applications + + + + + + + + + + + + + + + +
+
+ + +

GTK+ Applications

+

+Compiliation and installation of applications using GTK+. +

+ + +

About

+

+This chapter describes the commands for the compilation and installation of +GTK+ applications distributed by default on the SliTaz LiveCD. The installation +of GTK+ libraries are described in the +GTK+ libs chapter. +

+

Environmental variable ($fs)

+

+If you do not specify any path to the rootfs directory, export the environmental variable: +

+
 # export fs=$PWD/rootfs
+
+

+To check: +

+
 # echo $fs
+
+ +

leafpad-0.8.10 - Simple text editor

+

+Website: http://tarot.freeshell.org/leafpad/ +

+
 # wget http://savannah.nongnu.org/download/leafpad/leafpad-0.8.10.tar.gz
+ # tar xzf leafpad-0.8.10.tar.gz
+ # cd leafpad-0.8.10
+ # ./configure --prefix=/usr
+ # make
+ # make DESTDIR=$PWD/_pkg install
+ # strip _pkg/usr/bin/*
+
+

Install in rootfs

+
 # cp _pkg/usr/bin/* $fs/usr/bin
+ # cp _pkg/usr/share/pixmaps/leafpad.png $fs/usr/share/pixmaps
+ # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
+
+ +

gitmail-0.4 - Ghost In The Mail, mail client

+

+Ghost in the mail allows users to quickly and easily send mail via SMTP. +

+

+Website: http://gitmail.sourceforge.net/ +

+
 # wget http://switch.dl.sourceforge.net/sourceforge/gitmail/gitmail-0.4.tar.gz
+ # tar xzf gitmail-0.4.tar.gz
+ # cd GhostInTheMail-0.4
+ # ./configure --prefix=/usr
+ # make
+ # make DESTDIR=$PWD/_pkg \
+   gitmaildocdir=/usr/share/doc/GhostInTheMail \
+   install
+ # strip _pkg/usr/bin/*
+
+

Install in rootfs

+
 # cp _pkg/usr/bin/* $fs/usr/bin
+
+ +

gqview-2.0.4 - Images Manager

+

+Website: http://gqview.sourceforge.net/ +

+
 # wget http://belnet.dl.sourceforge.net/sourceforge/gqview/gqview-2.0.4.tar.gz
+ # tar xzf gqview-2.0.4.tar.gz
+ # cd gqview-2.0.4
+ # ./configure --prefix=/usr --mandir=/usr/share/man
+ # make
+ # make DESTDIR=$PWD/_pkg install
+ # strip _pkg/usr/bin/*
+
+

Install in rootfs

+
 # cp _pkg/usr/bin/* $fs/usr/bin
+ # cp _pkg/usr/share/pixmaps/* $fs/usr/share/pixmaps
+ # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
+
+ +

mtpaint-3.11 - Image creation and processing

+

+Website: http://mtpaint.sourceforge.net/ +

+
 # wget http://switch.dl.sourceforge.net/sourceforge/mtpaint/mtpaint-3.11.tar.bz2
+ # tar xjf mtpaint-3.11.tar.bz2
+ # cd mtpaint-3.11
+ # ./configure --cpu=i486 --prefix=/usr intl
+ # make
+ # strip src/mtpaint
+
+

Install in rootfs

+
 # cp src/mtpaint $fs/usr/bin
+ # cp po/fr.mo $fs/usr/share/locale/fr/LC_MESSAGES/mtpaint.mo
+ # cp src/icons1/icon.xpm $fs/usr/share/pixmaps/mtpaint.xpm
+
+ +

Transmission-0.72 - Lightweight BitTorrent client

+

+Tranmission BitTorrent client is fast, lightweight and easy to use. The compiled package provides +the command line client (transmissioncli) and a GTK+ client (transmission-gtk). We install the GTK+ client, +the command line client is distributed as a separate SliTaz package (*.tazpkg). +

+

+Website: http://transmission.m0k.org/ +

+
 # wget http://download.m0k.org/transmission/files/Transmission-0.72.tar.gz
+ # tar xzf Transmission-0.72.tar.gz
+
+ La version 0.72 est mal archivée:
+ # mv "Transmission .72" Transmission-0.72
+
+ # cd Transmission-0.72
+ # ./configure --prefix=/usr  --disable-openssl
+ # make
+ # strip gtk/transmission-gtk
+ # strip cli/transmissioncli
+
+

Install in rootfs

+
 # cp gtk/transmission-gtk $fs/usr/bin
+ # cp gtk/transmission.png $fs/usr/share/pixmaps
+ # cp gtk/po/fr.mo $fs/usr/share/locale/fr/LC_MESSAGES/transmission-gtk.mo
+
+ +

emelfm2-0.3.5 - File Manager

+

+The emelFM2 application is a file manager providing lots of useful functions, such as mounting +devices, a text viewer, opening a terminal in the current directory and so on. +

+

+Website: http://emelfm2.net/ +

+
 # cd ..
+ # wget http://emelfm2.net/rel/emelfm2-0.3.5.tar.gz
+ # tar xzf emelfm2-0.3.5.tar.gz
+ # cd emelfm2-0.3.5
+ # make PREFIX=/usr
+ # make i18n PREFIX=/usr
+ # make install PREFIX=$PWD/_pkg/usr
+ # make install_i18n PREFIX=$PWD/_pkg/usr
+ # strip -v _pkg/usr/bin/*
+ # strip -v _pkg/usr/lib/emelfm2/plugins/*
+
+

Install in rootfs

+
 # cp _pkg/usr/bin/* $fs/usr/bin
+ # cp -a _pkg/usr/lib/* $fs/usr/lib
+ # cp -a _pkg/usr/share/pixmaps $fs/usr/share
+ # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
+
+ +

geany-0.11 - Integrated Development Environment

+

+Geany is a simple, fast and light IDE offering colored syntax, tabs, autocompletion, aids to scripts and much more. +

+

+Website: http://geany.uvena.de/ +

+

+To compile and run geany on SliTaz, you must have the libstdc++ and libgcc1 libraries, +both provided by gcc (we recompiled with gcc-4.1.1), but you can copy the libraries from the host system. +

+

+Note: The force is with you, if you activate it via the option --enable-the-force. +

+
 # wget http://mesh.dl.sourceforge.net/sourceforge/geany/geany-0.11.tar.gz
+ # tar xzf geany-0.11.tar.gz
+ # cd geany-0.11
+ # ./configure --prefix=/usr --mandir=/usr/share/man \
+   --disable-vte --enable-the-force
+ # make
+ # make DESTDIR=$PWD/_pkg install
+ # strip -v _pkg/usr/bin/*
+
+

Install in rootfs

+
 # cp _pkg/usr/bin/* $fs/usr/bin
+ # cp -a _pkg/usr/share/geany $fs/usr/share
+ # cp _pkg/usr/share/pixmaps/geany.png $fs/usr/share/pixmaps
+ # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
+
+ +

gftp-2.0.18 - Fast and simple FTP client

+

+The gFTP application is a fast and efficient FTP client with a GTK+ graphical interface. +Note that we compile without support for a text interface and ssl support. Get, untar, +configure, compile and install. +

+

+Website: http://www.gftp.org/ +

+
 # wget http://www.gftp.org/gftp-2.0.18.tar.gz
+ # tar xzf gftp-2.0.18.tar.gz
+ # cd gftp-2.0.18
+ # ./configure --prefix=/usr --mandir=/usr/share/man \
+   --disable-ssl --disable-textport \
+   --build=i486-pc-linux-gnu --host=i486-pc-linux-gnu
+ # make
+ # make DESTDIR=$PWD/_pkg install
+ # strip _pkg/usr/bin/*
+
+

Install in rootfs

+

+SliTaz provides only the GTK+ client on the CD. Note that gftp is just a small +script that detects the environment (console or X) and launches the right interface: +

+
 # cp _pkg/usr/bin/gftp $fs/usr/bin
+ # cp _pkg/usr/bin/gftp-gtk $fs/usr/bin
+ # cp -a _pkg/usr/share/gftp $fs/usr/share
+ # cp -a _pkg/usr/share/pixmaps $fs/usr/share
+ # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
+
+

+To save a little space and avoid duplication, you can delete 'COPYING' (17 KB) +included in /usr/share/gftp. The GNU licence is already present in /usr/share/licence, +if you want to create a symbolic link. +

+ +

xpad-2.12 - Mini note taking application

+

+The Xpad application can quickly take notes via various customizable (GTK+) windows. +

+

+Website: http://xpad.sourceforge.net/ +

+
 # wget http://surfnet.dl.sourceforge.net/sourceforge/xpad/xpad-2.12.tar.bz2
+ # tar xjf xpad-2.12.tar.bz2
+ # cd xpad-2.12
+ # ./configure --prefix=/usr --mandir=/usr/share/man \
+   --build=i486-pc-linux-gnu --host=i486-pc-linux-gnu
+ # make
+ # make DESTDIR=$PWD/_pkg install
+ # strip _pkg/usr/bin/*
+
+

Install in rootfs

+
 # cp _pkg/usr/bin/xpad $fs/usr/bin
+ # cp -a _pkg/usr/share/pixmaps $fs/usr/share
+ # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
+
+ + + +
+ + + + +
+ Copyright © 2008 SliTaz - + GNU General Public License;
+ Documentation is under + GNU Free Documentation License + and code is valid xHTML 1.0. +
+ + + diff -r 161b08baab37 -r 11e425da85eb en/doc/scratchbook/gtk-libs.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/en/doc/scratchbook/gtk-libs.html Tue Dec 23 14:10:23 2008 +0000 @@ -0,0 +1,251 @@ + + + + SliTaz Scratchbook - GTK+ Libraries + + + + + + + + + + + + + + + +
+
+ + +

GTK+ Libraries

+

+Compilation and installation of GTK+ packages and libraries. +

+ + +

About

+

+This chapter describes the installation and configuration of GTK libraries +on SliTaz used by lots of free software. Note that you can simply compile and +create a SliTaz package that you can install on demand with tazpkg. +

+

+The compilation of GTK applications can take quite some time and you must meet many dependencies. +You will find a guide in English: +gtk-building.html on developer.gnome.org. +This document sets out the need to compile things in order: Glib, Pango, ATK and GTK+, etc. +Before commencing you must verify that the dependencies are properly installed on your host system. +Glib, Pango, ATK and GTK+ form a group of packages and are distributed by the team of GTK developers. +

+

Environmental variable ($fs)

+

+If you do not specify any path to the rootfs directory, export the environmental variable: +

+
 # export fs=$PWD/rootfs
+
+

+To check: +

+
 # echo $fs
+
+ +

cairo-1.2.6 - 2D graphics library

+

+We begin with libcairo (http://www.cairographics.org/) +used to compile pango: +

+
 # cd src
+ # wget http://cairographics.org/releases/cairo-1.2.6.tar.gz
+ # tar xzf cairo-1.2.6.tar.gz
+ # cd cairo-1.2.6
+ # ./configure --prefix=/usr --mandir=/usr/share/man \
+   --with-html-dir=/usr/share/doc
+ # make
+ # make DESTDIR=$PWD/_pkg install
+ # strip -v _pkg/usr/lib/*.so*
+
+

Install in rootfs

+
 # cp -av _pkg/usr/lib/*.so* $fs/usr/lib
+
+ +

glib-2.12.4 - C routines

+
 # cd ..
+ # wget ftp://ftp.gtk.org/pub/glib/2.12/glib-2.12.4.tar.bz2
+ # tar xjf glib-2.12.4.tar.bz2
+ # cd glib-2.12.4
+ # ./configure --prefix=/usr --sysconfdir=/etc \
+   --mandir=/usr/share/man --with-html-dir=/usr/share/doc
+ # make
+ # make DESTDIR=$PWD/_pkg install
+ # strip -v _pkg/usr/bin/*
+ # strip -v _pkg/usr/lib/*.so*
+
+

Install in rootfs

+

+Option: the utilities glib-genmarshal and gobject-query need the /lib/tls/librt.so.1: +

+
 # cp -a _pkg/usr/lib/*.so* $fs/usr/lib
+ # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
+ 
+ The binaries and options:
+ # cp -a _pkg/usr/bin/* $fs/usr/bin
+
+ +

pango-1.14.8 - Library for layout and rendering of text

+
 # cd ..
+ # wget ftp://ftp.gtk.org/pub/pango/1.14/pango-1.14.8.tar.bz2
+ # tar xjf pango-1.14.8.tar.bz2
+ # cd pango-1.14.8
+ # ./configure --prefix=/usr --sysconfdir=/etc \
+   --mandir=/usr/share/man --with-html-dir=/usr/share/doc
+ # make
+ # make DESTDIR=$PWD/_pkg install
+ # strip -v _pkg/usr/bin/*
+ # strip -v _pkg/usr/lib/*.so*
+ # strip -v _pkg/usr/lib/pango/1.5.0/modules/*
+
+

Install in rootfs

+
 # cp -a _pkg/usr/bin/* $fs/usr/bin
+ # cp -a _pkg/usr/lib/*.so* $fs/usr/lib
+ # cp -a _pkg/usr/lib/pango $fs/usr/lib
+ # rm -rf $fs/usr/lib/pango/1.5.0/modules/*.la
+ # cp -a _pkg/etc $fs
+
+

+Create /etc/pango.modules via chroot in the rootfs (pango-querymodules uses librt.so.1): +

+
 # chroot $fs /bin/ash
+ /# pango-querymodules > /etc/pango/pango.modules
+ # exit
+
+ +

atk-1.12.4 - Accessibility toolkit

+
 # cd ..
+ # wget http://ftp.gnome.org/pub/gnome/sources/atk/1.12/atk-1.12.4.tar.bz2
+ # tar xjf atk-1.12.4.tar.bz2
+ # cd atk-1.12.4
+ # ./configure --prefix=/usr --mandir=/usr/share/man \
+   --with-html-dir=/usr/share/doc
+ # make
+ # make DESTDIR=$PWD/_pkg install
+ # strip -v _pkg/usr/lib/*.so*
+
+

Install in rootfs

+
 # cp -a _pkg/usr/lib/*.so* $fs/usr/lib
+ # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
+
+ +

gtk+-2.8.20 - The GIMP Toolkit

+
 # cd ..
+ # wget ftp://ftp.gtk.org/pub/gtk/v2.8/gtk+-2.8.20.tar.bz2
+ # tar xjf gtk+-2.8.20.tar.bz2
+ # cd gtk+-2.8.20
+ # ./configure --prefix=/usr --sysconfdir=/etc \
+   --mandir=/usr/share/man --with-html-dir=/usr/share/doc
+ # make
+ # make DESTDIR=$PWD/_pkg install
+ # strip -v _pkg/usr/bin/*
+ # strip -v _pkg/usr/lib/*.so*
+ # strip -v --strip-unneeded \
+   _pkg/usr/lib/gtk-2.0/2.4.0/*/*
+
+

Install in rootfs

+
 # cp -a _pkg/usr/lib/*.so* $fs/usr/lib
+ # mkdir $fs/usr/lib/gtk-2.0
+ # cp -a _pkg/usr/lib/gtk-2.0/2.4.0 $fs/usr/lib/gtk-2.0
+ # rm -rf $fs/usr/lib/gtk-2.0/2.4.0/*/*.la
+ 
+ Locale and themes:
+ # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
+ # cp -a _pkg/usr/share/themes $fs/usr/share
+ 
+ The applications:
+ # cp  _pkg/usr/bin/gtk-query-immodules-2.0 $fs/usr/bin
+ # cp  _pkg/usr/bin/gtk-update-icon-cache $fs/usr/bin
+ # cp  _pkg/usr/bin/gdk-pixbuf-csource $fs/usr/bin
+ # cp  _pkg/usr/bin/gdk-pixbuf-query-loaders $fs/usr/bin
+ ...
+ 
+ For the gtk-demo application:
+ # cp -a _pkg/usr/bin/gtk-demo $fs/usr/bin
+ # cp -a _pkg/usr/share/gtk-2.0 $fs/usr/share
+
+

+Create files /etc/gtk-2.0/gtk.immodules and gdk-pixbuf.loaders via a chroot in the rootfs: +

+
 # chroot $fs /bin/ash
+ /# mkdir /etc/gtk-2.0
+ /# gtk-query-immodules-2.0 > /etc/gtk-2.0/gtk.immodules
+ /# gdk-pixbuf-query-loaders > /etc/gtk-2.0/gdk-pixbuf.loaders
+ # exit
+
+

+At this stage you can test GTK+ with the 'gtk-demo' application by creating an ISO and using qemu. +You can also compile a small GTK application such as LeafPad and test! The compiliation and installation +of GTK+ applications distributed by default with SliTaz are described in the next chapter +GTK apps. +

+ +

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/boot.cat -no-emul-boot -boot-load-size 4 \
+   -V "SliTaz" -boot-info-table rootcd 
+
+

Following chapter

+

+After the libraries, the +GTK+ applications. +

+ + + +
+ + + + +
+ Copyright © 2008 SliTaz - + GNU General Public License;
+ Documentation is under + GNU Free Documentation License + and code is valid xHTML 1.0. +
+ + + diff -r 161b08baab37 -r 11e425da85eb en/doc/scratchbook/index.html --- a/en/doc/scratchbook/index.html Fri Dec 19 12:31:56 2008 +0100 +++ b/en/doc/scratchbook/index.html Tue Dec 23 14:10:23 2008 +0000 @@ -39,6 +39,14 @@
  • Introduction.
  • Organize a working directory.
  • Construction of the base SliTaz system.
  • +
  • Base applications.
  • +
  • Ncurses libraries and applications.
  • +
  • Install and configure Locale & i18n.
  • +
  • Boot scripts.
  • +
  • X window system.
  • +
  • GTK+ packages and libraries.
  • +
  • GTK+ applications.
  • +
  • Xorg.
  • diff -r 161b08baab37 -r 11e425da85eb en/doc/scratchbook/locale.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/en/doc/scratchbook/locale.html Tue Dec 23 14:10:23 2008 +0000 @@ -0,0 +1,162 @@ + + + + SliTaz Scratchbook - Locale & i18n + + + + + + + + + + + + + + + +
    +
    + + +

    Locale & i18n

    +

    +Installation and configuration of locales. +

    + + +

    Locale installation

    +

    +This chapter describes the installation of locales in SliTaz GNU/Linux from a SliTaz GNU/Linux host system. +The installation of locales contained in the X server are described in the chapter +X window system. The various files copied in this chapter come from the +compiliation package glibc-2.3.6 forming part of the toolchain. +

    +

    Various file directories

    +

    +We begin by creating the directories that contain libraries and files relevant to the different locales. +The directory LC_MESSAGES contains the files for the translated messages (.mo), if they exist: +

    +
     # mkdir -p rootfs/usr/share/{i18n,locale}
    + # mkdir -p rootfs/usr/lib/{locale,gconv}
    + # mkdir -p rootfs/usr/share/i18n/{charmaps,locales}
    + # mkdir -p rootfs/usr/share/locale/fr/LC_MESSAGES
    +
    +

    +Copy the localization files for French, Swiss-French and Swiss-German in /usr/share/i18n/locales: +

    +
     # cp -a /usr/share/i18n/locales/{de_CH,fr_CH,fr_FR,i18n,iso14651_t1} \
    +   rootfs/usr/share/i18n/locales
    +
    +

    +Copy the translit_* files in /usr/share/i18n/locales: +

    +
     # cp -a /usr/share/i18n/locales/{translit_circle,translit_cjk_compat} \
    +   rootfs/usr/share/i18n/locales
    + # cp -a /usr/share/i18n/locales/{translit_combining,translit_compat} \
    +   rootfs/usr/share/i18n/locales   
    + # cp -a /usr/share/i18n/locales/{translit_font,translit_fraction} \
    +   rootfs/usr/share/i18n/locales
    + # cp -a /usr/share/i18n/locales/{translit_narrow,translit_neutral} \
    +   rootfs/usr/share/i18n/locales
    + # cp -a /usr/share/i18n/locales/{translit_small,translit_wide} \
    +   rootfs/usr/share/i18n/locales
    +
    +

    +Copy the charmaps files in /usr/share/i18n/charmaps: +

    +
     # cp -a /usr/share/i18n/charmaps/ANSI_X3.* rootfs/usr/share/i18n/charmaps
    + # cp -a /usr/share/i18n/charmaps/{ISO-8859-1.gz,ISO-8859-2.gz,ISO-8859-15.gz} \
    +   rootfs/usr/share/i18n/charmaps
    +
    +

    +Copy the gconv libraries in /usr/lib/gconv to rootfs of SliTaz: +

    +
     # cp /usr/lib/gconv/{ANSI_X3.110.so,gconv-modules,UNICODE.so} \
    +   rootfs/usr/lib/gconv
    + # cp /usr/lib/gconv/{ISO8859-1.so,ISO8859-2.so,ISO8859-15.so} \
    +   rootfs/usr/lib/gconv
    + # strip -v rootfs/usr/lib/gconv/*.so
    +
    +

    +Copy the locale utility: +

    +
     # cp /usr/bin/locale rootfs/usr/bin
    +
    +

    +It's necessary that the file /usr/lib/locale/locale-archive is generated, +for that we use the localedef utility while chrooted in SliTaz: +

    +
     # cp /usr/bin/localedef rootfs/usr/bin
    + # chroot rootfs /bin/ash
    +
    +

    +Use of localedef for French-speaking Switzerland and France: +

    +
     /# localedef -i fr_CH -f ISO-8859-1 fr_CH
    + /# localedef -i fr_FR -f ISO-8859-1 fr_FR
    + /# exit
    +
    +

    +You can delete the localedef binary to gain some space: +

    +
     # rm rootfs/usr/bin/localedef
    +
    + +

    Config and use of locale

    +

    +To use a language in a session, you can create a script launched at boot, or +add 2 lines to the ~/.profile specific to each user with: +

    +
    +export LANG=fr_CH
    +export LC_ALL=fr_CH
    +
    +
    +

    +Voilà, the French language should now function If you installed retawq or nano, you can check the +performance of locales by copying the .mo files in the sources of Retawq or Nano to /usr/share/locale/fr/LC_MESSAGES. +

    +

    Following chapter

    +

    +SliTaz uses the /etc/init.d/i18n.sh script and the /etc/locale.conf configuration file to +manage the system locale. This is detailed in the next chapter Boot scripts. +On a working system, just modify /etc/locale.conf with a text editor or launch 'tazlocale' +to change the default system locale Or to specify the language as a boot option: lang=xx. +

    + + + +
    + + + + +
    + Copyright © 2008 SliTaz - + GNU General Public License;
    + Documentation is under + GNU Free Documentation License + and code is valid xHTML 1.0. +
    + + + diff -r 161b08baab37 -r 11e425da85eb en/doc/scratchbook/x-window-system.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/en/doc/scratchbook/x-window-system.html Tue Dec 23 14:10:23 2008 +0000 @@ -0,0 +1,470 @@ + + + + SliTaz Scratchbook - X Window System + + + + + + + + + + + + + + + +
    +
    + + +

    X window system

    +

    +Installation and basic configuration of the X window system. +

    + + +

    About

    +

    +This chapter describes the installation and configuration of the X window system on SliTaz. We will +install libraries for expat, XML, fonts, a graphical server (Xvesa), a terminal emulator (xterm), +various small tools and a window manager (JWM). We'll also install the JPEG libraries and Links web browser. +

    +

    Environmental variable ($fs)

    +

    +If you do not specify any path to the rootfs directory, export the environmental variable: +

    +
     # export fs=$PWD/rootfs
    +
    +

    +To check: +

    +
     # echo $fs
    +
    + +

    expat-2.0.0 - XML parser library

    +

    +Expat (http://expat.sourceforge.net/) +contains the XML parsing libraries: +

    +
     # cd ..
    + # wget http://switch.dl.sourceforge.net/sourceforge/expat/expat-2.0.0.tar.gz
    + # tar xzf expat-2.0.0.tar.gz
    + # cd expat-2.0.0
    + # ./configure --sysconfdir=/etc --prefix=/usr \
    +   --mandir=/usr/share/man
    + # make
    + # make DESTDIR=$PWD/_pkg install
    + # strip -v _pkg/usr/lib/*
    + # strip -v _pkg/usr/bin/*
    +
    +

    +Thereafter, we will install 'xterm' which needs libexpat.so.0, simply create a symbolic link and voilà. +Then you can install the 'xmlwf' application and libraries in the rootfs: +

    +
     # cd _pkg/usr/lib
    + # ln -s libexpat.so.1.5.0 libexpat.so.0
    + # cp -a *.so* $fs/usr/lib
    + # cd ..
    + # cp -a bin/* $fs/usr/bin
    + # cd ../..
    +
    +

    libs

    +Libraries used by xmlwf: +
            libexpat.so.1 => /usr/lib/libexpat.so.1 (0x40021000)
    +        libc.so.6 => /lib/tls/libc.so.6 (0x40041000)
    +        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
    +
    + +

    freetype-2.3.1 - System font libraries

    +

    +The package freetype (http://www.freetype.org/) +contains libraries used by X for configuring the system fonts: +

    +
     # cd ..
    + # wget http://download.savannah.gnu.org/releases/freetype/freetype-2.3.1.tar.bz2
    + # tar xjf freetype-2.3.1.tar.bz2
    + # cd freetype-2.3.1
    + # ./configure --sysconfdir=/etc --prefix=/usr \
    +   --mandir=/usr/share/man
    + # make
    + # make DESTDIR=$PWD/_pkg install
    + # strip -vs _pkg/usr/lib/*
    + # cp -a _pkg/usr/bin/* $fs/usr/bin
    + # cp -a _pkg/usr/lib/*.so* $fs/usr/lib
    +
    + +

    fontconfig-2.4.2 - Manage system fonts

    +

    +The fontconfig package (www.fontconfig.org/wiki/) +provides the libfontconfig library used by many programs under X. Note XFree86 also provides these +utilities. We chose the original package because it works better with JWM: +

    +
     # cd ..
    + # wget http://fontconfig.org/release/fontconfig-2.4.2.tar.gz
    + # tar xzf fontconfig-2.4.2.tar.gz
    + # cd fontconfig-2.4.2
    + # ./configure --sysconfdir=/etc --prefix=/usr \
    +   --mandir=/usr/share/man --localstatedir=/var
    + # make
    + # make DESTDIR=$PWD/_pkg install
    + # strip -v _pkg/usr/bin/*
    + # strip -v _pkg/usr/lib/*
    + # cp -a _pkg/usr/bin/* $fs/usr/bin
    + # cp -a _pkg/usr/lib/*.so* $fs/usr/lib
    + # cp -a _pkg/etc $fs
    + # cp -a _pkg/var $fs
    +
    +

    libs

    +

    +A 'ldd' on fc-cache gives the libraries below. You can also use libfreetype of XFree86: +

    +
            libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb7f12000)
    +        libz.so.1 => /usr/lib/libz.so.1 (0xb7eff000)
    +        libexpat.so.1 => /usr/lib/libexpat.so.1 (0xb7edf000)
    +        libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0xb7eb0000)
    +        libc.so.6 => /lib/tls/libc.so.6 (0xb7d7b000)
    +        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0xb7f8c000)
    +
    + +

    Xserver - Graphical Xvesa server of Xfree86

    +

    +We will use the binary versions of Xvesa server (www.xfree86.org/) +and fonts distributed by Xfree86.org. We could also copy Xorg libraries from the host system that would +be used for compiling X applications. Xvesa works well like this and simplifies things. You can also rebuild +Xorg packages on your development system. +

    +

    Xtinyx server - Xvesa

    +

    +The Xvesa server is very light and uses tiny libraries; it is contained in the Xtinyx.tgz archive. +Download and install in /usr/bin of SliTaz rootfs: +

    +
     # cd ..
    + # mkdir -p XFree86-4.6.0 && cd XFree86-4.6.0
    + # wget http://ftp.xfree86.org/pub/XFree86/4.6.0/binaries/Linux-ix86-glibc23/Xtinyx.tgz
    + # tar xzf Xtinyx.tgz
    + # cp bin/Xvesa $fs/usr/bin
    + # strip $fs/usr/bin/Xvesa
    + # chmod 4711 $fs/usr/bin/Xvesa
    +
    +

    libs for Xvesa

    +
            libz.so.1 => /usr/lib/libz.so.1 (0xb7ed6000)
    +        libm.so.6 => /lib/tls/libm.so.6 (0xb7eb1000)
    +        libc.so.6 => /lib/tls/libc.so.6 (0xb7d7e000)
    +        /lib/ld-linux.so.2 (0xb7ef8000)
    +
    +

    rgb.txt - RGB colors in X

    +

    +The colors configuration file used by the X server is called: rgb.txt; we suggest +that you copy it to the host system. The library libX11.so will seek the configuration files in +/usr/share/X11, and the Xvesa server in /usr/X11R6/lib/X11; we create a link in /usr/share/X11 to enable this: +

    +
     # mkdir -p $fs/usr/share/X11
    + # cp /usr/share/X11/rgb.txt $fs/usr/share/X11
    + # chroot $fs /bin/ash
    + /# mkdir -p /usr/X11R6/lib/X11/
    + /# ln -s /usr/share/X11/rgb.txt /usr/X11R6/lib/X11/rgb.txt
    + /# exit
    +
    +

    Xfnts - Fonts

    +

    +To operate the server, we need the basic fonts; you can download them from Xfree86.org and then compile +packages from Xorg, or copy them from your host system. The system fonts can be put into different folders +and the cache updated with lc-cache. Attention, fonts take pride of place and you can only install +the minimum. /usr/share/fonts contains the TrueType fonts such as bitstream-vera: +

    +
     # wget http://ftp.xfree86.org/pub/XFree86/4.6.0/binaries/Linux-ix86-glibc23/Xfnts.tgz
    + # tar xzf Xfnts.tgz
    + # mkdir -p $fs/usr/X11R6/lib/X11/fonts
    + # mkdir -p $fs/usr/share/fonts/truetype
    +
    + Copy the fonts...
    + (# cp -a lib/X11/fonts/* $fs/usr/X11R6/lib/X11/fonts)
    + (# cp -a /usr/share/fonts/truetype/* $fs/usr/share/fonts/truetype
    +
    +

    +Then regenerate the fonts.dir file, you must run mkfontdir on the directory in question: +

    +
     # mkfontdir $fs/usr/X11R6/lib/X11/fonts/75dpi
    +
    +

    +Fontconfig configuration files can be found in /etc/fonts provided by the fontconfig package. +Now you can run 'fc-cache' to update the cache, and 'fc-list' for a list of fonts. You do this +by chrooting into the rootfs: +

    +
     # chroot $fs /bin/ash
    + # fc-cache -v
    + # fc-list
    + # exit
    +
    +

    Xlib locale - Localization files

    +

    +On SliTaz, we installed 4 locales: C, iso8859-1, iso8859-15 and iso 8859-2 from the +compilation of Xorg. +You can copy the files from the host system or use the files distributed by XFree86. +Sample copy of all the locales from the host system: +

    +
     # mkdir -p $fs/usr/share/X11/locale
    + # cp -a /usr/share/X11/locale/* $fs/usr/share/X11/locale
    +
    +

    Using X

    +

    +Note that can already use Xvesa as a X terminal if you have a machine on the network accepting XDMCP connections. +For this, you can start the server with -query, for example: +

    +
     # Xvesa -ac -shadow -screen 1024x768x24 -query 192.168.0.2
    +
    + +

    xterm - Terminal Emulator

    +

    +The xterm package (invisible-island.net/xterm/) +provides a terminal emulator for X: +

    +
     # wget ftp://invisible-island.net/xterm/xterm-223.tgz
    + # tar xzf xterm-223.tgz
    + # cd xterm-223
    + # ./configure --prefix=/usr --sysconfdir=/etc \
    +   --mandir=/usr/share/man --localstatedir=/var \
    +   --with-app-defaults=/usr/share/X11/app-defaults \
    +   --build=i486-pc-linux-gnu --host=i486-pc-linux-gnu
    + # make
    + # make DESTDIR=$PWD/_pkg install
    + # strip _pkg/usr/bin/*
    + # cp _pkg/usr/bin/* $fs/usr/bin
    + # cp -a _pkg/usr/share/X11/* $fs/usr/share/X11
    +
    +

    libs

    +

    +A ldd on XTerm, we copy (and strip) the missing libraries from the host system: +

    +
        libXft.so.2 => /usr/lib/libXft.so.2 (0xb7f09000)
    +    libXrender.so.1 => /usr/lib/libXrender.so.1 (0xb7f00000)
    +    libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0xb7ed5000)
    +    libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb7e68000)
    +    libz.so.1 => /usr/lib/libz.so.1 (0xb7e54000)
    +    libX11.so.6 => /usr/lib/libX11.so.6 (0xb7d68000)
    +    libXaw.so.7 => /usr/lib/libXaw.so.7 (0xb7d0f000)
    +    libXmu.so.6 => /usr/lib/libXmu.so.6 (0xb7cfa000)
    +    libXext.so.6 => /usr/lib/libXext.so.6 (0xb7cec000)
    +    libXt.so.6 => /usr/lib/libXt.so.6 (0xb7c9e000)
    +    libSM.so.6 => /usr/lib/libSM.so.6 (0xb7c96000)
    +    libICE.so.6 => /usr/lib/libICE.so.6 (0xb7c7f000)
    +    libncurses.so.5 => /lib/libncurses.so.5 (0xb7c3c000)
    +    libc.so.6 => /lib/libc.so.6 (0xb7b2c000)
    +    libexpat.so.1 => /usr/lib/libexpat.so.1 (0xb7b0b000)
    +    libXau.so.6 => /usr/lib/libXau.so.6 (0xb7b08000)
    +    libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb7b03000)
    +    libdl.so.2 => /lib/libdl.so.2 (0xb7aff000)
    +    libXpm.so.4 => /usr/lib/libXpm.so.4 (0xb7aee000)
    +
    + +

    libpng-1.2.18 - PNG Libraries

    +

    +PNG libraries (http://libpng.org/pub/png/libpng.html) +are used to manipulate and format PNG images: +

    +
     # wget http://puzzle.dl.sourceforge.net/sourceforge/libpng/libpng-1.2.18.tar.bz2
    + # tar xjf libpng-1.2.18.tar.bz2
    + # cd libpng-1.2.18
    + # ./configure --enable-shared --prefix=/usr \
    +   --mandir=/usr/share/man
    + # make
    + # make DESTDIR=$PWD/_pkg install
    + # strip _pkg/usr/lib/*.so*
    + # cp -a _pkg/usr/lib/libpng12.so* $fs/usr/lib
    + # cp -a _pkg/usr/bin/libpng12* $fs/usr/bin
    +
    + +

    jwm-2.0 - Window manager

    +

    +Joe's Window Manager (http://www.joewing.net/programs/jwm/) +is an ultra light and friendly window manager. This is the default SliTaz window manager. The main configuration +file: /etc/jwm/system.jwnrc includes the style and config menu: +

    +
     # cd ..
    + # wget http://www.joewing.net/programs/jwm/releases/jwm-2.0.tar.bz2
    + # tar xjf jwm-2.0.tar.bz2
    + # cd jwm-2.0
    + # ./configure --prefix=/usr --mandir=/usr/share/man \
    +   --sysconfdir=/etc/jwm --disable-xinerama
    + # make
    + # strip src/jwm
    + # cp src/jwm $fs/usr/bin
    + # mkdir $fs/etc/jwm
    + # cp example.jwmrc $fs/etc/jwm/system.jwmrc
    +
    +

    libs

    +

    +Ldd libraries that we have provided: +

    +
        libX11.so.6 => /usr/lib/libX11.so.6 (0xb7e35000)
    +    libpng12.so.0 => /usr/lib/libpng12.so.0 (0xb7e12000)
    +    libXft.so.2 => /usr/lib/libXft.so.2 (0xb7e00000)
    +    libXrender.so.1 => /usr/lib/libXrender.so.1 (0xb7df7000)
    +    libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0xb7dcc000)
    +    libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb7d5f000)
    +    libz.so.1 => /usr/lib/libz.so.1 (0xb7d4a000)
    +    libXpm.so.4 => /usr/lib/libXpm.so.4 (0xb7d3a000)
    +    libXext.so.6 => /usr/lib/libXext.so.6 (0xb7d2c000)
    +    libc.so.6 => /lib/libc.so.6 (0xb7c1c000)
    +    libXau.so.6 => /usr/lib/libXau.so.6 (0xb7c19000)
    +    libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb7c14000)
    +    libdl.so.2 => /lib/libdl.so.2 (0xb7c0f000)
    +    libm.so.6 => /lib/libm.so.6 (0xb7bea000)
    +    libexpat.so.1 => /usr/lib/libexpat.so.1 (0xb7bc9000)
    +
    +

    +You can start the X server and JWM with the command below or create a script in +/usr/bin/startx with the content: +

    +
    Xvesa -ac -shadow -screen 1024x768x24 & exec jwm
    +
    +

    On SliTaz

    +

    +SliTaz uses the ~/.Xsession file to start a graphical session. The 'startx' command checks +whether the file exists or it runs 'tazx' to configure the X system. The user guide on X +window is located in: /usr/share/doc/slitaz/user-guide/x-window.html or is on the website: +

    +

    +We chose to use the Tango icons theme http://tango.freedesktop.org/, +that aren't compiled. We only use the minimum: images in 16 x 16 format that we put in /usr/share/icons. +

    +

    +To test JWM with a cooking ISO: +

    +
     # Xvesa -ac -shadow -screen 800x600x24 & exec jwm
    +
    + +

    jpeg-6b - JPEG Libraries

    +

    +Libraries handling JPEG images, and some small utilities: +

    +
     # wget http://www.ijg.org/files/jpegsrc.v6b.tar.gz
    + # tar xzf jpegsrc.v6b.tar.gz
    + # cd jpeg-6b
    + # ./configure --enable-shared --prefix=/usr \
    +   --mandir=/usr/share/man
    + # make
    + # strip .libs/*
    + # cp -a .libs/*.so* $fs/usr/lib
    + # cp .libs/{cjpeg,djpeg,jpegtran} $fs/usr/bin
    +
    + +

    tiff-3.8.2 - TIFF Libraries and Utilities

    +

    +Libraries handling TIFF images and some small optional utilities: +

    +
     # wget ftp://ftp.remotesensing.org/pub/libtiff/tiff-3.8.2.tar.gz
    + # tar xzf tiff-3.8.2.tar.gz
    + # cd tiff-3.8.2
    + # ./configure  --prefix=/usr --mandir=/usr/share/man
    + # make
    + # make DESTDIR=$PWD/_pkg install
    + # strip _pkg/usr/bin/*
    + # strip _pkg/usr/lib/*.so*
    + # cp -a _pkg/usr/lib/*.so* $fs/usr/lib
    +
    +

    +You can install the utilities you want. +

    + +

    links-2.1pre29 - Graphical and text mode web browser

    +

    +Links (links.twibright.com) is a web browser offering +graphical and text modes. It is translated into multiple languages, including French: +

    +
     # cd ..
    + # wget http://links.twibright.com/download/links-2.1pre28.tar.gz
    + # tar xzf links-2.1pre28.tar.gz
    + # cd links-2.1pre28
    + # ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man \
    +   --without-directfb --without-ssl --enable-graphics --enable-javascript
    + # make
    + # make DESTDIR=$PWD/_pkg install
    + # strip -v _pkg/usr/bin/*
    + # cp -v _pkg/usr/bin/* $fs/usr/bin
    +
    +

    libs

    +
        libtiff.so.3 => /usr/lib/libtiff.so.3
    +    libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0xb7ede000)
    +    libpng12.so.0 => /usr/lib/libpng12.so.0 (0xb7eba000)
    +    libz.so.1 => /usr/lib/libz.so.1 (0xb7ea7000)
    +    libX11.so.6 => /usr/lib/libX11.so.6 (0xb7dbb000)
    +    libdl.so.2 => /lib/tls/libdl.so.2 (0xb7db7000)
    +    libpcre.so.0 => /usr/lib/libpcre.so.0 (0xb7d96000)
    +    libm.so.6 => /lib/tls/libm.so.6 (0xb7d70000)
    +    libc.so.6 => /lib/tls/libc.so.6 (0xb7c3e000)
    +    libXau.so.6 => /usr/lib/libXau.so.6 (0xb7c3b000)
    +    libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb7c36000)
    +    /lib/ld-linux.so.2 (0xb7f5d000)
    +
    + +

    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/boot.cat -no-emul-boot -boot-load-size 4 \
    +   -V "SliTaz" -boot-info-table rootcd
    +
    +

    Following chapter

    +

    +The next chapter GTK+ libs +describes the installation of GTK libraries. +

    + + + +
    + + + + +
    + Copyright © 2008 SliTaz - + GNU General Public License;
    + Documentation is under + GNU Free Documentation License + and code is valid xHTML 1.0. +
    + + + diff -r 161b08baab37 -r 11e425da85eb en/doc/scratchbook/xorg.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/en/doc/scratchbook/xorg.html Tue Dec 23 14:10:23 2008 +0000 @@ -0,0 +1,144 @@ + + + + SliTaz Scratchbook - Xorg + + + + + + + + + + + + + + + +
    +
    + + +

    How-to Xorg - Modular graphical server

    + +

    +Note SliTaz uses the Xvesa server provided by XFree86 and Xorg libraries, this page describes +the compilation of Xorg libraries used by SliTaz. This document is primarily aimed at +develpers and contributors to the project, but it may be useful to all those seeking to rebuild +Xorg and Xlib libraries from source generating a minimum of dependencies. +

    + + +

    Build Xorg automatically with Tazwok

    +

    +On SliTaz, if you have Tazwok installed, you can rebuild Xorg with a few commands. +The wok contains a package called xorg and another named xorg-dev, +they can compile/cook all the packages used by Xorg on SliTaz. To compile, you must have +most of the development packages installed; if this is not the case: +

    +
     # tazpkg get-install slitaz-dev-pkgs
    +
    +

    +Then you can start to cook (if everything is ready, wok and development packages, etc), +starting with the protos' (xproto, etc): +

    +
     # tazwok cook xorg-dev-proto
    + # tazwok cook xorg
    + # tazwok cook xorg-dev
    +
    + + +

    Download Xorg (7.2) using wget

    +

    +Xorg is distributed in the form of modules, which is handy because you can only install what you want, +but it takes a lot of downloads. To help, we have created a small script that downloads the minimum +required for SliTaz; you can find the script getXorg.sh in +SliTaz tools (1.1). +This script is no longer updated, developers use the +wok and tools. +To use the script, it must be placed in the directory where you want to download Xorg: +

    +
     # cd ..
    + # mkdir Xorg && cd Xorg
    + # cp slitaz-tools-1.1/utils/getXorg-7.2.sh .
    + # ./getXorg-7.2.sh
    +
    + +

    Compile Xorg by hand

    +

    +Compiling Xorg can take a long time, there are many packages. To commence you need to +compile the downloaded proto packages, you can use the command make DESTDIR=$PWD/_pkg install to +install the package in a given directory. Example: +

    +
     # cd proto
    + # tar xzf xproto-X11R7.2-7.0.10.tar.gz
    + # cd xproto-X11R7.2-7.0.10
    + # ./configure --prefix=/usr --sysconfdir=/etc \
    +   --mandir=/usr/share/man --localstatedir=/var \
    +   --build=i486-pc-linux-gnu --host=i486-pc-linux-gnu
    +  # make
    +  # make install
    +
    +

    +Compile libraries by taking again the options used by proto. Example using the proper package to +compile xtrans, remember to run ldconfig if you install the package on the development machine: +

    +
     # cd .. && cd lib
    + # tar xzf xtrans-X11R7.2-1.0.3.tar.gz
    + # cd xtrans-X11R7.2-1.0.3
    + # ./configure --prefix=/usr --sysconfdir=/etc \
    +   --mandir=/usr/share/man --localstatedir=/var \
    +   --build=i486-pc-linux-gnu --host=i486-pc-linux-gnu
    + # make
    + # make install
    + # ldconfig
    +
    +

    +Once all the packaged libraries are compiled, you can begin to compile X applications such as the +graphical terminal Xterm. Note: SliTaz uses the RGB package containing the /usr/share/X11/rgt.text +file for defining colors. Example using the xsetroot application that permits +you to change the background color of the screen (modify $VERSION for the version that you want downloaded): +

    +
     # cd .. && cd app
    + # tar xzf xsetroot-$VERSION.tar.gz
    + # cd xsetroot-$VERSION
    + # ./configure --prefix=/usr --sysconfdir=/etc \
    +   --mandir=/usr/share/man --localstatedir=/var \
    +   --build=i486-pc-linux-gnu --host=i486-pc-linux-gnu
    + # make && make install
    +
    + + + +
    + + + + +
    + Copyright © 2008 SliTaz - + GNU General Public License;
    + Documentation is under + GNU Free Documentation License + and code is valid xHTML 1.0. +
    + + +