slitaz-doc-wiki-data rev 45

Update pages/en folder.
author Christopher Rogers <slaxemulator@gmail.com>
date Sun May 01 07:41:07 2011 +0000 (2011-05-01)
parents b8e0b134ba24
children d3b2b77dee78
files pages/en/guidelines.txt pages/en/guides/contributor.txt pages/en/guides/nvidia.txt pages/en/scratchbook/base-apps.txt pages/en/scratchbook/base-ncurses.txt pages/en/scratchbook/base-system.txt pages/en/scratchbook/boot-scripts.txt pages/en/scratchbook/gtk-apps.txt pages/en/scratchbook/gtk-libs.txt pages/en/scratchbook/locale.txt pages/en/scratchbook/start.txt pages/en/scratchbook/x-window-system.txt pages/en/scratchbook/xorg.txt
line diff
     1.1 --- a/pages/en/guidelines.txt	Sun May 01 07:40:21 2011 +0000
     1.2 +++ b/pages/en/guidelines.txt	Sun May 01 07:41:07 2011 +0000
     1.3 @@ -6,7 +6,7 @@
     1.4  
     1.5  ===== Summer of Documentation =====
     1.6      - Centralization of all documentation to http://doc.slitaz.org 
     1.7 -    - Complete migration of Handbook and Cookbook (Scratchbook, if possible) 
     1.8 +    - <del>Complete migration of Handbook and Cookbook (Scratchbook, if possible)</del> 
     1.9      - Translation of Handbook and Cookbook
    1.10      - Link or translate the wiki articles on the [[http://labs.slitaz.org|labs website]]
    1.11    - Review and update Handbook and Cookbook as of 3.0
     2.1 --- a/pages/en/guides/contributor.txt	Sun May 01 07:40:21 2011 +0000
     2.2 +++ b/pages/en/guides/contributor.txt	Sun May 01 07:41:07 2011 +0000
     2.3 @@ -14,17 +14,17 @@
     2.4  
     2.5  If you are comfortable with the Linux compiling process (//configure, make, make install//), you can help by creating SliTaz packages. We have an automated tool to build packages from source called [[http://doc.slitaz.org/en:cookbook:wok|Tazwok]]. All SliTaz packages contain a [[en:cookbook:receipt|receipt]] - a text file where you control the building process using some variables and functions. You can browse the [[http://hg.slitaz.org/wok|wok]] to see some receipts and understand how they work. Please take time to read the [[en:cookbook:devcorner|Developer's]] page beforehand and practice locally with some new or existing packages.
     2.6  
     2.7 -When you feel ready to start cooking, read the [[http://labs.slitaz.org/wiki/13/Pkgscooklist|packages cooklist]], pick one and test. You can submit your receipts to the Mailing List or contact a SliTaz dev, so that we can review the work and give you access to the repos.
     2.8 +When you feel ready to start cooking, read the [[http://labs.slitaz.org/projects/distro/wiki/Pkgscooklist|packages cooklist]], pick one and test. You can submit your receipts to the Mailing List or contact a SliTaz dev, so that we can review the work and give you access to the repos.
     2.9  
    2.10  === Package Testing and Debugging ===
    2.11  
    2.12 -You can help SliTaz by testing packages and reporting bugs on the [[http://labs.slitaz.org/issues|Labs Issue Tracker]]. We have some [[http://labs.slitaz.org/wiki/packages|Package Testing Guidelines]]. You can use the testing project on the Labs, the forum or the mailing list to report any missing dependencies, unexpected package behavior, or wrong configurations, etc. 
    2.13 +You can help SliTaz by testing packages and reporting bugs on the [[http://bugs.slitaz.org/|Bug Tracking System]]. We have some [[http://labs.slitaz.org/wiki/packages|Package Testing Guidelines]]. You can use the testing project on the Labs, the forum or the mailing list to report any missing dependencies, unexpected package behavior, or wrong configurations, etc. 
    2.14  
    2.15  \\
    2.16  
    2.17  ===== Writers & Translators =====
    2.18  
    2.19 -Take a look at the [[:guidelines| SliTaz Documentation Guidelines]], pick your page and go! At this stage, we just need solid contributions which will then be reviewed and updated. We're undergoing a [[http://listengine.tuxfamily.org/lists.tuxfamily.org/slitaz/2010/04/msg00063.html|Summer of Documentation]], in which we're concentrating on all the docs. You'll be in good company.
    2.20 +Take a look at the [[en:guidelines| SliTaz Documentation Guidelines]], pick your page and go! At this stage, we just need solid contributions which will then be reviewed and updated. We're undergoing a [[http://listengine.tuxfamily.org/lists.tuxfamily.org/slitaz/2010/04/msg00063.html|Summer of Documentation]], in which we're concentrating on all the docs. You'll be in good company.
    2.21  
    2.22  There's many areas in which you can help:
    2.23  
     3.1 --- a/pages/en/guides/nvidia.txt	Sun May 01 07:40:21 2011 +0000
     3.2 +++ b/pages/en/guides/nvidia.txt	Sun May 01 07:41:07 2011 +0000
     3.3 @@ -2,7 +2,7 @@
     3.4  
     3.5  ===== Required Reading =====
     3.6  
     3.7 -    * Handbook - [[http://www.slitaz.org/en/doc/handbook/x-window.html#xorg|Xorg Installation]]
     3.8 +    * Handbook - [[http://doc.slitaz.org/en:handbook:xwindow#xorg|Xorg Installation]]
     3.9      * Quickstart Guide - [[en:guides:kernel|Build your own custom Linux Kernel]]
    3.10  
    3.11  ===== Prepare =====
    3.12 @@ -14,7 +14,7 @@
    3.13  # tazpkg get-install xorg-server
    3.14  </code>
    3.15  
    3.16 -    * Install the linux-source package and development tools. See [[http://community.slitaz.org/wiki/quickstart/customkernel|here]]
    3.17 +    * Install the linux-source package and development tools. See [[en:guides:kernel|here]]
    3.18  
    3.19  <code>
    3.20  # tazpkg get-install linux-source
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/pages/en/scratchbook/base-apps.txt	Sun May 01 07:41:07 2011 +0000
     4.3 @@ -0,0 +1,393 @@
     4.4 +====== Base Applications ======
     4.5 +
     4.6 +Install and configure libraries and basic applications.
     4.7 +
     4.8 +===== About =====
     4.9 +
    4.10 +This chapter describes the facilities libraries and basic text mode applications supplied with SliTaz.
    4.11 +
    4.12 +==== Assign an environment variable ($fs) ====
    4.13 +
    4.14 +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:
    4.15 +
    4.16 +   # export fs=$PWD/rootfs
    4.17 +
    4.18 +To check:
    4.19 +
    4.20 +   # echo $fs
    4.21 +
    4.22 +===== bc-1.06 - Text mode calculator =====
    4.23 +
    4.24 +The application bc ([[http://www.gnu.org/software/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:
    4.25 +
    4.26 +   # cd src
    4.27 +   # wget http://ftp.gnu.org/pub/gnu/bc/bc-1.06.tar.gz
    4.28 +   # tar xzfv bc-1.06.tar.gz
    4.29 +   # cd bc-1.06
    4.30 +   # ./configure --prefix=/usr --infodir=/usr/share/info \
    4.31 +     --mandir=/usr/share/man
    4.32 +   # make
    4.33 +   # make DESTDIR=$PWD/_pkg install
    4.34 +   # strip -vs _pkg/usr/bin/*
    4.35 +   # cp -avi _pkg/usr/bin/bc $fs/usr/bin
    4.36 +
    4.37 +==== libs ====
    4.38 +
    4.39 +A small "ldd" on bc should produce:
    4.40 +<file>
    4.41 +          libc.so.6 => /lib/libc.so.6 (0x40029000)
    4.42 +          /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
    4.43 +</file>
    4.44 +===== zlib-1.2.3 - Compression libraries =====
    4.45 +
    4.46 +The zlib (http://www.zlib.net/) package provides compression and decompression functions used by among others, the SSH server Dropbear and the X server:
    4.47 +
    4.48 +   # cd ..
    4.49 +   # wget http://www.gzip.org/zlib/zlib-1.2.3.tar.bz2
    4.50 +   # tar xjfv zlib-1.2.3.tar.bz2
    4.51 +   # cd zlib-1.2.3
    4.52 +   # ./configure --shared --prefix=/usr
    4.53 +   # make
    4.54 +   # strip -vs libz.so*
    4.55 +   # cp -av libz.so* $fs/usr/lib
    4.56 +
    4.57 +===== pcre-7.4 - Perl-compatible regular expressions =====
    4.58 +
    4.59 +The package pcre (http://www.pcre.org/) provides libraries of functions for Perl compatible regular expressions used by among others, the web server Lighttpd:
    4.60 +
    4.61 +   # cd ..
    4.62 +   # wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-7.4.tar.gz
    4.63 +   # tar xzfv pcre-7.4.tar.gz
    4.64 +   # cd pcre-7.4
    4.65 +   # ./configure --prefix=/usr
    4.66 +   # make
    4.67 +   # make DESTDIR=$PWD/_pkg install
    4.68 +   # strip -vs _pkg/usr/bin/*
    4.69 +   # strip -vs _pkg/usr/lib/*
    4.70 +   # cp -av _pkg/usr/bin/* $fs/usr/bin
    4.71 +   # cp -av _pkg/usr/lib/*.so* $fs/usr/lib
    4.72 +
    4.73 +===== e2fsprogs-1.39 - Filesystem management utilities =====
    4.74 +
    4.75 +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:
    4.76 +
    4.77 +   # cd ..
    4.78 +   # wget http://puzzle.dl.sourceforge.net/sourceforge/e2fsprogs/e2fsprogs-1.39.tar.gz
    4.79 +   # tar xzf e2fsprogs-1.39.tar.gz
    4.80 +   # cd e2fsprogs-1.39
    4.81 +   # ./configure --prefix=/usr --with-root-prefix="" \
    4.82 +     --enable-elf-shlibs --disable-evms --sysconfdir=/etc \
    4.83 +     --infodir=/usr/share/info --mandir=/usr/share/man
    4.84 +   # make
    4.85 +   # make DESTDIR=$PWD/_pkg install
    4.86 +   # strip -vs _pkg/sbin/*
    4.87 +   # strip -vs _pkg/lib/*
    4.88 +   # strip -vs _pkg/usr/bin/*
    4.89 +   # strip -vs _pkg/usr/sbin/*
    4.90 +   # strip -vs _pkg/usr/lib/*
    4.91 +
    4.92 +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:
    4.93 +
    4.94 +   # cp -i _pkg/sbin/{badblocks,blkid,dumpe2fs,e2fsck,e2image} $fs/sbin
    4.95 +   # cp -i _pkg/sbin/{e2label,findfs,logsave,mke2fs,mkfs.*} $fs/sbin
    4.96 +   # cp -i _pkg/sbin/{resize2fs,tune2fs} $fs/sbin
    4.97 +   # cp -a _pkg/lib/* $fs/lib
    4.98 +   # rm -rf $fs/lib/libss*
    4.99 +   # cp -a _pkg/etc/* $fs/etc
   4.100 +   # cp -a _pkg/usr/bin/* $fs/usr/bin
   4.101 +   # cp -a _pkg/usr/sbin/* $fs/usr/sbin
   4.102 +   # cp -ad _pkg/usr/lib/*.so $fs/usr/lib
   4.103 +   # rm -rf $fs/usr/lib/libss*
   4.104 +
   4.105 +You can also copy files from the French locale:
   4.106 +
   4.107 +   # mkdir $fs/usr/share/locale
   4.108 +   # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
   4.109 +
   4.110 +===== Dropbear-0.50 - Lightweight SSH client and server =====
   4.111 +
   4.112 +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':
   4.113 +
   4.114 +   # cd ..
   4.115 +   # wget http://matt.ucc.asn.au/dropbear/releases/dropbear-0.50.tar.gz
   4.116 +   # tar xzf dropbear-0.50.tar.gz
   4.117 +   # cd dropbear-0.50
   4.118 +   # ./configure --prefix=/usr
   4.119 +   # make
   4.120 +   # make scp
   4.121 +   # make DESTDIR=$PWD/_pkg install
   4.122 +   # strip -v scp
   4.123 +   # strip -v _pkg/usr/bin/*
   4.124 +   # strip -v _pkg/usr/sbin/*
   4.125 +
   4.126 +Install the client and tools in /usr/bin, and the server in /usr/sbin:
   4.127 +
   4.128 +   # cp scp $fs/usr/bin
   4.129 +   # cp -a _pkg/usr/bin/* $fs/usr/bin
   4.130 +   # cp -a _pkg/usr/sbin/* $fs/usr/sbin
   4.131 +
   4.132 +==== libs ====
   4.133 +<file>
   4.134 +          libutil.so.1 => /lib/libutil.so.1 (0x40025000)
   4.135 +          libz.so.1 => /usr/lib/libz.so.1 (0x40028000)
   4.136 +          libcrypt.so.1 => /lib/libcrypt.so.1 (0x4003b000)
   4.137 +          libc.so.6 => /lib/libc.so.6 (0x40068000)
   4.138 +          /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
   4.139 +</file>
   4.140 +Copy the library libutil.so.1 to $fs/lib, if this is not already the case. Other libraries should be present following the construction of the base system:
   4.141 +
   4.142 +   # cp -a /lib/libutil* $fs/lib
   4.143 +
   4.144 +==== Configure Dropbear ====
   4.145 +
   4.146 +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:
   4.147 +
   4.148 +   # mkdir $fs/etc/dropbear
   4.149 +
   4.150 +You must generate the secure keys before starting the Dropbear server on SliTaz. You can use dropbearkey with the following commands:
   4.151 +
   4.152 +   # dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key
   4.153 +   # dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key
   4.154 +
   4.155 +On SliTaz, you can start the SSH server with the command:
   4.156 +
   4.157 +   # /etc/init.d/dropbear start
   4.158 +
   4.159 +===== lighttpd-1.4.18 - HTTP Web server =====
   4.160 +
   4.161 +Lighttpd ([[http://www.lighttpd.net/|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:
   4.162 +
   4.163 +   # cd ..
   4.164 +   # wget http://www.lighttpd.net/download/lighttpd-1.4.18.tar.gz
   4.165 +   # tar xzf lighttpd-1.4.18.tar.gz
   4.166 +   # cd lighttpd-1.4.18
   4.167 +   # ./configure -enable-shared --disable-ipv6 --prefix=/usr \
   4.168 +     --libdir=/usr/lib/lighttpd --mandir=/usr/share/man
   4.169 +   # make
   4.170 +   # make DESTDIR=$PWD/_pkg install
   4.171 +   # strip -vs _pkg/usr/bin/*
   4.172 +   # strip -vs _pkg/usr/sbin/*
   4.173 +   # strip -vs _pkg/usr/lib/lighttpd/*
   4.174 +
   4.175 +Install the server and generated libraries. We will then copy some of the modules (9):
   4.176 +
   4.177 +   # cp _pkg/usr/bin/* $fs/usr/bin
   4.178 +   # cp _pkg/usr/sbin/* $fs/usr/sbin
   4.179 +   # mkdir $fs/usr/lib/lighttpd
   4.180 +   Modules :
   4.181 +   # cp _pkg/usr/lib/lighttpd/mod_access.so $fs/usr/lib/lighttpd
   4.182 +   # cp _pkg/usr/lib/lighttpd/mod_accesslog.so $fs/usr/lib/lighttpd
   4.183 +   # cp _pkg/usr/lib/lighttpd/mod_alias.so $fs/usr/lib/lighttpd
   4.184 +   # cp _pkg/usr/lib/lighttpd/mod_auth.so $fs/usr/lib/lighttpd
   4.185 +   # cp _pkg/usr/lib/lighttpd/mod_cgi.so $fs/usr/lib/lighttpd
   4.186 +   # cp _pkg/usr/lib/lighttpd/mod_compress.so $fs/usr/lib/lighttpd
   4.187 +   # cp _pkg/usr/lib/lighttpd/mod_rewrite.so $fs/usr/lib/lighttpd
   4.188 +   # cp _pkg/usr/lib/lighttpd/mod_status.so $fs/usr/lib/lighttpd
   4.189 +   # cp _pkg/usr/lib/lighttpd/mod_userdir.so $fs/usr/lib/lighttpd
   4.190 +
   4.191 +==== libs ====
   4.192 +
   4.193 +There should be a libdl.so.2 library; if missing, we can copy:
   4.194 +
   4.195 +   # cp -a /lib/libdl* $fs/lib
   4.196 +
   4.197 +==== /var/www - root of documents served ====
   4.198 +
   4.199 +/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:
   4.200 +
   4.201 +   # mkdir -p $fs/var/www
   4.202 +
   4.203 +==== lighttpd.conf - Lighttpd configuration file ====
   4.204 +
   4.205 +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 an example configuration in /doc in the Lighttpd archive:
   4.206 +
   4.207 +   # cp -a ../slitaz-tools-1.1/etc/lighttpd $fs/etc
   4.208 +
   4.209 +Creating the directory containing the log files:
   4.210 +
   4.211 +   # mkdir $fs/var/log/lighttpd
   4.212 +
   4.213 +==== User and group www ====
   4.214 +
   4.215 +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:
   4.216 +
   4.217 +   # echo "www:x:80:80:www:/var/www:/bin/sh" >> $fs/etc/passwd
   4.218 +   # echo "www:*:13509:0:99999:7:::" >> $fs/etc/shadow
   4.219 +   # echo "www:*:13509:0:99999:7:::" >> $fs/etc/shadow-
   4.220 +   # chroot $fs /bin/ash
   4.221 +   /# addgroup -g 80 www
   4.222 +   /# chown www.www /var/log/lighttpd
   4.223 +   # exit
   4.224 +
   4.225 +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.
   4.226 +
   4.227 +===== iptables-1.3.7 - Netfilter, Linux firewall =====
   4.228 +
   4.229 +Netfilter ([[http://www.netfilter.org/|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:
   4.230 +
   4.231 +   # cd ..
   4.232 +   # wget http://www.netfilter.org/projects/iptables/files/iptables-1.3.7.tar.bz2
   4.233 +   # tar xjf iptables-1.3.7.tar.bz2
   4.234 +   # cd iptables-1.3.7
   4.235 +   # make KERNEL_DIR=../linux-2.6.20 BINDIR=/sbin \
   4.236 +     LIBDIR=/lib MANDIR=/usr/share/man
   4.237 +   # make KERNEL_DIR=../linux-2.6.20 BINDIR=/sbin \
   4.238 +     LIBDIR=/lib MANDIR=/usr/share/man \
   4.239 +     DESTDIR=$PWD/_pkg install
   4.240 +   # strip  _pkg/sbin/*
   4.241 +   # strip  _pkg/lib/iptables/*
   4.242 +
   4.243 +Installing the iptables* applications and libraries sufficient for a basic firewall:
   4.244 +
   4.245 +   # cp -a _pkg/sbin/iptables* $fs/sbin
   4.246 +   # mkdir $fs/lib/iptables
   4.247 +   # cp -a _pkg/lib/iptables/{libipt_standard.so,libipt_conntrack.so} \
   4.248 +     $fs/lib/iptables
   4.249 +   # cp -a _pkg/lib/iptables/{libipt_tcp.so,libipt_udp.so} $fs/lib/iptables
   4.250 +
   4.251 +To satisfy the iptables dependencies, you must copy the libnsl* library:
   4.252 +
   4.253 +   # cp -va /lib/libnsl* $fs/lib/tls
   4.254 +   # strip $fs/lib/libnsl*
   4.255 +
   4.256 +===== sqlite-3.5.1 - Small SQL database engine =====
   4.257 +
   4.258 +This package provides sqlite3 ([[http://www.sqlite.org/|www.sqlite.org]]) and sqlite3.so* libraries. SQLite is fast and efficient and integrates directly to programs using database files:
   4.259 +
   4.260 +   # cd ..
   4.261 +   # wget http://www.sqlite.org/sqlite-3.5.1.tar.gz
   4.262 +   # tar xzf sqlite-3.5.1.tar.gz
   4.263 +   # cd sqlite-3.5.1
   4.264 +   # ./configure --prefix=/usr --disable-tcl
   4.265 +   # make
   4.266 +   # make DESTDIR=$PWD/_pkg install
   4.267 +   # strip _pkg/usr/lib/*.so*
   4.268 +   # strip _pkg/usr/bin/*
   4.269 +
   4.270 +Installing the sqlite3 utility and libraries in the rootfs of SliTaz:
   4.271 +
   4.272 +   # cp -a _pkg/usr/lib/*.so* $fs/usr/lib
   4.273 +   # cp -a _pkg/usr/bin/* $fs/usr/bin
   4.274 +
   4.275 +===== cdrkit-1.1.5 - Tools for manipulating cdrom and ISO images =====
   4.276 +
   4.277 +cdrkit ([[http://www.cdrkit.org/|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:
   4.278 +
   4.279 +   # cd ..
   4.280 +   # wget http://cdrkit.org/releases/cdrkit-1.1.5.tar.gz
   4.281 +   # tar xzf cdrkit-1.1.5.tar.gz
   4.282 +   # cd cdrkit-1.1.5
   4.283 +   # make
   4.284 +   # make install PREFIX=$PWD/_pkg/usr
   4.285 +   # strip -v _pkg/usr/bin/*
   4.286 +   # strip -v _pkg/usr/sbin/*
   4.287 +   # cp _pkg/usr/bin/genisoimage $fs/usr/bin
   4.288 +   # cp _pkg/usr/bin/wodim $fs/usr/bin
   4.289 +
   4.290 +Copy the library libcap.so.1 required by wodim:
   4.291 +
   4.292 +   # cp -a /lib/libcap.so* $fs/lib
   4.293 +
   4.294 +===== cpio-2.8 - Archiver =====
   4.295 +
   4.296 +"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:
   4.297 +
   4.298 +   # cd ..
   4.299 +   # wget ftp://sunsite.cnlab-switch.ch/mirror/gnu/cpio/cpio-2.8.tar.gz
   4.300 +   # tar xzf cpio-2.8.tar.gz
   4.301 +   # cd cpio-2.8
   4.302 +   # ./configure --prefix=/usr --bindir=/bin \
   4.303 +     --libexecdir=/usr/bin --mandir=/usr/share/man \
   4.304 +     --infodir=/usr/share/info
   4.305 +   # make
   4.306 +   # make DESTDIR=$PWD/_pkg install
   4.307 +   # strip -v _pkg/bin/*
   4.308 +   # strip -v _pkg/usr/bin/*
   4.309 +
   4.310 +nstalling "cpio" in /bin and "rmt" in /usr/bin. You can also install the French locale files:
   4.311 +
   4.312 +   # cp -a _pkg/bin/* $fs/bin
   4.313 +   # cp -a _pkg/usr/bin/* $fs/usr/bin
   4.314 +   # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
   4.315 +
   4.316 +===== microperl-5.8.8 - A tiny Perl =====
   4.317 +
   4.318 +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:
   4.319 +
   4.320 +   # wget http://ftp.funet.fi/pub/CPAN/src/perl-5.8.8.tar.gz
   4.321 +   # tar xzf perl-5.8.8.tar.gz
   4.322 +   # cd perl-5.8.8
   4.323 +   # sed -i s/'usr\/local'/'usr'/ uconfig.sh
   4.324 +   # sed -i s/'perl5\/5.9'/'perl5'/ uconfig.sh
   4.325 +   # sed -i s/'unknown'/'i486-pc-linux-gnu'/ uconfig.sh
   4.326 +   # make -f Makefile.micro regen_uconfig
   4.327 +   # make -f Makefile.micro
   4.328 +   # strip microperl
   4.329 +   # cp microperl $fs/usr/bin
   4.330 +   # chroot $fs /bin/ash
   4.331 +   /# cd /usr/bin
   4.332 +   /# ln -s microperl perl
   4.333 +   /# exit
   4.334 +
   4.335 +===== module-init-tools-3.2 - Utilities for manipulating kernel modules =====
   4.336 +
   4.337 +The [[http://ftp.kernel.org/pub/linux/utils/kernel/module-init-tools/|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:
   4.338 +
   4.339 +   # cd ..
   4.340 +   # wget http://ftp.kernel.org/pub/linux/utils/kernel/module-init-tools/module-init-tools-3.2.tar.bz2
   4.341 +   # tar xjf module-init-tools-3.2.tar.bz2
   4.342 +   # cd module-init-tools-3.2
   4.343 +   # ./configure --enable-zlib --prefix=/usr --sbindir=/sbin --bindir=/bin \
   4.344 +     --sysconfdir=/etc --infodir=/usr/share/info --mandir=/usr/share/man
   4.345 +   # make
   4.346 +   # make DESTDIR=$PWD/_pkg install
   4.347 +   # strip -v _pkg/sbin/{depmod,insmod,modinfo,modprobe,rmmod}
   4.348 +   # strip -v _pkg/bin/lsmod
   4.349 +   # cp -i _pkg/sbin/{depmod,insmod,modinfo,modprobe,rmmod} $fs/sbin
   4.350 +   # cp -i _pkg/bin/lsmod $fs/bin
   4.351 +   # cd ..
   4.352 +
   4.353 +===== Copy kernel modules =====
   4.354 +
   4.355 +Copy files from linux-2.6.20/_pkg:
   4.356 +
   4.357 +   # cp -a linux-2.6.20/_pkg/lib/* $fs/lib
   4.358 +
   4.359 +==== Compress kernel modules ====
   4.360 +
   4.361 +Compress modules, this step will gain us 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:
   4.362 +
   4.363 +   # cd $fs
   4.364 +
   4.365 +With 'gztazmod.sh':
   4.366 +
   4.367 +   # cp -v ../src/slitaz-tools-1.1/utils/gztazmod.sh sbin
   4.368 +   # ./sbin/gztazmod.sh lib/modules/2.6.20-slitaz
   4.369 +
   4.370 +Or by hand:
   4.371 +
   4.372 +   # cd lib/modules/2.6.20-slitaz
   4.373 +   # find . -name "*.ko" -exec gzip '{}' \;
   4.374 +   # sed 's/\.ko/.ko.gz/g' modules.dep > tmp.dep
   4.375 +   # rm modules.dep
   4.376 +   # mv tmp.dep modules.dep
   4.377 +
   4.378 +===== Generate the initramfs and an ISO image =====
   4.379 +
   4.380 +To create a new ISO image, you can use 'mktaziso' in [[http://doc.slitaz.org/en:cookbook:slitaztools|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:
   4.381 +
   4.382 +   # cd $fs
   4.383 +   # find . -print | cpio -o -H newc | gzip -9 > ../rootfs.gz
   4.384 +   # cd ..
   4.385 +   # cp rootfs.gz rootcd/boot
   4.386 +   # genisoimage -R -o slitaz-test.iso -b boot/isolinux/isolinux.bin \
   4.387 +     -c boot/isolinux/boot.cat -no-emul-boot -boot-load-size 4 \
   4.388 +     -V "SliTaz" -input-charset iso8859-1 -boot-info-table rootcd
   4.389 +
   4.390 +Test iso image:
   4.391 +
   4.392 +   # qemu -cdrom slitaz-test.iso
   4.393 +
   4.394 +==== Following chapter ====
   4.395 +
   4.396 +The next chapter is called [[base-ncurses|Base Ncurses]]. It covers the installation and configuration of the ncurses libraries and applications.
   4.397 \ No newline at end of file
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/pages/en/scratchbook/base-ncurses.txt	Sun May 01 07:41:07 2011 +0000
     5.3 @@ -0,0 +1,303 @@
     5.4 +====== Ncurses libraries and applications ======
     5.5 +
     5.6 +Installation and configuration of ncurses libraries and applications.
     5.7 +
     5.8 +===== About =====
     5.9 +
    5.10 +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 [[http://doc.slitaz.org/en:cookbook:slitaztools|SliTaz tools]].
    5.11 +
    5.12 +==== Assign an environment variable ($fs) ====
    5.13 +
    5.14 +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:
    5.15 +
    5.16 +   # export fs=$PWD/rootfs
    5.17 +
    5.18 +To check:
    5.19 +
    5.20 +   # echo $fs
    5.21 +
    5.22 +===== ncurses-5.6 - Terminal utilities and libraries =====
    5.23 +
    5.24 +ncurses ([[http://dickey.his.com/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:
    5.25 +
    5.26 +   # cd src
    5.27 +   # wget ftp://invisible-island.net/ncurses/ncurses-5.6.tar.gz
    5.28 +   # tar xzf ncurses-5.6.tar.gz
    5.29 +   # cd ncurses-5.6
    5.30 +   # ./configure --prefix=/usr \
    5.31 +     --libdir=/lib --sysconfdir=/etc \
    5.32 +     --infodir=/usr/share/info --mandir=/usr/share/man \
    5.33 +     --with-shared --without-debug --without-ada
    5.34 +   # make
    5.35 +   # make DESTDIR=$PWD/_pkg install
    5.36 +   # strip -v _pkg/lib/*
    5.37 +   # strip -v _pkg/usr/bin/*
    5.38 +
    5.39 +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:
    5.40 +
    5.41 +   # cp -a _pkg/lib/libncurses.so* $fs/lib
    5.42 +   # cp -ia _pkg/usr/bin/{clear,ncurses5-config,tset,reset} \
    5.43 +     $fs/usr/bin
    5.44 +
    5.45 +Copy terminfo files, we only use a few files. If you want more, you can copy:
    5.46 +
    5.47 +   # mkdir -v $fs/usr/share/terminfo
    5.48 +   # mkdir -v $fs/usr/share/terminfo/{a,l,r,v,x}
    5.49 +   # cp _pkg/usr/share/terminfo/a/ansi \
    5.50 +     $fs/usr/share/terminfo/a
    5.51 +   # cp _pkg/usr/share/terminfo/l/linux \
    5.52 +     $fs/usr/share/terminfo/l
    5.53 +   # cp _pkg/usr/share/terminfo/r/rxvt \
    5.54 +     $fs/usr/share/terminfo/r
    5.55 +   # cp _pkg/usr/share/terminfo/x/{xterm,xterm-color,xterm-new,xterm-vt220} \
    5.56 +     $fs/usr/share/terminfo/x
    5.57 +   # cp _pkg/usr/share/terminfo/v/{vt100,vt102*} \
    5.58 +     $fs/usr/share/terminfo/v
    5.59 +
    5.60 +Copy the tabset files:
    5.61 +
    5.62 +   # cp -a _pkg/usr/share/tabset $fs/usr/share
    5.63 +
    5.64 +===== clex-3.16 - File Manager =====
    5.65 +
    5.66 +CLEX (http://www.clex.sk/) is a small ncurses file manager (160 KB). The configuration file (rc) is ~/clexrc; ~/.clexbm is used for bookmarks:
    5.67 +
    5.68 +   # cd ..
    5.69 +   # wget http://www.clex.sk/download/clex-3.16.tar.gz
    5.70 +   # tar xzf clex-3.16.tar.gz
    5.71 +   # cd clex-3.16
    5.72 +   # ./configure --prefix=/usr --infodir=/usr/share/info \
    5.73 +     --mandir=/usr/share/man
    5.74 +   # make
    5.75 +   # make DESTDIR=$PWD/_pkg install
    5.76 +   # strip -v _pkg/usr/bin/clex
    5.77 +
    5.78 +Install the clex binary in the rootfs of SliTaz:
    5.79 +
    5.80 +   # cp _pkg/usr/bin/clex $fs/usr/bin
    5.81 +
    5.82 +==== libs ====
    5.83 +
    5.84 +If we execute the "ldd" command on clex, the following dependancies should be displayed:
    5.85 +<file>
    5.86 +          libncurses.so.5 => /lib/libncurses.so.5 (0x40025000)
    5.87 +          libc.so.6 => /lib/libc.so.6 (0x40064000)
    5.88 +          /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
    5.89 +</file>
    5.90 +===== nano-2.0.6 - Advanced Text Editor =====
    5.91 +
    5.92 +GNU nano ([[http://www.nano-editor.org/|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:
    5.93 +
    5.94 +   # cd ..
    5.95 +   # wget http://www.nano-editor.org/dist/v2.0/nano-2.0.6.tar.gz
    5.96 +   # tar xzf nano-2.0.6.tar.gz
    5.97 +   # cd nano-2.0.6
    5.98 +   # ./configure --enable-all --enable-extra --prefix=/usr \
    5.99 +     --infodir=/usr/share/info --mandir=/usr/share/man \
   5.100 +     --sysconfdir=/etc
   5.101 +   # make
   5.102 +   # make DESTDIR=$PWD/_pkg install
   5.103 +   # strip -v _pkg/usr/bin/nano
   5.104 +
   5.105 +Copy the nano binary and the rnano link in SliTaz:
   5.106 +
   5.107 +   # cp -a _pkg/usr/bin/* $fs/usr/bin
   5.108 +
   5.109 +Copy the configuration files in _pkg/usr/share/nano to our rootfs:
   5.110 +
   5.111 +   # cp -a _pkg/usr/share/nano $fs/usr/share
   5.112 +
   5.113 +==== libs ====
   5.114 +
   5.115 +If we execute the "ldd" command on nano, the following dependancies should be displayed:
   5.116 +<file>
   5.117 +          libncurses.so.5 => /lib/libncurses.so.5 (0x40025000)
   5.118 +          libc.so.6 => /lib/libc.so.6 (0x40064000)
   5.119 +          /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
   5.120 +</file>
   5.121 +==== locale ====
   5.122 +
   5.123 +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:
   5.124 +
   5.125 +   # cp -a _pkg/usr/share/locale/fr/LC_MESSAGES $fs/usr/share/locale/fr
   5.126 +
   5.127 +==== Customize nano ====
   5.128 +
   5.129 +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 [[http://doc.slitaz.org/en:cookbook:slitaztools|SliTaz tools]].
   5.130 +
   5.131 +For a system configuration file, you can copy the file in SliTaz tools to /etc in the rootfs:
   5.132 +
   5.133 +   # cd ..
   5.134 +   # cp -a slitaz-tools-1.1/etc/nanorc $fs/etc
   5.135 +
   5.136 +===== retawq-0.2.6c - Text mode Web browser =====
   5.137 +
   5.138 +retawq ([[http://retawq.sourceforge.net/|retawq.sourceforge.net]]) is a small text-only web browser. We only flag a few useful options when configuring, retawq needs terminfo files, libncurses libraries and libthread:
   5.139 +
   5.140 +   # wget http://switch.dl.sourceforge.net/sourceforge/retawq/retawq-0.2.6c.tar.gz
   5.141 +   # tar xzf retawq-0.2.6c.tar.gz
   5.142 +   # cd retawq-0.2.6c
   5.143 +   # ./configure --enable-i18n --enable-local-cgi --path-prefix=/usr \
   5.144 +     --path-doc=/usr/share/doc/retawq --path-man=/usr/share/man
   5.145 +   # make
   5.146 +   # strip -v retawq
   5.147 +
   5.148 +Copy the retawq binary in SliTaz:
   5.149 +
   5.150 +   # cp retawq $fs/usr/bin
   5.151 +
   5.152 +==== libs ====
   5.153 +<file>
   5.154 +          libncurses.so.5 => /lib/libncurses.so.5 (0x40025000)
   5.155 +          libpthread.so.0 => /lib/libpthread.so.0 (0x40064000)
   5.156 +          libc.so.6 => /lib/libc.so.6 (0x40074000)
   5.157 +          /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
   5.158 +</file>
   5.159 +You can copy the lipthread library from your host system or use the minimum package glibc-2.3.6 distributed by SliTaz:
   5.160 +
   5.161 +   # cp -a /lib/libpthread* $fs/lib
   5.162 +   # strip --strip-unneeded $fs/lib/*
   5.163 +
   5.164 +==== locale ====
   5.165 +
   5.166 +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:
   5.167 +
   5.168 +   # cp -v i18n/fr.mo $fs/usr/share/locale/fr/LC_MESSAGES/retawq.mo
   5.169 +
   5.170 +==== Customize retawq ====
   5.171 +
   5.172 +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.
   5.173 +
   5.174 +===== htop-6.0.5 - System process viewer =====
   5.175 +
   5.176 +htop ([[http://htop.sourceforge.net/|htop.sourceforge.net/]]) is software that displays system processes using ncurses.
   5.177 +
   5.178 +Returning to the /src directory, download, unpack, configure, compile and clean (with strip):
   5.179 +
   5.180 +   # cd ..
   5.181 +   # wget http://switch.dl.sourceforge.net/sourceforge/htop/htop-0.6.5.tar.gz
   5.182 +   # tar xzf htop-0.6.5.tar.gz
   5.183 +   # cd htop-0.6.5
   5.184 +   # ./configure --prefix=/usr --mandir=/usr/share/man
   5.185 +   # make
   5.186 +   # make DESTDIR=$PWD/_pkg install
   5.187 +   # strip -v _pkg/usr/bin/htop
   5.188 +
   5.189 +Copy the htop binary in SliTaz:
   5.190 +
   5.191 +   # cp _pkg/usr/bin/htop $fs/usr/bin
   5.192 +
   5.193 +You can still copy the htop icon found in: _pkg/usr/share/pixmaps.
   5.194 +
   5.195 +==== libs ====
   5.196 +<file>
   5.197 +          libm.so.6 => /lib/libm.so.6 (0xb7f97000)
   5.198 +          libncurses.so.5 => /lib/libncurses.so.5 (0xb7f55000)
   5.199 +          libc.so.6 => /lib/libc.so.6 (0xb7e20000)
   5.200 +          /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0xb7fc9000)
   5.201 +</file>
   5.202 +===== dialog-1.1.20070409 - GUI shell scripts =====
   5.203 +
   5.204 +dialog ([[http://invisible-island.net/dialog/dialog.html|invisible-island.net/dialog/dialog.html]]), is a utility to build GUI-based consoles:
   5.205 +
   5.206 +   # cd ..
   5.207 +   # wget ftp://invisible-island.net/dialog/dialog.tar.gz
   5.208 +   # tar xzf dialog.tar.gz
   5.209 +   # cd dialog-1.1-20070409
   5.210 +   # ./configure --enable-nls --with-ncurses --prefix=/usr \
   5.211 +     --sysconfdir=/etc --mandir=/usr/share/man
   5.212 +   # make
   5.213 +   # make DESTDIR=$PWD/_pkg install
   5.214 +   # strip -v _pkg/usr/bin/dialog
   5.215 +
   5.216 +Copy dialog binary in SliTaz:
   5.217 +
   5.218 +   # cp _pkg/usr/bin/dialog $fs/usr/bin
   5.219 +
   5.220 +==== libs ====
   5.221 +<file>
   5.222 +          libncurses.so.5 => /lib/libncurses.so.5 (0x40027000)
   5.223 +          libm.so.6 => /lib/libm.so.6 (0x40066000)
   5.224 +          libc.so.6 => /lib/libc.so.6 (0x40089000)
   5.225 +          /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
   5.226 +</file>
   5.227 +==== locale ====
   5.228 +
   5.229 +You can install locale files if you wish:
   5.230 +
   5.231 +   # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
   5.232 +
   5.233 +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.
   5.234 +
   5.235 +===== Ninvaders-0.1.1 - Space Invaders clone =====
   5.236 +
   5.237 +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:
   5.238 +
   5.239 +   # cd ..
   5.240 +   # wget http://ovh.dl.sourceforge.net/sourceforge/ninvaders/ninvaders-0.1.1.tar.gz
   5.241 +   # tar xzf ninvaders-0.1.1.tar.gz
   5.242 +   # cd ninvaders-0.1.1
   5.243 +   # make
   5.244 +   # strip -v nInvaders
   5.245 +   # cp nInvaders $fs/usr/games
   5.246 +
   5.247 +===== bastet-0.41 - Bastard Tetris clone =====
   5.248 +
   5.249 +A game of Tetris (17 KB):
   5.250 +
   5.251 +   # wget http://fph.altervista.org/prog/bastet-0.41.tgz
   5.252 +   # tar xzf bastet-0.41.tgz
   5.253 +   # cd bastet-0.41
   5.254 +   # make
   5.255 +   # strip bastet
   5.256 +   # cp bastet $fs/usr/games
   5.257 +   # mkdir -p $fs/var/games
   5.258 +   # touch $fs/var/games/bastet.scores
   5.259 +   # chmod 666 $fs/var/games/bastet.scores
   5.260 +
   5.261 +===== rhapsody-0.28b - IRC chat client =====
   5.262 +
   5.263 +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:
   5.264 +
   5.265 +   # cd ..
   5.266 +   # wget http://switch.dl.sourceforge.net/sourceforge/rhapsody/rhapsody_0.28b.tgz
   5.267 +   # tar xzf rhapsody_0.28b.tgz
   5.268 +   # cd rhapsody-0.28b
   5.269 +   # ./configure -i /usr/bin -d /usr/share/doc/rhapsody
   5.270 +   # make
   5.271 +   # strip -v rhapsody
   5.272 +
   5.273 +Install the binary and help files in SliTaz. We must adjust permissions on these files so that everyone can read:
   5.274 +
   5.275 +   # cp rhapsody $fs/usr/bin
   5.276 +   # mkdir $fs/usr/share/doc/rhapsody
   5.277 +   # cp -a help $fs/usr/share/doc/rhapsody/help
   5.278 +   # chmod 644 $fs/usr/share/doc/rhapsody/help/*
   5.279 +
   5.280 +==== libs ====
   5.281 +
   5.282 +Rhapsody uses the following libraries:
   5.283 +<file>
   5.284 +          libncurses.so.5 => /lib/libncurses.so.5 (0x40026000)
   5.285 +          libc.so.6 => /lib/libc.so.6 (0x40066000)
   5.286 +          /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000))
   5.287 +</file>
   5.288 +==== Rhapsody use the following libraries: ====
   5.289 +
   5.290 +You can customize rhapsody via ~/.rhapsodyrc or use <Ctrl+T> for options:
   5.291 +
   5.292 +===== Generate the initramfs and an ISO image =====
   5.293 +
   5.294 +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:
   5.295 +
   5.296 +   # cd $fs
   5.297 +   # find . -print | cpio -o -H newc | gzip -9 > ../rootfs.gz
   5.298 +   # cd ..
   5.299 +   # cp rootfs.gz rootcd/boot
   5.300 +   # genisoimage -R -o slitaz-cooking.iso -b boot/isolinux/isolinux.bin \
   5.301 +     -c boot/isolinux/boot.cat -no-emul-boot -boot-load-size 4 \
   5.302 +     -V "SliTaz" -input-charset iso8859-1 -boot-info-table rootcd
   5.303 +
   5.304 +==== Following chapter ====
   5.305 +
   5.306 +The next chapter describes the installation of the [[locale|locales]] and i18n.
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/pages/en/scratchbook/base-system.txt	Sun May 01 07:41:07 2011 +0000
     6.3 @@ -0,0 +1,494 @@
     6.4 +====== Base System ======
     6.5 +
     6.6 +Build a SliTaz GNU/Linux distro running in RAM and using BusyBox.
     6.7 +
     6.8 +
     6.9 +===== About =====
    6.10 +
    6.11 +This document describes the construction of the SliTaz base system and why we use a Linux Kernel, BusyBox and Syslinux to boot the system. SliTaz uses an initramfs archive unpacked in RAM by the kernel at boot. We will create a box to hold a root of 3 to 4MB and use strip on the libraries and binaries to save space.
    6.12 +
    6.13 +The scripts and configuration files are created with GNU nano, using the keystroke <ctrl+x> to save and exit. But of course you are free to replace with your own text editor.
    6.14 +
    6.15 +This document is based on a howto found in the archive of BusyBox, which is itself based on a paper presented by Erik Anderson in the Embedded Systems Conference in 2001.
    6.16 +
    6.17 +===== Wget src =====
    6.18 +
    6.19 +Create a src directory for downloading and compiling:
    6.20 +
    6.21 +   # mkdir -p src
    6.22 +   # cd src
    6.23 +
    6.24 +  * Linux Kernel 2.6.20 (http://www.kernel.org/).
    6.25 +
    6.26 +   # wget ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.20.tar.bz2
    6.27 +
    6.28 +  * Busybox 1.2.2 (http://www.busybox.net/).
    6.29 +
    6.30 +   # wget http://www.busybox.net/downloads/busybox-1.2.2.tar.bz2
    6.31 +
    6.32 +  * Syslinux 3.35 (http://syslinux.zytor.com/).
    6.33 +
    6.34 +   # wget ftp://ftp.kernel.org/pub/linux/boot/syslinux/syslinux-3.35.tar.gz
    6.35 +
    6.36 +  * SliTaz tools 1.1. Download SliTaz tools, unpack, save the file in src/ and that's it:
    6.37 +
    6.38 +     # wget http://download.tuxfamily.org/slitaz/sources/tools/slitaz-tools-1.1.tar.gz
    6.39 +     # tar xzf slitaz-tools-1.1.tar.gz
    6.40 +
    6.41 +===== Unpack and prepare the Linux Kernel =====
    6.42 +
    6.43 +We will begin by compiling a Linux kernel, which may take a little time.
    6.44 +
    6.45 +==== Linux Kernel ====
    6.46 +
    6.47 +Your kernel must support the intramfs filesystem, otherwise the cdrom will not start. You can also install the modules in a directory so as not to touch the host system. The configuration of the Linux kernel sources is done by "make menuconfig" using ncurses or graphically with "make gconfig" or "make xconfig" using GTK development packages and/or QT respectively. You can find in [[http://doc.slitaz.org/en:cookbook:slitaztools|SliTaz tools]], Makefiles for the various 2.6.xx kernels.
    6.48 +
    6.49 +A feature of the 2.6 kernels is that if we make menuconfig, xconfig or config for the first time, the setup menu is displayed based on the configuration of our current kernel.
    6.50 +
    6.51 +The options depend on your needs, you can install module-init-tools to support compressed modules or for a minimal install, you can select only the vital options.
    6.52 +
    6.53 +We start by changing into the sources, "make mrproper" to put things in order, then we start a configuration interface: gconfig, xconfig, menuconfig or oldconfig:
    6.54 +
    6.55 +   # tar xjf linux-2.6.20.tar.bz2
    6.56 +   # cd linux-2.6.20
    6.57 +   # make mrproper
    6.58 +   # cp ../slitaz-tools-1.1/Makefiles/linux-2.6.20-slitaz.config .config
    6.59 +   # make oldconfig
    6.60 +   (# make menuconfig)
    6.61 +   # make bzImage
    6.62 +   # make modules
    6.63 +   # make INSTALL_MOD_PATH=$PWD/_pkg modules_install
    6.64 +   # cd ..
    6.65 +
    6.66 +If you want more info on compiling kernels, there are many textbooks. Note that you can install the kernel and after rebooting, you can compile your own kernel following the same instructions.
    6.67 +
    6.68 +===== Creation of the root system (rootfs) =====
    6.69 +
    6.70 +The next step will create a file named 'rootfs' - Root File System, in the working directory SliTaz/:
    6.71 +
    6.72 +   # mkdir ../rootfs
    6.73 +
    6.74 +==== Install BusyBox ====
    6.75 +
    6.76 +BusyBox ([[http://www.busybox.net/|www.busybox.net]]) is a single executable offering versions of the main tools necessary to use a Linux kernel. It is (mainly) intended to be used embedded and can do almost anything. As well as proposing (coreutils) shell commands and a daemons system, it also provides a websever and client/server (DHCP, udhcpc).
    6.77 +
    6.78 +   # tar xjf busybox-1.2.2.tar.bz2
    6.79 +
    6.80 +Configure and compile, remembering the dumpkmap options, init, etc - you can find help in the Makefile in SliTaz Busybox tools. Make install creates a _install directory in the current directory:
    6.81 +
    6.82 +   # cd busybox-1.2.2
    6.83 +   # cp ../slitaz-tools-1.1/Makefiles/busybox-1.2.2.config .config
    6.84 +   # make oldconfig
    6.85 +   (# make menuconfig)
    6.86 +   # make
    6.87 +   # make install
    6.88 +   # chmod 4755 _install/bin/busybox
    6.89 +
    6.90 +Copy files compiled by BusyBox in the directory _install to the root file system (rootfs):
    6.91 +
    6.92 +   # cp -a _install/* ../../rootfs
    6.93 +
    6.94 +The linuxrc link pointing to /bin/busybox, folders /bin, /lib and /sbin were added to the directory /rootfs - you can check this. It may be that the link isn't there if you didn't select the option initrd support in Busybox. We'll delete the linuxrc link and create a link for init that points to /bin/busybox:
    6.95 +
    6.96 +   # cd ../../rootfs
    6.97 +   # ls -CF
    6.98 +   bin/  linuxrc@  sbin/  usr/
    6.99 +
   6.100 +   # rm linuxrc
   6.101 +   # ln -s bin/busybox init
   6.102 +
   6.103 +==== ldd on BusyBox ====
   6.104 +
   6.105 +The ldd command can show any libraries used by a program. Libraries used by Busybox may differ depending on the host system. On Debian for example, copying the libraries in /lib/tls. The following commands are given using 'v' for verbose mode. To eliminate the symbols of executable binaries and shared libraries we can utilize strip. Note you may also use the mklibs or uClibc libraries.
   6.106 +
   6.107 +   # mkdir lib
   6.108 +
   6.109 +SliTaz or another:
   6.110 +
   6.111 +   # cp /lib/{libcrypt.so.1,libm.so.6,libc.so.6} lib
   6.112 +   # cp /lib/ld-linux.so.2 lib
   6.113 +
   6.114 +Example on Debian Etch:
   6.115 +
   6.116 +   # cp /lib/tls/{libcrypt.so.1,libm.so.6,libc.so.6} lib
   6.117 +   # cp /lib/ld-linux.so.2 lib
   6.118 +
   6.119 +Cleanup libraries with strip:
   6.120 +
   6.121 +   # strip -v lib/*
   6.122 +
   6.123 +==== Linux tree and configuration ====
   6.124 +
   6.125 +Make some directories for a classic Linux branch SliTaz installation. /dev for devices, /etc, /home, /usr, /proc, /root and co. To learn more about the hierarchy of a file system and its contents, there is a File System Hierarchy Standard available in various formats at [[http://www.pathname.com/fhs/|www.pathname.com/fhs/]].
   6.126 +
   6.127 +You are free to create your own directory tree. In traditional Unix systems, /usr usually contains files from the distribution, /dev contains devices (devices), /etc contains configuration files, /lib libraries, /home for home users and /var for variable data. Note that we do not create /lib, /bin or /sbin - these are created when BusyBox is installed.
   6.128 +
   6.129 +   # mkdir -p dev etc root home proc media mnt sys tmp var
   6.130 +   # mkdir -p usr/{lib,local,games,share} \
   6.131 +     var/{cache,lib,lock,log,games,run,spool} \
   6.132 +     media/{cdrom,flash,usbdisk}
   6.133 +
   6.134 +Change permissions on the /tmp directory:
   6.135 +
   6.136 +   # chmod 1777 tmp
   6.137 +
   6.138 +Setting up glibc - note /etc/ld.so.conf and /etc/rpc are not essential for a micro system:
   6.139 +
   6.140 +   # touch etc/ld.so.conf
   6.141 +   # cp /etc/rpc etc
   6.142 +
   6.143 +==== Create the devices in /dev ====
   6.144 +
   6.145 +This can be done with the script 'mkdevs.sh' found in BusyBox, or with our script 'mktazdevs.sh' in SliTaz tools. If you want more details, read the scripts. If you used the BusyBox version, we must still create the pts directory:
   6.146 +
   6.147 +   # cp ../src/slitaz-tools-1.1/utils/mktazdevs.sh bin
   6.148 +   # ./bin/mktazdevs.sh dev
   6.149 +
   6.150 +or:
   6.151 +
   6.152 +   # cp ../src/busybox-1.2.2/examples/bootfloppy/mkdevs.sh bin
   6.153 +   # ./bin/mkdevs.sh dev
   6.154 +   # mkdir -p dev/{pts,input,shm,net,usb}
   6.155 +
   6.156 +Note that we start mdev-s with the rcS script to create devices dynamically at boot.
   6.157 +
   6.158 +==== Support for the resolution of hostnames (DNS) ====
   6.159 +
   6.160 +Copy the libraries libnss_* of the host system into our SliTaz system. These libraries are used for name resolution and are cleaned with strip:
   6.161 +
   6.162 +   # cp /lib/{libnss_dns.so.2,libnss_files.so.2} lib
   6.163 +   # cp /lib/libresolv.so.2 lib
   6.164 +   # strip -v lib/*.so*
   6.165 +
   6.166 +===== Configuration of your box =====
   6.167 +
   6.168 +Create the necessary files in /etc. For more info, just look at the contents of the files. We start by creating some files relevant to the core operating system.
   6.169 +
   6.170 +==== Configure network ====
   6.171 +
   6.172 +Create basic files used to configure the network:
   6.173 +
   6.174 +   # echo "127.0.0.1      localhost" > etc/hosts
   6.175 +   # echo "localnet    127.0.0.1" > etc/networks
   6.176 +   # echo "slitaz" > etc/hostname
   6.177 +   # echo "order hosts,bind" > etc/host.conf
   6.178 +   # echo "multi on" >> etc/host.conf
   6.179 +
   6.180 +==== /etc/nsswitch.conf ====
   6.181 +
   6.182 +Configuration files used to resolve names:
   6.183 +
   6.184 +   # nano etc/nsswitch.conf
   6.185 +<file>
   6.186 +  # /etc/nsswitch.conf: GNU Name Service Switch config.
   6.187 +  #
   6.188 +
   6.189 +  passwd:     files
   6.190 +  group:      files
   6.191 +  shadow:     files
   6.192 +
   6.193 +  hosts:      files dns
   6.194 +  networks:   files
   6.195 +</file>
   6.196 +==== /etc/securetty ====
   6.197 +
   6.198 +/etc/securetty lists terminals that can connect to root:
   6.199 +
   6.200 +   # nano etc/securetty
   6.201 +<file>
   6.202 +  # /etc/securetty: List of terminals on which root is allowed to login.
   6.203 +  #
   6.204 +  console
   6.205 +
   6.206 +  # For people with serial port consoles
   6.207 +  ttyS0
   6.208 +
   6.209 +  # Standard consoles
   6.210 +  tty1
   6.211 +  tty2
   6.212 +  tty3
   6.213 +  tty4
   6.214 +  tty5
   6.215 +  tty6
   6.216 +  tty7
   6.217 +</file>
   6.218 +==== /etc/shells ====
   6.219 +
   6.220 +/etc/shells, a shells list of valid connections. This file is used by the SSH server (Dropbear):
   6.221 +
   6.222 +   # nano etc/shells
   6.223 +<file>
   6.224 +  # /etc/shells: valid login shells.
   6.225 +  /bin/sh
   6.226 +  /bin/ash
   6.227 +  /bin/hush
   6.228 +</file>
   6.229 +==== /etc/issue and /etc/motd ====
   6.230 +
   6.231 +/etc/issue is displayed at the end of boot and the message of the day is displayed after logging in:
   6.232 +
   6.233 +   # echo "SliTaz GNU/Linux 1.0 Kernel \r \l" > etc/issue
   6.234 +   # echo "" >> etc/issue
   6.235 +   # nano etc/motd
   6.236 +<file>
   6.237 +   (°-  { Get documentation in: /usr/share/doc.
   6.238 +   //\    Use: 'less' or 'more' to read files, 'su' to be root. }
   6.239 +   v_/_
   6.240 +
   6.241 +  SliTaz is distributed in the hope that it will be useful, but
   6.242 +  with ABSOLUTELY NO WARRANTY.
   6.243 +</file>
   6.244 +==== /etc/busybox.conf ====
   6.245 +
   6.246 +The configuration file for BusyBox, it can set duties on BusyBox applications. For more information, you can read the [[http://doc.slitaz.org/en:handbook:security|security]] page in the Handbook. BusyBox.conf file:
   6.247 +
   6.248 +   # nano etc/busybox.conf
   6.249 +<file>
   6.250 +  # /etc/busybox.conf: SliTaz GNU/linux Busybox configuration.
   6.251 +  #
   6.252 +
   6.253 +  [SUID]
   6.254 +  # Allow command to be run by anyone.
   6.255 +  su = ssx root.root
   6.256 +  passwd = ssx root.root
   6.257 +  loadkmap = ssx root.root
   6.258 +  mount = ssx root.root
   6.259 +  reboot = ssx root.root
   6.260 +  halt = ssx root.root
   6.261 +</file>
   6.262 +For added security, change the permissions on the file:
   6.263 +
   6.264 +   # chmod 600 etc/busybox.conf
   6.265 +
   6.266 +==== /etc/inittab ====
   6.267 +
   6.268 +Minimal configuration file for init. It helps to have a root console without having to go through the login and a console on tty2.
   6.269 +
   6.270 +   # nano etc/inittab
   6.271 +<file>
   6.272 +  # /etc/inittab: init configuration for SliTaz GNU/Linux.
   6.273 +
   6.274 +  ::sysinit:/etc/init.d/rcS
   6.275 +  ::respawn:-/bin/sh
   6.276 +  tty2::askfirst:-/bin/sh
   6.277 +  ::ctrlaltdel:/bin/umount -a -r
   6.278 +  ::ctrlaltdel:/sbin/reboot
   6.279 +</file>
   6.280 +You will also find a wider example of an inittab file in the archive of BusyBox.
   6.281 +
   6.282 +==== /etc/profile ====
   6.283 +
   6.284 +This file is read at each login and affects all users. We must use the ./profile config file for each individual user:
   6.285 +
   6.286 +   # nano etc/profile
   6.287 +<file>
   6.288 +  # /etc/profile: system-wide .profile file for the Bourne shells
   6.289 +
   6.290 +  PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
   6.291 +  LD_LIBRARY_PATH="/usr/lib:/lib"
   6.292 +
   6.293 +  if [ "`id -u`" -eq 0 ]; then
   6.294 +    PS1='\e[1m\u@\h:\w\#\e[m '
   6.295 +  else
   6.296 +    PS1='\e[1m\u@\h:\w\$\e[m '
   6.297 +  fi
   6.298 +
   6.299 +  DISPLAY=:0.0
   6.300 +
   6.301 +  export PATH LD_LIBRARY_PATH PS1 DISPLAY ignoreeof
   6.302 +  umask 022
   6.303 +</file>
   6.304 +==== Users, groups and passwords ====
   6.305 +
   6.306 +Create configuration files of users, groups and passwords in /etc/ {passwd, shadow, group, gshadow}, and adjust permissions:
   6.307 +
   6.308 +   # echo "root:x:0:0:root:/root:/bin/sh" > etc/passwd
   6.309 +   # echo "root::13525:0:99999:7:::" > etc/shadow
   6.310 +   # echo "root:x:0:" > etc/group
   6.311 +   # echo "root:*::" > etc/gshadow
   6.312 +   # chmod 640 etc/shadow
   6.313 +   # chmod 640 etc/gshadow
   6.314 +
   6.315 +You can add other users, like hacker is used by the LiveCD mode. You can also configure a password for the root user with the "passwd" command. To add an existing user to an existing group, you must edit /etc/group and /etc/gshadow because the applet "adduser" provided by BusyBox doesn't offer all of the options provided by the original program.
   6.316 +
   6.317 +==== /etc/fstab or /etc/mtab ====
   6.318 +
   6.319 +List filesystems to be mounted:
   6.320 +
   6.321 +   # nano etc/fstab
   6.322 +<file>
   6.323 +  # /etc/fstab: information about static file system.
   6.324 +  #
   6.325 +  proc            /proc        proc    defaults          0       0
   6.326 +  sysfs           /sys         sysfs   defaults          0       0
   6.327 +  devpts          /dev/pts     devpts  defaults          0       0
   6.328 +  tmpfs           /dev/shm     tmpfs   defaults          0       0
   6.329 +</file>
   6.330 +/etc/mtab is used by other mkfs*, for listing the mounted partitions. It needs /proc because there is a link on /proc/mounts:
   6.331 +
   6.332 +   # chroot . /bin/ash
   6.333 +   /# ln -s /proc/mounts /etc/mtab
   6.334 +
   6.335 +==== Keyboard ====
   6.336 +
   6.337 +You can create a kmap file specific to your keyboard with the dumpkmap command provided by BusyBox. You can find some kmap files in SliTaz tools. To create a fr_CH kmap file:
   6.338 +
   6.339 +   /# mkdir /usr/share/kmap
   6.340 +   /# /bin/busybox dumpkmap > /usr/share/kmap/fr_CH.kmap
   6.341 +   /# exit
   6.342 +
   6.343 +Once this is done, you can automatically load your keyboard with loadkmap in a /etc/init.d/rcS script:
   6.344 +
   6.345 +==== /usr/share/doc ====
   6.346 +
   6.347 +You can also add various documents, such as a SliTaz user manual, which you can download as a tar.gz from the website:
   6.348 +
   6.349 +   # mkdir -p usr/share/doc
   6.350 +
   6.351 +==== Installing the udhcpc script ====
   6.352 +
   6.353 +Udhcpc DHCP client supplied by Busybox is fast and stable, but is developed independently. Web site: http://udhcp.busybox.net/. You can use the default script found in the archive of BusyBox. This script goes into /usr/share/udhcpc/default.script, but this can be changed via the command line. On SliTaz, the client is started at boot by the script /etc/init.d/network.sh via the configuration file /etc/network.conf:
   6.354 +
   6.355 +   # mkdir usr/share/udhcpc
   6.356 +   # cp ../src/busybox-1.2.2/examples/udhcp/simple.script \
   6.357 +     usr/share/udhcpc/default.script
   6.358 +   # chmod +x usr/share/udhcpc/default.script
   6.359 +
   6.360 +==== /etc/init.d/rcS ====
   6.361 +
   6.362 +To finish off this draft, you must create the init script /etc/init.d/rcS to mount the filesystems and run some commands. For more information, you can look at the [[http://doc.slitaz.org/en:cookbook:bootscripts|boot scripts]] page. You can change the value of the variable KMAP= for the keyboard:
   6.363 +
   6.364 +   # mkdir etc/init.d
   6.365 +   # nano etc/init.d/rcS
   6.366 +<file>
   6.367 +  #! /bin/sh
   6.368 +  # /etc/init.d/rcS: rcS initial script.
   6.369 +  #
   6.370 +
   6.371 +  KMAP=fr_CH
   6.372 +
   6.373 +  echo "Processing /etc/init.d/rcS... "
   6.374 +
   6.375 +  /bin/mount proc
   6.376 +  /bin/mount -a
   6.377 +  /bin/hostname -F /etc/hostname
   6.378 +  /sbin/ifconfig lo 127.0.0.1 up
   6.379 +  /sbin/loadkmap < /usr/share/kmap/$KMAP.kmap
   6.380 +
   6.381 +   # chmod +x etc/init.d/rcS
   6.382 +</file>
   6.383 +==== Note ====
   6.384 +
   6.385 +Note that you can still install the Tazpkg package manager (10 kb) that we created, you will find information to install in the source tarball. You can also install various files from SliTaz tools, such as the licence.
   6.386 +
   6.387 +===== Build an initramfs cpio archive =====
   6.388 +
   6.389 +The initramfs is a "cpio" archive generated from the root of the system, it is decompressed in RAM by the Linux kernel at boot to create the filesystem (also in RAM). To generate an initramfs archive, using the root directory of system files (rootfs), we facilitate a search with "find" and add some pipes "|". Then we create a cpio archive using "gzip" which we put in the working directory.
   6.390 +
   6.391 +The SliTaz initramfs **rootfs.gz** is the root system, but with a ".gz" extension. If you want to change the name, you need to edit the configuration file for isolinux: isolinux.cfg or the menu.lst for GRUB.
   6.392 +
   6.393 +Generation of the initramfs:
   6.394 +
   6.395 +   # find . -print | cpio -o -H newc | gzip -9 > ../rootfs.gz
   6.396 +
   6.397 +You should now have a file rootfs.gz about 1 to 2MB in the working directory SliTaz/.
   6.398 +
   6.399 +For a new image, when making changes in rootfs, simply copy the new rootfs.gz archive to rootcd/boot and create a new image with "genisoimage" or "mkisofs". For this you can also use **mktaziso** within SliTaz tools. This script will check if the directories are present, create a new compressed cpio archive and generate a new bootable ISO image.
   6.400 +
   6.401 +===== Make rootcd files =====
   6.402 +
   6.403 +The following steps will help you create the root of the bootable CD-ROM. We begin by creating the rootcd, boot and isolinux directories for the cd-rom files:
   6.404 +
   6.405 +   # cd ..
   6.406 +   # mkdir -p rootcd/boot/isolinux
   6.407 +
   6.408 +Optionally, you can create some other directories in which to place various data, such as HTML documents or packages.
   6.409 +
   6.410 +==== Copy the kernel ====
   6.411 +
   6.412 +Just copy the kernel previously compiled to rootcd/boot:
   6.413 +
   6.414 +   # cp src/linux-2.6.20/arch/i386/boot/bzImage rootcd/boot
   6.415 +
   6.416 +==== Copy the initramfs into rootcd/boot ====
   6.417 +
   6.418 +Copy the rootfs.gz to rootcd/boot. We must not forget to generate a new initramfs archive for any changes made to the rootfs (root file system):
   6.419 +
   6.420 +   # cp rootfs.gz rootcd/boot
   6.421 +
   6.422 +==== Install the isolinux bootloader ====
   6.423 +
   6.424 +The bootloader isolinux - simply copy the isolinux.bin from the source archive of Syslinux:
   6.425 +
   6.426 +   # cd src
   6.427 +   # tar xzf syslinux-3.35.tar.gz
   6.428 +   # cp syslinux-3.35/isolinux.bin ../rootcd/boot/isolinux
   6.429 +   # cd ..
   6.430 +
   6.431 +==== isolinux.cfg - Configure isolinux ====
   6.432 +
   6.433 +Here is an example of an isolinux.cfg file that should work well. You can change it if you wish:
   6.434 +
   6.435 +   # nano rootcd/boot/isolinux/isolinux.cfg
   6.436 +<file>
   6.437 +  display display.txt
   6.438 +  default slitaz
   6.439 +  label slitaz
   6.440 +      kernel /boot/bzImage
   6.441 +      append initrd=/boot/rootfs.gz rw root=/dev/null vga=788
   6.442 +  implicit 0
   6.443 +  prompt 1
   6.444 +  timeout 80
   6.445 +</file>
   6.446 +Here are some changes that you might like to make in isolinux.cfg:
   6.447 +
   6.448 +  * The timeout value is the number of seconds to wait before booting You can make it 0 or delete the line to start instantly, or choose to wait as long as 10s.
   6.449 +  * prompt can be set to 0 to disable the 'boot:' prompt.
   6.450 +  * You can add more lines to view the contents of several text files when the user presses F1, F2, F3, etc.
   6.451 +
   6.452 +==== display.txt ====
   6.453 +
   6.454 +A small welcome note, powered by isolinux, you can modify this file if you wish:
   6.455 +
   6.456 +   # nano rootcd/boot/isolinux/display.txt
   6.457 +<file>
   6.458 +  /*       _\|/_
   6.459 +           (o o)
   6.460 +   +----oOO-{_}-OOo---------------------------------------------------+
   6.461 +       ____  _ _ _____
   6.462 +      / ___|| (_)_   _|_ _ ____
   6.463 +      \___ \| | | | |/ _` |_  /
   6.464 +       ___) | | | | | (_| |/ /
   6.465 +      |____/|_|_| |_|\__,_/___|
   6.466 +
   6.467 +   SliTaz GNU/Linux - Temporary Autonomous Zone
   6.468 +
   6.469 +       <ENTER> to boot.
   6.470 +
   6.471 +                                                                     */
   6.472 +</file>
   6.473 +===== Create an ISO image with genisoimage or mkisofs =====
   6.474 +
   6.475 +   # genisoimage -R -o slitaz-cooking.iso -b boot/isolinux/isolinux.bin \
   6.476 +     -c boot/isolinux/boot.cat -no-emul-boot -boot-load-size 4 \
   6.477 +     -V "SliTaz" -input-charset iso8859-1 -boot-info-table rootcd
   6.478 +
   6.479 +For each change in the root of the box, you must create a new ISO image.
   6.480 +
   6.481 +You can create a small script that will generate a new compressed cpio archive and a new image, or use mktaziso within SliTaz tools. Note that you can also use GRUB to boot the box.
   6.482 +
   6.483 +===== Burn or test ISO image with Qemu =====
   6.484 +
   6.485 +You can burn the ISO image with Graveman, k3b or wodim and boot it. Simple burning command using wodim (also valid for cdrecord), with a 2.6.XX. kernel:
   6.486 +
   6.487 +  # wodim -v -speed=24 -data slitaz-cooking.iso
   6.488 +
   6.489 +==== Qemu ====
   6.490 +
   6.491 +Note that you can test the ISO image with the software emulator Qemu (On Debian # aptitude install qemu). To emulate the newly created ISO image, simply type:
   6.492 +
   6.493 +  # qemu -cdrom slitaz-cooking.iso
   6.494 +
   6.495 +==== Following chapter ====
   6.496 +
   6.497 +The next chapter [[base-apps|Base applications]] provides all the instructions to install and configure the basic applications and libraries.
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/pages/en/scratchbook/boot-scripts.txt	Sun May 01 07:41:07 2011 +0000
     7.3 @@ -0,0 +1,79 @@
     7.4 +====== Boot scripts ======
     7.5 +
     7.6 +The startup and shutdown scripts with their configuration files.
     7.7 +
     7.8 +===== SliTaz and startup =====
     7.9 +
    7.10 +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.
    7.11 +
    7.12 +===== /etc/init.d/* - Directory of scripts and daemons =====
    7.13 +
    7.14 +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:
    7.15 +
    7.16 +   # /etc/init.d/daemon [start|stop|restart]
    7.17 +
    7.18 +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.
    7.19 +
    7.20 +===== /etc/init.d/rcS - Primary initialization script =====
    7.21 +
    7.22 +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:
    7.23 +
    7.24 +   # nano rootfs/etc/init.d/rcS
    7.25 +
    7.26 +===== Specific scripts and daemons =====
    7.27 +
    7.28 +==== bootopts.sh - LiveCD mode options ====
    7.29 +
    7.30 +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.
    7.31 +
    7.32 +==== network.sh - Initializing the network ====
    7.33 +
    7.34 +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.
    7.35 +
    7.36 +=== i18n.sh - Internationalization ===
    7.37 +
    7.38 +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.
    7.39 +
    7.40 +==== local.sh - Local commands ====
    7.41 +
    7.42 +The /etc/init.d/local.sh script allows the system administrator to add local commands to be executed at boot. Example:
    7.43 +<file>
    7.44 +  #!/bin/sh
    7.45 +  # /etc/init.d/local.sh: Local startup commands.
    7.46 +  # All commands here will be executed at boot time.
    7.47 +  #
    7.48 +  . /etc/init.d/rc.functions
    7.49 +
    7.50 +  echo "Starting local startup commands... "
    7.51 +</file>
    7.52 +==== rc.shutdown ====
    7.53 +
    7.54 +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.
    7.55 +
    7.56 +===== /etc/inittab - Configuration file init =====
    7.57 +
    7.58 +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 [[http://doc.slitaz.org/en:cookbook:slitaztools|SliTaz tools]]:
    7.59 +<file>
    7.60 +  # /etc/inittab: init configuration for SliTaz GNU/Linux.
    7.61 +  # Boot-time system configuration/initialization script.
    7.62 +  #
    7.63 +  ::sysinit:/etc/init.d/rcS
    7.64 +
    7.65 +  # /sbin/getty respawn shell invocations for selected ttys.
    7.66 +  tty1::respawn:/sbin/getty 38400 tty1
    7.67 +  tty2::respawn:/sbin/getty 38400 tty2
    7.68 +  tty3::respawn:/sbin/getty 38400 tty3
    7.69 +  tty4::respawn:/sbin/getty 38400 tty4
    7.70 +  tty5::respawn:/sbin/getty 38400 tty5
    7.71 +  tty6::respawn:/sbin/getty 38400 tty6
    7.72 +
    7.73 +  # Stuff to do when restarting the init
    7.74 +  # process, or before rebooting.
    7.75 +  ::restart:/etc/init.d/rc.shutdown
    7.76 +  ::restart:/sbin/init
    7.77 +  ::ctrlaltdel:/sbin/reboot
    7.78 +  ::shutdown:/etc/init.d/rc.shutdown
    7.79 +</file>
    7.80 +==== Following chapter ====
    7.81 +
    7.82 +The next chapter continues on with the [[x-window-system|X window system]].
    7.83 \ No newline at end of file
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/pages/en/scratchbook/gtk-apps.txt	Sun May 01 07:41:07 2011 +0000
     8.3 @@ -0,0 +1,213 @@
     8.4 +====== GTK+ Applications ======
     8.5 +
     8.6 +Compiliation and installation of applications using GTK+.
     8.7 +
     8.8 +===== About =====
     8.9 +
    8.10 +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|GTK+ libs]] chapter.
    8.11 +
    8.12 +==== Environmental variable ($fs) ====
    8.13 +
    8.14 +If you do not specify any path to the rootfs directory, export the environmental variable:
    8.15 +
    8.16 +   # export fs=$PWD/rootfs
    8.17 +
    8.18 +To check:
    8.19 +
    8.20 +   # echo $fs
    8.21 +
    8.22 +===== leafpad-0.8.10 - Simple text editor =====
    8.23 +
    8.24 +Website: http://tarot.freeshell.org/leafpad/
    8.25 +
    8.26 +   # wget http://savannah.nongnu.org/download/leafpad/leafpad-0.8.10.tar.gz
    8.27 +   # tar xzf leafpad-0.8.10.tar.gz
    8.28 +   # cd leafpad-0.8.10
    8.29 +   # ./configure --prefix=/usr
    8.30 +   # make
    8.31 +   # make DESTDIR=$PWD/_pkg install
    8.32 +   # strip _pkg/usr/bin/*
    8.33 +
    8.34 +==== Install in rootfs ====
    8.35 +
    8.36 +   # cp _pkg/usr/bin/* $fs/usr/bin
    8.37 +   # cp _pkg/usr/share/pixmaps/leafpad.png $fs/usr/share/pixmaps
    8.38 +   # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
    8.39 +
    8.40 +===== gitmail-0.4 - Ghost In The Mail, mail client =====
    8.41 +
    8.42 +Ghost in the mail allows users to quickly and easily send mail via SMTP.
    8.43 +
    8.44 +Website: http://gitmail.sourceforge.net/
    8.45 +
    8.46 +   # wget http://switch.dl.sourceforge.net/sourceforge/gitmail/gitmail-0.4.tar.gz
    8.47 +   # tar xzf gitmail-0.4.tar.gz
    8.48 +   # cd GhostInTheMail-0.4
    8.49 +   # ./configure --prefix=/usr
    8.50 +   # make
    8.51 +   # make DESTDIR=$PWD/_pkg \
    8.52 +     gitmaildocdir=/usr/share/doc/GhostInTheMail \
    8.53 +     install
    8.54 +   # strip _pkg/usr/bin/*
    8.55 +
    8.56 +==== Install in rootfs ====
    8.57 +
    8.58 +   # cp _pkg/usr/bin/* $fs/usr/bin
    8.59 +
    8.60 +===== gqview-2.0.4 - Images Manager =====
    8.61 +
    8.62 +Website: http://gqview.sourceforge.net/
    8.63 +
    8.64 +   # wget http://belnet.dl.sourceforge.net/sourceforge/gqview/gqview-2.0.4.tar.gz
    8.65 +   # tar xzf gqview-2.0.4.tar.gz
    8.66 +   # cd gqview-2.0.4
    8.67 +   # ./configure --prefix=/usr --mandir=/usr/share/man
    8.68 +   # make
    8.69 +   # make DESTDIR=$PWD/_pkg install
    8.70 +   # strip _pkg/usr/bin/*
    8.71 +
    8.72 +==== Install in rootfs ====
    8.73 +
    8.74 +   # cp _pkg/usr/bin/* $fs/usr/bin
    8.75 +   # cp _pkg/usr/share/pixmaps/* $fs/usr/share/pixmaps
    8.76 +   # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
    8.77 +
    8.78 +===== mtpaint-3.11 - Image creation and processing =====
    8.79 +
    8.80 +Website: http://mtpaint.sourceforge.net/
    8.81 +
    8.82 +   # wget http://switch.dl.sourceforge.net/sourceforge/mtpaint/mtpaint-3.11.tar.bz2
    8.83 +   # tar xjf mtpaint-3.11.tar.bz2
    8.84 +   # cd mtpaint-3.11
    8.85 +   # ./configure --cpu=i486 --prefix=/usr intl
    8.86 +   # make
    8.87 +   # strip src/mtpaint
    8.88 +
    8.89 +==== Install in rootfs ====
    8.90 +
    8.91 +   # cp src/mtpaint $fs/usr/bin
    8.92 +   # cp po/fr.mo $fs/usr/share/locale/fr/LC_MESSAGES/mtpaint.mo
    8.93 +   # cp src/icons1/icon.xpm $fs/usr/share/pixmaps/mtpaint.xpm
    8.94 +
    8.95 +===== Transmission-0.72 - Lightweight BitTorrent client =====
    8.96 +
    8.97 +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).
    8.98 +
    8.99 +Website: http://transmission.m0k.org/
   8.100 +
   8.101 +   # wget http://download.m0k.org/transmission/files/Transmission-0.72.tar.gz
   8.102 +   # tar xzf Transmission-0.72.tar.gz
   8.103 +
   8.104 +The archived version 0.72 is wrong:
   8.105 +   # mv "Transmission .72" Transmission-0.72
   8.106 +
   8.107 +   # cd Transmission-0.72
   8.108 +   # ./configure --prefix=/usr  --disable-openssl
   8.109 +   # make
   8.110 +   # strip gtk/transmission-gtk
   8.111 +   # strip cli/transmissioncli
   8.112 +
   8.113 +==== Install in rootfs ====
   8.114 +
   8.115 +   # cp gtk/transmission-gtk $fs/usr/bin
   8.116 +   # cp gtk/transmission.png $fs/usr/share/pixmaps
   8.117 +   # cp gtk/po/fr.mo $fs/usr/share/locale/fr/LC_MESSAGES/transmission-gtk.mo
   8.118 +
   8.119 +===== emelfm2-0.3.5 - File Manager =====
   8.120 +
   8.121 +The emelFM2 application is a file manager providing lots of useful functions, such as the mounting of devices, a text viewer, opening a terminal in the current directory and so on.
   8.122 +
   8.123 +Website: http://emelfm2.net/
   8.124 +
   8.125 +   # cd ..
   8.126 +   # wget http://emelfm2.net/rel/emelfm2-0.3.5.tar.gz
   8.127 +   # tar xzf emelfm2-0.3.5.tar.gz
   8.128 +   # cd emelfm2-0.3.5
   8.129 +   # make PREFIX=/usr
   8.130 +   # make i18n PREFIX=/usr
   8.131 +   # make install PREFIX=$PWD/_pkg/usr
   8.132 +   # make install_i18n PREFIX=$PWD/_pkg/usr
   8.133 +   # strip -v _pkg/usr/bin/*
   8.134 +   # strip -v _pkg/usr/lib/emelfm2/plugins/*
   8.135 +
   8.136 +==== Install in rootfs ====
   8.137 +
   8.138 +   # cp _pkg/usr/bin/* $fs/usr/bin
   8.139 +   # cp -a _pkg/usr/lib/* $fs/usr/lib
   8.140 +   # cp -a _pkg/usr/share/pixmaps $fs/usr/share
   8.141 +   # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
   8.142 +
   8.143 +===== geany-0.11 - Integrated Development Environment =====
   8.144 +
   8.145 +Geany is a simple, fast and light IDE offering colored syntax, tabs, autocompletion, aids to scripts and much more.
   8.146 +
   8.147 +Website: http://geany.uvena.de/
   8.148 +
   8.149 +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.
   8.150 +
   8.151 +Note: The force is with you, if you activate it via the option --enable-the-force.
   8.152 +
   8.153 +   # wget http://mesh.dl.sourceforge.net/sourceforge/geany/geany-0.11.tar.gz
   8.154 +   # tar xzf geany-0.11.tar.gz
   8.155 +   # cd geany-0.11
   8.156 +   # ./configure --prefix=/usr --mandir=/usr/share/man \
   8.157 +     --disable-vte --enable-the-force
   8.158 +   # make
   8.159 +   # make DESTDIR=$PWD/_pkg install
   8.160 +   # strip -v _pkg/usr/bin/*
   8.161 +
   8.162 +==== Install in rootfs ====
   8.163 +
   8.164 +   # cp _pkg/usr/bin/* $fs/usr/bin
   8.165 +   # cp -a _pkg/usr/share/geany $fs/usr/share
   8.166 +   # cp _pkg/usr/share/pixmaps/geany.png $fs/usr/share/pixmaps
   8.167 +   # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
   8.168 +
   8.169 +===== gftp-2.0.18 - Fast and simple FTP client =====
   8.170 +
   8.171 +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.
   8.172 +
   8.173 +Website: http://www.gftp.org/
   8.174 +
   8.175 +   # wget http://www.gftp.org/gftp-2.0.18.tar.gz
   8.176 +   # tar xzf gftp-2.0.18.tar.gz
   8.177 +   # cd gftp-2.0.18
   8.178 +   # ./configure --prefix=/usr --mandir=/usr/share/man \
   8.179 +     --disable-ssl --disable-textport \
   8.180 +     --build=i486-pc-linux-gnu --host=i486-pc-linux-gnu
   8.181 +   # make
   8.182 +   # make DESTDIR=$PWD/_pkg install
   8.183 +   # strip _pkg/usr/bin/*
   8.184 +
   8.185 +==== Install in rootfs ====
   8.186 +
   8.187 +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:
   8.188 +
   8.189 +   # cp _pkg/usr/bin/gftp $fs/usr/bin
   8.190 +   # cp _pkg/usr/bin/gftp-gtk $fs/usr/bin
   8.191 +   # cp -a _pkg/usr/share/gftp $fs/usr/share
   8.192 +   # cp -a _pkg/usr/share/pixmaps $fs/usr/share
   8.193 +   # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
   8.194 +
   8.195 +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.
   8.196 +
   8.197 +===== xpad-2.12 - Mini note taking application =====
   8.198 +
   8.199 +The Xpad application can quickly take notes via various customizable (GTK+) windows.
   8.200 +
   8.201 +Website: http://xpad.sourceforge.net/
   8.202 +
   8.203 +   # wget http://surfnet.dl.sourceforge.net/sourceforge/xpad/xpad-2.12.tar.bz2
   8.204 +   # tar xjf xpad-2.12.tar.bz2
   8.205 +   # cd xpad-2.12
   8.206 +   # ./configure --prefix=/usr --mandir=/usr/share/man \
   8.207 +     --build=i486-pc-linux-gnu --host=i486-pc-linux-gnu
   8.208 +   # make
   8.209 +   # make DESTDIR=$PWD/_pkg install
   8.210 +   # strip _pkg/usr/bin/*
   8.211 +
   8.212 +==== Install in rootfs ====
   8.213 +
   8.214 +   # cp _pkg/usr/bin/xpad $fs/usr/bin
   8.215 +   # cp -a _pkg/usr/share/pixmaps $fs/usr/share
   8.216 +   # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/pages/en/scratchbook/gtk-libs.txt	Sun May 01 07:41:07 2011 +0000
     9.3 @@ -0,0 +1,168 @@
     9.4 +====== GTK+ Libraries ======
     9.5 +
     9.6 +Compilation and installation of GTK+ packages and libraries.
     9.7 +
     9.8 +===== About =====
     9.9 +
    9.10 +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.
    9.11 +
    9.12 +The compilation of GTK applications can take quite some time and you must meet many dependencies. You will find a guide in English: [[http://developer.gnome.org/gtk/2.22/gtk-building.html|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.
    9.13 +
    9.14 +==== Environmental variable ($fs) ====
    9.15 +
    9.16 +If you do not specify any path to the rootfs directory, export the environmental variable:
    9.17 +
    9.18 +   # export fs=$PWD/rootfs
    9.19 +
    9.20 +To check:
    9.21 +
    9.22 +   # echo $fs
    9.23 +
    9.24 +===== cairo-1.2.6 - 2D graphics library =====
    9.25 +
    9.26 +We begin with libcairo (http://www.cairographics.org/) used to compile pango:
    9.27 +
    9.28 +   # cd src
    9.29 +   # wget http://cairographics.org/releases/cairo-1.2.6.tar.gz
    9.30 +   # tar xzf cairo-1.2.6.tar.gz
    9.31 +   # cd cairo-1.2.6
    9.32 +   # ./configure --prefix=/usr --mandir=/usr/share/man \
    9.33 +     --with-html-dir=/usr/share/doc
    9.34 +   # make
    9.35 +   # make DESTDIR=$PWD/_pkg install
    9.36 +   # strip -v _pkg/usr/lib/*.so*
    9.37 +
    9.38 +==== Install in rootfs ====
    9.39 +
    9.40 +   # cp -av _pkg/usr/lib/*.so* $fs/usr/lib
    9.41 +
    9.42 +===== glib-2.12.4 - C routines =====
    9.43 +
    9.44 +   # cd ..
    9.45 +   # wget ftp://ftp.gtk.org/pub/glib/2.12/glib-2.12.4.tar.bz2
    9.46 +   # tar xjf glib-2.12.4.tar.bz2
    9.47 +   # cd glib-2.12.4
    9.48 +   # ./configure --prefix=/usr --sysconfdir=/etc \
    9.49 +     --mandir=/usr/share/man --with-html-dir=/usr/share/doc
    9.50 +   # make
    9.51 +   # make DESTDIR=$PWD/_pkg install
    9.52 +   # strip -v _pkg/usr/bin/*
    9.53 +   # strip -v _pkg/usr/lib/*.so*
    9.54 +
    9.55 +==== Install in rootfs ====
    9.56 +
    9.57 +Option: the utilities glib-genmarshal and gobject-query need the /lib/tls/librt.so.1:
    9.58 +
    9.59 +   # cp -a _pkg/usr/lib/*.so* $fs/usr/lib
    9.60 +   # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
    9.61 +
    9.62 +The binaries and options:
    9.63 +   # cp -a _pkg/usr/bin/* $fs/usr/bin
    9.64 +
    9.65 +===== pango-1.14.8 - Library for layout and rendering of text =====
    9.66 +
    9.67 +   # cd ..
    9.68 +   # wget ftp://ftp.gtk.org/pub/pango/1.14/pango-1.14.8.tar.bz2
    9.69 +   # tar xjf pango-1.14.8.tar.bz2
    9.70 +   # cd pango-1.14.8
    9.71 +   # ./configure --prefix=/usr --sysconfdir=/etc \
    9.72 +     --mandir=/usr/share/man --with-html-dir=/usr/share/doc
    9.73 +   # make
    9.74 +   # make DESTDIR=$PWD/_pkg install
    9.75 +   # strip -v _pkg/usr/bin/*
    9.76 +   # strip -v _pkg/usr/lib/*.so*
    9.77 +   # strip -v _pkg/usr/lib/pango/1.5.0/modules/*
    9.78 +
    9.79 +==== Install in rootfs ====
    9.80 +
    9.81 +   # cp -a _pkg/usr/bin/* $fs/usr/bin
    9.82 +   # cp -a _pkg/usr/lib/*.so* $fs/usr/lib
    9.83 +   # cp -a _pkg/usr/lib/pango $fs/usr/lib
    9.84 +   # rm -rf $fs/usr/lib/pango/1.5.0/modules/*.la
    9.85 +   # cp -a _pkg/etc $fs
    9.86 +
    9.87 +Create /etc/pango.modules via chroot in the rootfs (pango-querymodules uses librt.so.1):
    9.88 +
    9.89 +   # chroot $fs /bin/ash
    9.90 +   /# pango-querymodules > /etc/pango/pango.modules
    9.91 +   # exit
    9.92 +
    9.93 +===== atk-1.12.4 - Accessibility toolkit =====
    9.94 +
    9.95 +   # cd ..
    9.96 +   # wget http://ftp.gnome.org/pub/gnome/sources/atk/1.12/atk-1.12.4.tar.bz2
    9.97 +   # tar xjf atk-1.12.4.tar.bz2
    9.98 +   # cd atk-1.12.4
    9.99 +   # ./configure --prefix=/usr --mandir=/usr/share/man \
   9.100 +     --with-html-dir=/usr/share/doc
   9.101 +   # make
   9.102 +   # make DESTDIR=$PWD/_pkg install
   9.103 +   # strip -v _pkg/usr/lib/*.so*
   9.104 +
   9.105 +==== Install in rootfs ====
   9.106 +
   9.107 +   # cp -a _pkg/usr/lib/*.so* $fs/usr/lib
   9.108 +   # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
   9.109 +
   9.110 +===== gtk+-2.8.20 - The GIMP Toolkit =====
   9.111 +
   9.112 +   # cd ..
   9.113 +   # wget ftp://ftp.gtk.org/pub/gtk/v2.8/gtk+-2.8.20.tar.bz2
   9.114 +   # tar xjf gtk+-2.8.20.tar.bz2
   9.115 +   # cd gtk+-2.8.20
   9.116 +   # ./configure --prefix=/usr --sysconfdir=/etc \
   9.117 +     --mandir=/usr/share/man --with-html-dir=/usr/share/doc
   9.118 +   # make
   9.119 +   # make DESTDIR=$PWD/_pkg install
   9.120 +   # strip -v _pkg/usr/bin/*
   9.121 +   # strip -v _pkg/usr/lib/*.so*
   9.122 +   # strip -v --strip-unneeded \
   9.123 +     _pkg/usr/lib/gtk-2.0/2.4.0/*/*
   9.124 +
   9.125 +==== Install in rootfs ====
   9.126 +
   9.127 +   # cp -a _pkg/usr/lib/*.so* $fs/usr/lib
   9.128 +   # mkdir $fs/usr/lib/gtk-2.0
   9.129 +   # cp -a _pkg/usr/lib/gtk-2.0/2.4.0 $fs/usr/lib/gtk-2.0
   9.130 +   # rm -rf $fs/usr/lib/gtk-2.0/2.4.0/*/*.la
   9.131 +
   9.132 +Locale and themes:
   9.133 +   # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
   9.134 +   # cp -a _pkg/usr/share/themes $fs/usr/share
   9.135 +
   9.136 +The applications:
   9.137 +   # cp  _pkg/usr/bin/gtk-query-immodules-2.0 $fs/usr/bin
   9.138 +   # cp  _pkg/usr/bin/gtk-update-icon-cache $fs/usr/bin
   9.139 +   # cp  _pkg/usr/bin/gdk-pixbuf-csource $fs/usr/bin
   9.140 +   # cp  _pkg/usr/bin/gdk-pixbuf-query-loaders $fs/usr/bin
   9.141 +   ...
   9.142 +
   9.143 +For the gtk-demo application:
   9.144 +   # cp -a _pkg/usr/bin/gtk-demo $fs/usr/bin
   9.145 +   # cp -a _pkg/usr/share/gtk-2.0 $fs/usr/share
   9.146 +
   9.147 +Create files /etc/gtk-2.0/gtk.immodules and gdk-pixbuf.loaders via a chroot in the rootfs:
   9.148 +
   9.149 +   # chroot $fs /bin/ash
   9.150 +   /# mkdir /etc/gtk-2.0
   9.151 +   /# gtk-query-immodules-2.0 > /etc/gtk-2.0/gtk.immodules
   9.152 +   /# gdk-pixbuf-query-loaders > /etc/gtk-2.0/gdk-pixbuf.loaders
   9.153 +   # exit
   9.154 +
   9.155 +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|GTK apps]].
   9.156 +
   9.157 +===== Generate the initramfs and an ISO image =====
   9.158 +
   9.159 +To create a new ISO image, you can use 'mktaziso' in [[http://doc.slitaz.org/en:cookbook:slitaztools|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:
   9.160 +
   9.161 +   # cd $fs
   9.162 +   # find . -print | cpio -o -H newc | gzip -9 > ../rootfs.gz
   9.163 +   # cd ..
   9.164 +   # cp rootfs.gz rootcd/boot
   9.165 +   # genisoimage -R -o slitaz-cooking.iso -b boot/isolinux/isolinux.bin \
   9.166 +     -c boot/isolinux/boot.cat -no-emul-boot -boot-load-size 4 \
   9.167 +     -V "SliTaz" -boot-info-table rootcd
   9.168 +
   9.169 +==== Following chapter ====
   9.170 +
   9.171 +After the libraries, the [[gtk-apps|GTK+ applications]].
   9.172 \ No newline at end of file
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/pages/en/scratchbook/locale.txt	Sun May 01 07:41:07 2011 +0000
    10.3 @@ -0,0 +1,80 @@
    10.4 +====== Locale & i18n ======
    10.5 +
    10.6 +Installation and configuration of locales.
    10.7 +
    10.8 +===== Locale installation =====
    10.9 +
   10.10 +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|X window system]]. The various files copied in this chapter come from the compiliation package glibc-2.3.6 forming part of the //toolchain//.
   10.11 +
   10.12 +==== Various file directories ====
   10.13 +
   10.14 +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:
   10.15 +
   10.16 +   # mkdir -p rootfs/usr/share/{i18n,locale}
   10.17 +   # mkdir -p rootfs/usr/lib/{locale,gconv}
   10.18 +   # mkdir -p rootfs/usr/share/i18n/{charmaps,locales}
   10.19 +   # mkdir -p rootfs/usr/share/locale/fr/LC_MESSAGES
   10.20 +
   10.21 +Copy the localization files for French, Swiss-French and Swiss-German in /usr/share/i18n/locales:
   10.22 +
   10.23 +   # cp -a /usr/share/i18n/locales/{de_CH,fr_CH,fr_FR,i18n,iso14651_t1} \
   10.24 +     rootfs/usr/share/i18n/locales
   10.25 +
   10.26 +Copy the translit_* files in /usr/share/i18n/locales:
   10.27 +
   10.28 +   # cp -a /usr/share/i18n/locales/{translit_circle,translit_cjk_compat} \
   10.29 +     rootfs/usr/share/i18n/locales
   10.30 +   # cp -a /usr/share/i18n/locales/{translit_combining,translit_compat} \
   10.31 +     rootfs/usr/share/i18n/locales
   10.32 +   # cp -a /usr/share/i18n/locales/{translit_font,translit_fraction} \
   10.33 +     rootfs/usr/share/i18n/locales
   10.34 +   # cp -a /usr/share/i18n/locales/{translit_narrow,translit_neutral} \
   10.35 +     rootfs/usr/share/i18n/locales
   10.36 +   # cp -a /usr/share/i18n/locales/{translit_small,translit_wide} \
   10.37 +     rootfs/usr/share/i18n/locales
   10.38 +
   10.39 +Copy the charmaps files in /usr/share/i18n/charmaps:
   10.40 +
   10.41 +   # cp -a /usr/share/i18n/charmaps/ANSI_X3.* rootfs/usr/share/i18n/charmaps
   10.42 +   # cp -a /usr/share/i18n/charmaps/{ISO-8859-1.gz,ISO-8859-2.gz,ISO-8859-15.gz} \
   10.43 +     rootfs/usr/share/i18n/charmaps
   10.44 +
   10.45 +Copy the gconv libraries in /usr/lib/gconv to rootfs of SliTaz:
   10.46 +
   10.47 +   # cp /usr/lib/gconv/{ANSI_X3.110.so,gconv-modules,UNICODE.so} \
   10.48 +     rootfs/usr/lib/gconv
   10.49 +   # cp /usr/lib/gconv/{ISO8859-1.so,ISO8859-2.so,ISO8859-15.so} \
   10.50 +     rootfs/usr/lib/gconv
   10.51 +   # strip -v rootfs/usr/lib/gconv/*.so
   10.52 +
   10.53 +Copy the locale utility:
   10.54 +
   10.55 +   # cp /usr/bin/locale rootfs/usr/bin
   10.56 +
   10.57 +It's necessary that the file /usr/lib/locale/locale-archive is generated, for that we use the localedef utility while chrooted in SliTaz:
   10.58 +
   10.59 +   # cp /usr/bin/localedef rootfs/usr/bin
   10.60 +   # chroot rootfs /bin/ash
   10.61 +
   10.62 +Use of "localedef" for French-speaking Switzerland and France:
   10.63 +
   10.64 +   # localedef -i fr_CH -f ISO-8859-1 fr_CH
   10.65 +   # localedef -i fr_FR -f ISO-8859-1 fr_FR
   10.66 +   # exit
   10.67 +
   10.68 +You can delete the "localedef" binary to gain some space:
   10.69 +
   10.70 +   # rm rootfs/usr/bin/localedef
   10.71 +
   10.72 +===== Config and use of locale =====
   10.73 +
   10.74 +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:
   10.75 +<file>
   10.76 +  export LANG=fr_CH
   10.77 +  export LC_ALL=fr_CH
   10.78 +</file>
   10.79 +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.
   10.80 +
   10.81 +==== Following chapter ====
   10.82 +
   10.83 +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|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".
    11.1 --- a/pages/en/scratchbook/start.txt	Sun May 01 07:40:21 2011 +0000
    11.2 +++ b/pages/en/scratchbook/start.txt	Sun May 01 07:41:07 2011 +0000
    11.3 @@ -47,4 +47,4 @@
    11.4  
    11.5  <code> # umount rootfs </code>
    11.6  
    11.7 -Now we can proceed to the construction of the [[http://www.slitaz.org/en/doc/scratchbook/base-system.html|Base SliTaz system]]. 
    11.8 \ No newline at end of file
    11.9 +Now we can proceed to the construction of the [[base-system|Base SliTaz system]]. 
   11.10 \ No newline at end of file
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/pages/en/scratchbook/x-window-system.txt	Sun May 01 07:41:07 2011 +0000
    12.3 @@ -0,0 +1,348 @@
    12.4 +====== X window system ======
    12.5 +
    12.6 +Installation and basic configuration of the X window system.
    12.7 +
    12.8 +===== About =====
    12.9 +
   12.10 +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.
   12.11 +
   12.12 +==== Environmental variable ($fs) ====
   12.13 +
   12.14 +If you do not specify any path to the rootfs directory, export the environmental variable:
   12.15 +
   12.16 +   # export fs=$PWD/rootfs
   12.17 +
   12.18 +To check:
   12.19 +
   12.20 +   # echo $fs
   12.21 +
   12.22 +===== expat-2.0.0 - XML parser library =====
   12.23 +
   12.24 +Expat (http://expat.sourceforge.net/) contains the XML parsing libraries:
   12.25 +
   12.26 +   # cd ..
   12.27 +   # wget http://switch.dl.sourceforge.net/sourceforge/expat/expat-2.0.0.tar.gz
   12.28 +   # tar xzf expat-2.0.0.tar.gz
   12.29 +   # cd expat-2.0.0
   12.30 +   # ./configure --sysconfdir=/etc --prefix=/usr \
   12.31 +     --mandir=/usr/share/man
   12.32 +   # make
   12.33 +   # make DESTDIR=$PWD/_pkg install
   12.34 +   # strip -v _pkg/usr/lib/*
   12.35 +   # strip -v _pkg/usr/bin/*
   12.36 +
   12.37 +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:
   12.38 +
   12.39 +   # cd _pkg/usr/lib
   12.40 +   # ln -s libexpat.so.1.5.0 libexpat.so.0
   12.41 +   # cp -a *.so* $fs/usr/lib
   12.42 +   # cd ..
   12.43 +   # cp -a bin/* $fs/usr/bin
   12.44 +   # cd ../..
   12.45 +
   12.46 +==== libs ====
   12.47 +
   12.48 + Libraries used by xmlwf:
   12.49 +<file>
   12.50 +          libexpat.so.1 => /usr/lib/libexpat.so.1 (0x40021000)
   12.51 +          libc.so.6 => /lib/tls/libc.so.6 (0x40041000)
   12.52 +          /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
   12.53 +</file>
   12.54 +===== freetype-2.3.1 - System font libraries =====
   12.55 +
   12.56 +The package freetype (http://www.freetype.org/) contains libraries used by X for configuring the system fonts:
   12.57 +
   12.58 +   # cd ..
   12.59 +   # wget http://download.savannah.gnu.org/releases/freetype/freetype-2.3.1.tar.bz2
   12.60 +   # tar xjf freetype-2.3.1.tar.bz2
   12.61 +   # cd freetype-2.3.1
   12.62 +   # ./configure --sysconfdir=/etc --prefix=/usr \
   12.63 +     --mandir=/usr/share/man
   12.64 +   # make
   12.65 +   # make DESTDIR=$PWD/_pkg install
   12.66 +   # strip -vs _pkg/usr/lib/*
   12.67 +   # cp -a _pkg/usr/bin/* $fs/usr/bin
   12.68 +   # cp -a _pkg/usr/lib/*.so* $fs/usr/lib
   12.69 +
   12.70 +===== fontconfig-2.4.2 - Manage system fonts =====
   12.71 +
   12.72 +The fontconfig package ([[http://www.fontconfig.org/wiki/|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:
   12.73 +
   12.74 +   # cd ..
   12.75 +   # wget http://fontconfig.org/release/fontconfig-2.4.2.tar.gz
   12.76 +   # tar xzf fontconfig-2.4.2.tar.gz
   12.77 +   # cd fontconfig-2.4.2
   12.78 +   # ./configure --sysconfdir=/etc --prefix=/usr \
   12.79 +     --mandir=/usr/share/man --localstatedir=/var
   12.80 +   # make
   12.81 +   # make DESTDIR=$PWD/_pkg install
   12.82 +   # strip -v _pkg/usr/bin/*
   12.83 +   # strip -v _pkg/usr/lib/*
   12.84 +   # cp -a _pkg/usr/bin/* $fs/usr/bin
   12.85 +   # cp -a _pkg/usr/lib/*.so* $fs/usr/lib
   12.86 +   # cp -a _pkg/etc $fs
   12.87 +   # cp -a _pkg/var $fs
   12.88 +
   12.89 +==== libs ====
   12.90 +
   12.91 +A 'ldd' on fc-cache gives the libraries below. You can also use libfreetype of XFree86:
   12.92 +<file>
   12.93 +          libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb7f12000)
   12.94 +          libz.so.1 => /usr/lib/libz.so.1 (0xb7eff000)
   12.95 +          libexpat.so.1 => /usr/lib/libexpat.so.1 (0xb7edf000)
   12.96 +          libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0xb7eb0000)
   12.97 +          libc.so.6 => /lib/tls/libc.so.6 (0xb7d7b000)
   12.98 +          /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0xb7f8c000)
   12.99 +</file>
  12.100 +===== Xserver - Graphical Xvesa server of Xfree86 =====
  12.101 +
  12.102 +We will use the binary versions of Xvesa server ([[http://www.xfree86.org/|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|Xorg packages]] on your development system.
  12.103 +
  12.104 +==== Xtinyx server - Xvesa ====
  12.105 +
  12.106 +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:
  12.107 +
  12.108 +   # cd ..
  12.109 +   # mkdir -p XFree86-4.6.0 && cd XFree86-4.6.0
  12.110 +   # wget http://ftp.xfree86.org/pub/XFree86/4.6.0/binaries/Linux-ix86-glibc23/Xtinyx.tgz
  12.111 +   # tar xzf Xtinyx.tgz
  12.112 +   # cp bin/Xvesa $fs/usr/bin
  12.113 +   # strip $fs/usr/bin/Xvesa
  12.114 +   # chmod 4711 $fs/usr/bin/Xvesa
  12.115 +
  12.116 +==== libs for Xvesa ====
  12.117 +<file>
  12.118 +          libz.so.1 => /usr/lib/libz.so.1 (0xb7ed6000)
  12.119 +          libm.so.6 => /lib/tls/libm.so.6 (0xb7eb1000)
  12.120 +          libc.so.6 => /lib/tls/libc.so.6 (0xb7d7e000)
  12.121 +          /lib/ld-linux.so.2 (0xb7ef8000)
  12.122 +</file>
  12.123 +==== rgb.txt - RGB colors in X ====
  12.124 +
  12.125 +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:
  12.126 +
  12.127 +   # mkdir -p $fs/usr/share/X11
  12.128 +   # cp /usr/share/X11/rgb.txt $fs/usr/share/X11
  12.129 +   # chroot $fs /bin/ash
  12.130 +   # mkdir -p /usr/X11R6/lib/X11/
  12.131 +   # ln -s /usr/share/X11/rgb.txt /usr/X11R6/lib/X11/rgb.txt
  12.132 +   # exit
  12.133 +
  12.134 +==== Xfnts - Fonts ====
  12.135 +
  12.136 +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:
  12.137 +
  12.138 +   # wget http://ftp.xfree86.org/pub/XFree86/4.6.0/binaries/Linux-ix86-glibc23/Xfnts.tgz
  12.139 +   # tar xzf Xfnts.tgz
  12.140 +   # mkdir -p $fs/usr/X11R6/lib/X11/fonts
  12.141 +   # mkdir -p $fs/usr/share/fonts/truetype
  12.142 +
  12.143 +Copy the fonts...
  12.144 +   # cp -a lib/X11/fonts/* $fs/usr/X11R6/lib/X11/fonts)
  12.145 +   # cp -a /usr/share/fonts/truetype/* $fs/usr/share/fonts/truetype
  12.146 +
  12.147 +Then regenerate the fonts.dir file, you must run mkfontdir on the directory in question:
  12.148 +
  12.149 +   # mkfontdir $fs/usr/X11R6/lib/X11/fonts/75dpi
  12.150 +
  12.151 +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:
  12.152 +
  12.153 +   # chroot $fs /bin/ash
  12.154 +   # fc-cache -v
  12.155 +   # fc-list
  12.156 +   # exit
  12.157 +
  12.158 +==== Xlib locale - Localization files ====
  12.159 +
  12.160 +On SliTaz, we installed 4 locales: C, iso8859-1, iso8859-15 and iso 8859-2 from the [[xorg|compilation of Xorg]]. You can copy these files from the host system or use the files distributed by XFree86. Sample copy of all the locales from the host system:
  12.161 +
  12.162 +   # mkdir -p $fs/usr/share/X11/locale
  12.163 +   # cp -a /usr/share/X11/locale/* $fs/usr/share/X11/locale
  12.164 +
  12.165 +==== Using X ====
  12.166 +
  12.167 +Note that you 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 the "-query" option. For example:
  12.168 +
  12.169 +   # Xvesa -ac -shadow -screen 1024x768x24 -query 192.168.0.2
  12.170 +
  12.171 +===== xterm - Terminal Emulator =====
  12.172 +
  12.173 +The xterm package ([[http://invisible-island.net/xterm/|invisible-island.net/xterm/]]) provides a terminal emulator for X:
  12.174 +
  12.175 +   # wget ftp://invisible-island.net/xterm/xterm-223.tgz
  12.176 +   # tar xzf xterm-223.tgz
  12.177 +   # cd xterm-223
  12.178 +   # ./configure --prefix=/usr --sysconfdir=/etc \
  12.179 +     --mandir=/usr/share/man --localstatedir=/var \
  12.180 +     --with-app-defaults=/usr/share/X11/app-defaults \
  12.181 +     --build=i486-pc-linux-gnu --host=i486-pc-linux-gnu
  12.182 +   # make
  12.183 +   # make DESTDIR=$PWD/_pkg install
  12.184 +   # strip _pkg/usr/bin/*
  12.185 +   # cp _pkg/usr/bin/* $fs/usr/bin
  12.186 +   # cp -a _pkg/usr/share/X11/* $fs/usr/share/X11
  12.187 +
  12.188 +==== libs ====
  12.189 +
  12.190 +A ldd on XTerm, we copy (and strip) the missing libraries from the host system:
  12.191 +<file>
  12.192 +      libXft.so.2 => /usr/lib/libXft.so.2 (0xb7f09000)
  12.193 +      libXrender.so.1 => /usr/lib/libXrender.so.1 (0xb7f00000)
  12.194 +      libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0xb7ed5000)
  12.195 +      libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb7e68000)
  12.196 +      libz.so.1 => /usr/lib/libz.so.1 (0xb7e54000)
  12.197 +      libX11.so.6 => /usr/lib/libX11.so.6 (0xb7d68000)
  12.198 +      libXaw.so.7 => /usr/lib/libXaw.so.7 (0xb7d0f000)
  12.199 +      libXmu.so.6 => /usr/lib/libXmu.so.6 (0xb7cfa000)
  12.200 +      libXext.so.6 => /usr/lib/libXext.so.6 (0xb7cec000)
  12.201 +      libXt.so.6 => /usr/lib/libXt.so.6 (0xb7c9e000)
  12.202 +      libSM.so.6 => /usr/lib/libSM.so.6 (0xb7c96000)
  12.203 +      libICE.so.6 => /usr/lib/libICE.so.6 (0xb7c7f000)
  12.204 +      libncurses.so.5 => /lib/libncurses.so.5 (0xb7c3c000)
  12.205 +      libc.so.6 => /lib/libc.so.6 (0xb7b2c000)
  12.206 +      libexpat.so.1 => /usr/lib/libexpat.so.1 (0xb7b0b000)
  12.207 +      libXau.so.6 => /usr/lib/libXau.so.6 (0xb7b08000)
  12.208 +      libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb7b03000)
  12.209 +      libdl.so.2 => /lib/libdl.so.2 (0xb7aff000)
  12.210 +      libXpm.so.4 => /usr/lib/libXpm.so.4 (0xb7aee000)
  12.211 +</file>
  12.212 +===== libpng-1.2.18 - PNG Libraries ====
  12.213 +
  12.214 +PNG libraries (http://libpng.org/pub/png/libpng.html) are used to manipulate and format PNG images:
  12.215 +
  12.216 +   # wget http://puzzle.dl.sourceforge.net/sourceforge/libpng/libpng-1.2.18.tar.bz2
  12.217 +   # tar xjf libpng-1.2.18.tar.bz2
  12.218 +   # cd libpng-1.2.18
  12.219 +   # ./configure --enable-shared --prefix=/usr \
  12.220 +     --mandir=/usr/share/man
  12.221 +   # make
  12.222 +   # make DESTDIR=$PWD/_pkg install
  12.223 +   # strip _pkg/usr/lib/*.so*
  12.224 +   # cp -a _pkg/usr/lib/libpng12.so* $fs/usr/lib
  12.225 +   # cp -a _pkg/usr/bin/libpng12* $fs/usr/bin
  12.226 +
  12.227 +===== jwm-2.0 - Window manager =====
  12.228 +
  12.229 +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:
  12.230 +
  12.231 +   # cd ..
  12.232 +   # wget http://www.joewing.net/programs/jwm/releases/jwm-2.0.tar.bz2
  12.233 +   # tar xjf jwm-2.0.tar.bz2
  12.234 +   # cd jwm-2.0
  12.235 +   # ./configure --prefix=/usr --mandir=/usr/share/man \
  12.236 +     --sysconfdir=/etc/jwm --disable-xinerama
  12.237 +   # make
  12.238 +   # strip src/jwm
  12.239 +   # cp src/jwm $fs/usr/bin
  12.240 +   # mkdir $fs/etc/jwm
  12.241 +   # cp example.jwmrc $fs/etc/jwm/system.jwmrc
  12.242 +
  12.243 +==== libs ====
  12.244 +
  12.245 +Ldd libraries that we have provided:
  12.246 +<file>
  12.247 +      libX11.so.6 => /usr/lib/libX11.so.6 (0xb7e35000)
  12.248 +      libpng12.so.0 => /usr/lib/libpng12.so.0 (0xb7e12000)
  12.249 +      libXft.so.2 => /usr/lib/libXft.so.2 (0xb7e00000)
  12.250 +      libXrender.so.1 => /usr/lib/libXrender.so.1 (0xb7df7000)
  12.251 +      libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0xb7dcc000)
  12.252 +      libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb7d5f000)
  12.253 +      libz.so.1 => /usr/lib/libz.so.1 (0xb7d4a000)
  12.254 +      libXpm.so.4 => /usr/lib/libXpm.so.4 (0xb7d3a000)
  12.255 +      libXext.so.6 => /usr/lib/libXext.so.6 (0xb7d2c000)
  12.256 +      libc.so.6 => /lib/libc.so.6 (0xb7c1c000)
  12.257 +      libXau.so.6 => /usr/lib/libXau.so.6 (0xb7c19000)
  12.258 +      libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb7c14000)
  12.259 +      libdl.so.2 => /lib/libdl.so.2 (0xb7c0f000)
  12.260 +      libm.so.6 => /lib/libm.so.6 (0xb7bea000)
  12.261 +      libexpat.so.1 => /usr/lib/libexpat.so.1 (0xb7bc9000)
  12.262 +</file>
  12.263 +You can start the X server and JWM with the command below or create a script in /usr/bin/startx with the content:
  12.264 +<file>   
  12.265 +  Xvesa -ac -shadow -screen 1024x768x24 & exec jwm
  12.266 +</file>
  12.267 +==== On SliTaz ====
  12.268 +
  12.269 +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:
  12.270 +
  12.271 +We chose to use the Tango icons theme http://tango.freedesktop.org/, that isn't compiled. We only use the minimum: images in 16 x 16 format that we put in /usr/share/icons.
  12.272 +
  12.273 +To test JWM with a cooking ISO:
  12.274 +
  12.275 +   # Xvesa -ac -shadow -screen 800x600x24 & exec jwm
  12.276 +
  12.277 +===== jpeg-6b - JPEG Libraries =====
  12.278 +
  12.279 +Libraries handling JPEG images, and some small utilities:
  12.280 +
  12.281 +   # wget http://www.ijg.org/files/jpegsrc.v6b.tar.gz
  12.282 +   # tar xzf jpegsrc.v6b.tar.gz
  12.283 +   # cd jpeg-6b
  12.284 +   # ./configure --enable-shared --prefix=/usr \
  12.285 +     --mandir=/usr/share/man
  12.286 +   # make
  12.287 +   # strip .libs/*
  12.288 +   # cp -a .libs/*.so* $fs/usr/lib
  12.289 +   # cp .libs/{cjpeg,djpeg,jpegtran} $fs/usr/bin
  12.290 +
  12.291 +===== tiff-3.8.2 - TIFF Libraries and Utilities =====
  12.292 +
  12.293 +Libraries handling TIFF images and some small optional utilities:
  12.294 +
  12.295 +   # wget ftp://ftp.remotesensing.org/pub/libtiff/tiff-3.8.2.tar.gz
  12.296 +   # tar xzf tiff-3.8.2.tar.gz
  12.297 +   # cd tiff-3.8.2
  12.298 +   # ./configure  --prefix=/usr --mandir=/usr/share/man
  12.299 +   # make
  12.300 +   # make DESTDIR=$PWD/_pkg install
  12.301 +   # strip _pkg/usr/bin/*
  12.302 +   # strip _pkg/usr/lib/*.so*
  12.303 +   # cp -a _pkg/usr/lib/*.so* $fs/usr/lib
  12.304 +
  12.305 +You can install the utilities you want.
  12.306 +
  12.307 +===== links-2.1pre29 - Graphical and text mode web browser ====
  12.308 +
  12.309 +Links ([[http://links.twibright.com/|links.twibright.com]]) is a web browser offering graphical and text modes. It is translated into multiple languages, including French:
  12.310 +
  12.311 +   # cd ..
  12.312 +   # wget http://links.twibright.com/download/links-2.1pre28.tar.gz
  12.313 +   # tar xzf links-2.1pre28.tar.gz
  12.314 +   # cd links-2.1pre28
  12.315 +   # ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man \
  12.316 +     --without-directfb --without-ssl --enable-graphics --enable-javascript
  12.317 +   # make
  12.318 +   # make DESTDIR=$PWD/_pkg install
  12.319 +   # strip -v _pkg/usr/bin/*
  12.320 +   # cp -v _pkg/usr/bin/* $fs/usr/bin
  12.321 +
  12.322 +==== libs ====
  12.323 +<file>
  12.324 +      libtiff.so.3 => /usr/lib/libtiff.so.3
  12.325 +      libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0xb7ede000)
  12.326 +      libpng12.so.0 => /usr/lib/libpng12.so.0 (0xb7eba000)
  12.327 +      libz.so.1 => /usr/lib/libz.so.1 (0xb7ea7000)
  12.328 +      libX11.so.6 => /usr/lib/libX11.so.6 (0xb7dbb000)
  12.329 +      libdl.so.2 => /lib/tls/libdl.so.2 (0xb7db7000)
  12.330 +      libpcre.so.0 => /usr/lib/libpcre.so.0 (0xb7d96000)
  12.331 +      libm.so.6 => /lib/tls/libm.so.6 (0xb7d70000)
  12.332 +      libc.so.6 => /lib/tls/libc.so.6 (0xb7c3e000)
  12.333 +      libXau.so.6 => /usr/lib/libXau.so.6 (0xb7c3b000)
  12.334 +      libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb7c36000)
  12.335 +      /lib/ld-linux.so.2 (0xb7f5d000)
  12.336 +</file>
  12.337 +===== Generate the initramfs and an ISO image =====
  12.338 +
  12.339 +To create a new ISO image, you can use 'mktaziso' in [[http://doc.slitaz.org/en:cookbook:slitaztools|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:
  12.340 +
  12.341 +   # cd $fs
  12.342 +   # find . -print | cpio -o -H newc | gzip -9 > ../rootfs.gz
  12.343 +   # cd ..
  12.344 +   # cp rootfs.gz rootcd/boot
  12.345 +   # genisoimage -R -o slitaz-cooking.iso -b boot/isolinux/isolinux.bin \
  12.346 +     -c boot/isolinux/boot.cat -no-emul-boot -boot-load-size 4 \
  12.347 +     -V "SliTaz" -boot-info-table rootcd
  12.348 +
  12.349 +==== Following chapter ====
  12.350 +
  12.351 +The next chapter [[gtk-libs|GTK+ libs]] describes the installation of GTK libraries.
    13.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.2 +++ b/pages/en/scratchbook/xorg.txt	Sun May 01 07:41:07 2011 +0000
    13.3 @@ -0,0 +1,59 @@
    13.4 +====== How-to Xorg - Modular graphical server ======
    13.5 +
    13.6 +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 developers 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.
    13.7 +
    13.8 +===== Build Xorg automatically with Tazwok =====
    13.9 +
   13.10 +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", these 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:
   13.11 +
   13.12 +   # tazpkg get-install slitaz-dev-pkgs
   13.13 +
   13.14 +Then you can start to cook (if everything is ready, wok and development packages, etc), starting with the protos' (xproto, etc):
   13.15 +
   13.16 +   # tazwok cook xorg-dev-proto
   13.17 +   # tazwok cook xorg
   13.18 +   # tazwok cook xorg-dev
   13.19 +
   13.20 +===== Download Xorg (7.2) using wget =====
   13.21 +
   13.22 +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 [[http://www.slitaz.org/en/doc/cookbook/slitaz-tools.html|SliTaz tools (1.1)]]. This script is no longer updated, developers use the [[http://www.slitaz.org/en/doc/cookbook/wok-tools.html|wok and tools]]. To use the script, it must be placed in the directory where you want to download Xorg:
   13.23 +
   13.24 +   # cd ..
   13.25 +   # mkdir Xorg && cd Xorg
   13.26 +   # cp slitaz-tools-1.1/utils/getXorg-7.2.sh .
   13.27 +   # ./getXorg-7.2.sh
   13.28 +
   13.29 +===== Compile Xorg by hand =====
   13.30 +
   13.31 +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:
   13.32 +
   13.33 +   # cd proto
   13.34 +   # tar xzf xproto-X11R7.2-7.0.10.tar.gz
   13.35 +   # cd xproto-X11R7.2-7.0.10
   13.36 +   # ./configure --prefix=/usr --sysconfdir=/etc \\
   13.37 +     --mandir=/usr/share/man --localstatedir=/var \\
   13.38 +     --build=i486-pc-linux-gnu --host=i486-pc-linux-gnu
   13.39 +    # make
   13.40 +    # make install
   13.41 +
   13.42 +Compile libraries by taking again the options used by proto. Example using the package to compile xtrans, remember to run "ldconfig" if you install the package on the development machine:
   13.43 +
   13.44 +   # cd .. && cd lib
   13.45 +   # tar xzf xtrans-X11R7.2-1.0.3.tar.gz
   13.46 +   # cd xtrans-X11R7.2-1.0.3
   13.47 +   # ./configure --prefix=/usr --sysconfdir=/etc \\
   13.48 +     --mandir=/usr/share/man --localstatedir=/var \\
   13.49 +     --build=i486-pc-linux-gnu --host=i486-pc-linux-gnu
   13.50 +   # make
   13.51 +   # make install
   13.52 +   # ldconfig
   13.53 +
   13.54 +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):
   13.55 +
   13.56 +   # cd .. && cd app
   13.57 +   # tar xzf xsetroot-$VERSION.tar.gz
   13.58 +   # cd xsetroot-$VERSION
   13.59 +   # ./configure --prefix=/usr --sysconfdir=/etc \\
   13.60 +     --mandir=/usr/share/man --localstatedir=/var \\
   13.61 +     --build=i486-pc-linux-gnu --host=i486-pc-linux-gnu
   13.62 +   # make && make install