website rev 226

en: Add scratchbook pages
author Paul Issott <paul@slitaz.org>
date Tue Dec 23 14:10:23 2008 +0000 (2008-12-23)
parents 161b08baab37
children 3291e51abf30
files en/doc/scratchbook/base-apps.html en/doc/scratchbook/base-ncurses.html en/doc/scratchbook/base-system.html en/doc/scratchbook/boot-scripts.html en/doc/scratchbook/gtk-apps.html en/doc/scratchbook/gtk-libs.html en/doc/scratchbook/index.html en/doc/scratchbook/locale.html en/doc/scratchbook/x-window-system.html en/doc/scratchbook/xorg.html
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/en/doc/scratchbook/base-apps.html	Tue Dec 23 14:10:23 2008 +0000
     1.3 @@ -0,0 +1,553 @@
     1.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     1.5 +    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     1.6 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
     1.7 +<head>
     1.8 +    <title>SliTaz Scratchbook - Base Applications</title>
     1.9 +    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
    1.10 +    <meta name="description" content="" />
    1.11 +    <meta name="expires" content="never" />
    1.12 +    <meta name="modified" content="2008-11-22 17:00:00" />
    1.13 +    <meta name="publisher" content="www.slitaz.org" />
    1.14 +    <meta name="author" content="Christophe Lincoln"/>
    1.15 +    <link rel="shortcut icon" href="favicon.ico" />
    1.16 +    <link rel="stylesheet" type="text/css" href="book.css" />
    1.17 +</head>
    1.18 +<body bgcolor="#ffffff">
    1.19 +
    1.20 +<!-- Header and quick navigation -->
    1.21 +<div id="header">
    1.22 +<div align="right" id="quicknav">
    1.23 +    <a name="top"></a>
    1.24 +    <a href="base-system.html">Base system</a> |
    1.25 +    <a href="index.html">Table of contents</a> |
    1.26 +    <a href="base-ncurses.html">Base ncurses</a>
    1.27 +</div>
    1.28 +<h1><font color="#3E1220">SliTaz Scratchbook</font></h1>
    1.29 +</div>
    1.30 +
    1.31 +<!-- Content. -->
    1.32 +<div id="content">
    1.33 +<div class="content-right"></div>
    1.34 +
    1.35 +
    1.36 +<h2><font color="#df8f06">Base Applications</font></h2>
    1.37 +<p>
    1.38 +Install and configure libraries and basic applications.
    1.39 +</p>
    1.40 +<ul>
    1.41 +    <li><a href="#about">About the chapter</a> - Description and environmental variable ($fs)</li>
    1.42 +    <li><a href="#bc">bc-1.06</a> - Text mode calculator.</li>
    1.43 +    <li><a href="#zlib">zlib-1.2.3</a> - Compression libraries.</li>
    1.44 +    <li><a href="#pcre">pcre-7.4</a> - Perl-compatible regular expressions.</li>
    1.45 +    <li><a href="#e2fsprogs">e2fsprogs-1.39</a> - Filesystem management utilities.</li>
    1.46 +    <li><a href="#dropbear">dropbear-0.50</a> - Lightweight SSH server and client.</li>
    1.47 +    <li><a href="#lighttpd">lighttpd-1.4.18</a> - HTTP web server.</li>
    1.48 +    <li><a href="#iptables">iptables-1.3.7</a> - Netfilter, Linux firewall.</li>
    1.49 +    <li><a href="#sqlite">sqlite-3.5.1</a> - Small SQL database engine.</li>
    1.50 +    <li><a href="#cdrkit">cdrkit-1.1.5</a> - Tools for manipulating cdrom
    1.51 +    and ISO images.</li>
    1.52 +    <li><a href="#cpio">cpio-2.8</a> - Archiver used for SliTaz packages and
    1.53 +    initramfs.</li>
    1.54 +    <li><a href="#microperl">microperl-5.8.8</a> - A tiny Perl.</li>
    1.55 +    <li><a href="#module-init-tools">module-init-tools-3.2</a> - Tools for
    1.56 +    manipulating the kernel modules.</li>
    1.57 +    <li><a href="#kernel-modules">Copy and compress the Kernel modules.</a></li>
    1.58 +    <li><a href="#initramfs-iso">Generate the initramfs and an ISO image.</a></li>
    1.59 +</ul>
    1.60 +<a name="about"></a>
    1.61 +<h3><font color="#6c0023">About</font></h3>
    1.62 +<p>
    1.63 +This chaper describes the facilities libraries and basic text applications supplied with
    1.64 +SliTaz.
    1.65 +</p>
    1.66 +<h4>Assign an environment variable ($fs)</h4>
    1.67 +<p>
    1.68 +An environmental variable can't specify the path to the directory, just the name of the directory. 
    1.69 +We will affect a variable '$fs' to indicate the path to the root filesystem
    1.70 +(rootfs). To do this, we venture into the working directory SliTaz/, and type:
    1.71 +</p>
    1.72 +<pre> # export fs=$PWD/rootfs
    1.73 +</pre>
    1.74 +<p>
    1.75 +To check:
    1.76 +</p>
    1.77 +<pre> # echo $fs
    1.78 +</pre>
    1.79 +<a name="bc"></a>
    1.80 +<h3><font color="#6c0023">bc-1.06 - Text mode calculator</font></h3>
    1.81 +<p>
    1.82 +The application bc (<a href="http://www.gnu.org/software/bc/">www.gnu.org/software/bc/</a>) provides 
    1.83 +a small calculator. When compiling the utility, dc is also built, 
    1.84 +but not installed by SliTaz. Note that dc is also available with BusyBox. If you decide to copy dc, you 
    1.85 +need to delete the link to BusyBox (if it exists). We use a directory _pkg (package) for installation, 
    1.86 +use strip to clean the executables and copy the utilities:
    1.87 +</p>
    1.88 +<pre> # cd src
    1.89 + # wget http://ftp.gnu.org/pub/gnu/bc/bc-1.06.tar.gz
    1.90 + # tar xzfv bc-1.06.tar.gz
    1.91 + # cd bc-1.06
    1.92 + # ./configure --prefix=/usr --infodir=/usr/share/info \
    1.93 +   --mandir=/usr/share/man
    1.94 + # make
    1.95 + # make DESTDIR=$PWD/_pkg install
    1.96 + # strip -vs _pkg/usr/bin/*
    1.97 + # cp -avi _pkg/usr/bin/bc $fs/usr/bin
    1.98 +</pre>
    1.99 +<h4>libs</h4>
   1.100 +<p>
   1.101 +A small <code>ldd</code> on bc should produce:
   1.102 +</p>
   1.103 +<pre class="script">        libc.so.6 =&gt; /lib/libc.so.6 (0x40029000)
   1.104 +        /lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0x40000000)
   1.105 +</pre>
   1.106 +<a name="zlib"></a>
   1.107 +<h3><font color="#6c0023">zlib-1.2.3 - Compression libraries</font></h3>
   1.108 +<p>
   1.109 +The zlib (<a href="http://www.zlib.net/">http://www.zlib.net/</a>) package provides compression 
   1.110 +and decompression functions used by among others, the SSH server Dropbear and the X server:
   1.111 +</p>
   1.112 +<pre> # cd ..
   1.113 + # wget http://www.gzip.org/zlib/zlib-1.2.3.tar.bz2
   1.114 + # tar xjfv zlib-1.2.3.tar.bz2
   1.115 + # cd zlib-1.2.3
   1.116 + # ./configure --shared --prefix=/usr
   1.117 + # make
   1.118 + # strip -vs libz.so*
   1.119 + # cp -av libz.so* $fs/usr/lib
   1.120 +</pre>
   1.121 +<a name="pcre"></a>
   1.122 +<h3><font color="#6c0023">pcre-7.4 - Perl-compatible regular expressions</font></h3>
   1.123 +<p>
   1.124 +The package pcre (<a href="http://www.pcre.org/">http://www.pcre.org/</a>) provides libraries of 
   1.125 +functions for Perl compatible regular expressions used by among others, the web server Lighttpd:
   1.126 +</p>
   1.127 +<pre> # cd ..
   1.128 + # wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-7.4.tar.gz
   1.129 + # tar xzfv pcre-7.4.tar.gz
   1.130 + # cd pcre-7.4
   1.131 + # ./configure --prefix=/usr
   1.132 + # make
   1.133 + # make DESTDIR=$PWD/_pkg install
   1.134 + # strip -vs _pkg/usr/bin/*
   1.135 + # strip -vs _pkg/usr/lib/*
   1.136 + # cp -av _pkg/usr/bin/* $fs/usr/bin
   1.137 + # cp -av _pkg/usr/lib/*.so* $fs/usr/lib
   1.138 +</pre>
   1.139 +<a name="e2fsprogs"></a>
   1.140 +<h3><font color="#6c0023">e2fsprogs-1.39 - Filesystem management utilities</font></h3>
   1.141 +<p>
   1.142 +The e3fsprogs (<a href="http://e2fsprogs.sourceforge.net/">http://e2fsprogs.sourceforge.net/</a>) provides 
   1.143 +utilities for handling ext2 and ext3 filesystems. We will not take all of them because we need the space. 
   1.144 +It should be noted that we use fsck of BusyBox:
   1.145 +</p>
   1.146 +<pre> # cd ..
   1.147 + # wget http://puzzle.dl.sourceforge.net/sourceforge/e2fsprogs/e2fsprogs-1.39.tar.gz
   1.148 + # tar xzf e2fsprogs-1.39.tar.gz
   1.149 + # cd e2fsprogs-1.39
   1.150 + # ./configure --prefix=/usr --with-root-prefix="" \
   1.151 +   --enable-elf-shlibs --disable-evms --sysconfdir=/etc \
   1.152 +   --infodir=/usr/share/info --mandir=/usr/share/man
   1.153 + # make
   1.154 + # make DESTDIR=$PWD/_pkg install
   1.155 + # strip -vs _pkg/sbin/*
   1.156 + # strip -vs _pkg/lib/*
   1.157 + # strip -vs _pkg/usr/bin/*
   1.158 + # strip -vs _pkg/usr/sbin/*
   1.159 + # strip -vs _pkg/usr/lib/*
   1.160 +</pre>
   1.161 +<p>
   1.162 +Install the utilities, configuration files and libraries in the rootfs of SliTaz. Be careful if you  
   1.163 +used fsck, that you didn't destroy the link to BusyBox:
   1.164 +</p>
   1.165 +<pre> # cp -i _pkg/sbin/{badblocks,blkid,dumpe2fs,e2fsck,e2image} $fs/sbin
   1.166 + # cp -i _pkg/sbin/{e2label,findfs,logsave,mke2fs,mkfs.*} $fs/sbin
   1.167 + # cp -i _pkg/sbin/{resize2fs,tune2fs} $fs/sbin
   1.168 + # cp -a _pkg/lib/* $fs/lib
   1.169 + # rm -rf $fs/lib/libss*
   1.170 + # cp -a _pkg/etc/* $fs/etc
   1.171 + # cp -a _pkg/usr/bin/* $fs/usr/bin
   1.172 + # cp -a _pkg/usr/sbin/* $fs/usr/sbin
   1.173 + # cp -ad _pkg/usr/lib/*.so $fs/usr/lib
   1.174 + # rm -rf $fs/usr/lib/libss*
   1.175 +</pre>
   1.176 +<p>
   1.177 +You can also copy files from the French locale:
   1.178 +</p>
   1.179 +<pre> # mkdir $fs/usr/share/locale
   1.180 + # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
   1.181 +</pre>
   1.182 +<a name="dropbear"></a>
   1.183 +<h3><font color="#6c0023">Dropbear-0.50 - Lightweight SSH client and server</font></h3>
   1.184 +<p>
   1.185 +Dropbear (<a href="http://matt.ucc.asn.au/dropbear/dropbear.html">http://matt.ucc.asn.au/dropbear/dropbear.html</a>) 
   1.186 +is a small secure client/server supporting SSH 2. Dropbear is compatible with
   1.187 +OpenSSH and uses ~/.ssh/authorized_keys for the management of public keys. Dropbear also
   1.188 +provides a version of scp, which must be compiled with 'make scp':
   1.189 +</p>
   1.190 +<pre> # cd ..
   1.191 + # wget http://matt.ucc.asn.au/dropbear/releases/dropbear-0.50.tar.gz
   1.192 + # tar xzf dropbear-0.50.tar.gz
   1.193 + # cd dropbear-0.50
   1.194 + # ./configure --prefix=/usr
   1.195 + # make
   1.196 + # make scp
   1.197 + # make DESTDIR=$PWD/_pkg install
   1.198 + # strip -v scp
   1.199 + # strip -v _pkg/usr/bin/*
   1.200 + # strip -v _pkg/usr/sbin/*
   1.201 +</pre>
   1.202 +<p>
   1.203 +Install the client and tools in /usr/bin, and the server in /usr/sbin:
   1.204 +</p>
   1.205 +<pre> # cp scp $fs/usr/bin
   1.206 + # cp -a _pkg/usr/bin/* $fs/usr/bin
   1.207 + # cp -a _pkg/usr/sbin/* $fs/usr/sbin
   1.208 +</pre>
   1.209 +<h4>libs</h4>
   1.210 +<pre class="script">        libutil.so.1 =&gt; /lib/libutil.so.1 (0x40025000)
   1.211 +        libz.so.1 =&gt; /usr/lib/libz.so.1 (0x40028000)
   1.212 +        libcrypt.so.1 =&gt; /lib/libcrypt.so.1 (0x4003b000)
   1.213 +        libc.so.6 =&gt; /lib/libc.so.6 (0x40068000)
   1.214 +        /lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0x40000000)
   1.215 +</pre>
   1.216 +<p>
   1.217 +Copy the library libutil.so.1 to $fs/lib, is this is not already the case. Other libraries 
   1.218 +should be present following the construction of the base system:
   1.219 +</p>
   1.220 +<pre> # cp -a /lib/libutil* $fs/lib
   1.221 +</pre>
   1.222 +<h4>Configure Dropbear</h4>
   1.223 +<p>
   1.224 +The user configuration files authorized_keys and known_hosts are in ~/.ssh. This directory and the 
   1.225 +file known_hosts are created automatically the first time the user launches dbclient. The system 
   1.226 +configuration files for the Dropbear server are in /etc/Dropbear:
   1.227 + </p>
   1.228 +<pre> # mkdir $fs/etc/dropbear
   1.229 +</pre>
   1.230 +<p>
   1.231 +You must generate the secure keys before starting the Dropbear server on SliTaz. 
   1.232 +You can use dropbearkey with the following commands:
   1.233 +</p>
   1.234 +<pre> # dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key
   1.235 + # dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key
   1.236 +</pre>
   1.237 +<p>
   1.238 +On SliTaz, you can start the SSH server with the command:
   1.239 +</p>
   1.240 +<pre> # /etc/init.d/dropbear start
   1.241 +</pre>
   1.242 +<a name="lighttpd"></a>
   1.243 +<h3><font color="#6c0023">lighttpd-1.4.18 - HTTP Web server</font></h3>
   1.244 +<p>
   1.245 +Lighttpd (<a href="http://www.lighttpd.net/">www.lighttpd.net</a>) is a light, secure and powerful web server. 
   1.246 +The project is very active and the server's configuration simple. It supports virtual hosts, CGI scripts, 
   1.247 +and allows intelligent management of the CPU:
   1.248 +</p>
   1.249 +<pre> # cd ..
   1.250 + # wget http://www.lighttpd.net/download/lighttpd-1.4.18.tar.gz
   1.251 + # tar xzf lighttpd-1.4.18.tar.gz
   1.252 + # cd lighttpd-1.4.18
   1.253 + # ./configure -enable-shared --disable-ipv6 --prefix=/usr \
   1.254 +   --libdir=/usr/lib/lighttpd --mandir=/usr/share/man
   1.255 + # make
   1.256 + # make DESTDIR=$PWD/_pkg install
   1.257 + # strip -vs _pkg/usr/bin/*
   1.258 + # strip -vs _pkg/usr/sbin/*
   1.259 + # strip -vs _pkg/usr/lib/lighttpd/*
   1.260 +</pre>
   1.261 +<p>
   1.262 +Install the server and generated libraries. We will then copy some of the modules (9):
   1.263 +</p>
   1.264 +<pre> # cp _pkg/usr/bin/* $fs/usr/bin
   1.265 + # cp _pkg/usr/sbin/* $fs/usr/sbin
   1.266 + # mkdir $fs/usr/lib/lighttpd
   1.267 + Modules :
   1.268 + # cp _pkg/usr/lib/lighttpd/mod_access.so $fs/usr/lib/lighttpd
   1.269 + # cp _pkg/usr/lib/lighttpd/mod_accesslog.so $fs/usr/lib/lighttpd
   1.270 + # cp _pkg/usr/lib/lighttpd/mod_alias.so $fs/usr/lib/lighttpd
   1.271 + # cp _pkg/usr/lib/lighttpd/mod_auth.so $fs/usr/lib/lighttpd
   1.272 + # cp _pkg/usr/lib/lighttpd/mod_cgi.so $fs/usr/lib/lighttpd
   1.273 + # cp _pkg/usr/lib/lighttpd/mod_compress.so $fs/usr/lib/lighttpd
   1.274 + # cp _pkg/usr/lib/lighttpd/mod_rewrite.so $fs/usr/lib/lighttpd
   1.275 + # cp _pkg/usr/lib/lighttpd/mod_status.so $fs/usr/lib/lighttpd
   1.276 + # cp _pkg/usr/lib/lighttpd/mod_userdir.so $fs/usr/lib/lighttpd
   1.277 +</pre>
   1.278 +<h4>libs</h4>
   1.279 +<p>
   1.280 +There should be a libdl.so.2 library; if missing, we can copy:
   1.281 +</p>
   1.282 +<pre> # cp -a /lib/libdl* $fs/lib
   1.283 +</pre>
   1.284 +<h4>/var/www - root of documents served</h4>
   1.285 +<p>
   1.286 +/var/www is the root directory of documents served by default. You can access this via the url http://localhost/. 
   1.287 +This directory contains an <code>index.html</code> automatically displayed by a query. 
   1.288 +We will create the directory /var/www, to see what's placed inside:
   1.289 +</p>
   1.290 +<pre> # mkdir -p $fs/var/www
   1.291 +</pre>
   1.292 +<h4>lighttpd.conf - Lighttpd configuration file</h4>
   1.293 +<p>
   1.294 +The Lighttpd main configuration file is located at /etc/lighttpd and is called lighttpd.conf. 
   1.295 +The configuration file SliTaz provides is self-explanatary, just browse. You can find other examples on the 
   1.296 +Lighttpd website and as well as a example configuration in /doc in the Lighttpd archive:
   1.297 +</p>
   1.298 +<pre> # cp -a ../slitaz-tools-1.1/etc/lighttpd $fs/etc
   1.299 +</pre>
   1.300 +<p>
   1.301 +Creating the directory containing the log files:
   1.302 +</p>
   1.303 +<pre> # mkdir $fs/var/log/lighttpd
   1.304 +</pre>
   1.305 +<h4>User and group www</h4>
   1.306 +<p>
   1.307 +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. 
   1.308 +The default user on SliTaz is 'www', but you can change this in the configuration file lighttpd.conf. 
   1.309 +The BusyBox application adduser has some limitations, so we add user 'www' manually. We also change permissions on 
   1.310 +the directory of web server logs:
   1.311 +</p>
   1.312 +<pre> # echo "www:x:80:80:www:/var/www:/bin/sh" &gt;&gt; $fs/etc/passwd
   1.313 + # echo "www:*:13509:0:99999:7:::" &gt;&gt; $fs/etc/shadow
   1.314 + # echo "www:*:13509:0:99999:7:::" &gt;&gt; $fs/etc/shadow-
   1.315 + # chroot $fs /bin/ash
   1.316 + /# addgroup -g 80 www
   1.317 + /# chown www.www /var/log/lighttpd
   1.318 + # exit
   1.319 +</pre>
   1.320 +<p>
   1.321 +To start the web server, you can use script /etc/init.d/lighttpd provided by SliTaz tools, by typing: 
   1.322 +<code>/etc/init.d/lighttpd start</code>. You can also automate its 
   1.323 +launch at boot with a link /etc/init.d/lighttpd pointing to /etc/rc.d/60lighttpd.
   1.324 +</p>
   1.325 +<a name="iptables"></a>
   1.326 +<h3><font color="#6c0023">iptables-1.3.7 - Netfilter, Linux firewall</font></h3>
   1.327 +<p>
   1.328 +Netfilter (<a href="http://www.netfilter.org/">www.netfilter.org</a>) is the module which provides the Linux 
   1.329 +kernel firewall functions, shared internet connections (NAT) and the archiving of network traffic. 
   1.330 +The iptables command allows you to configure Netfilter using iptables-restore 
   1.331 +and iptable-save, to save and restore the Netfilter configuration:
   1.332 +</p>
   1.333 +<pre> # cd ..
   1.334 + # wget http://www.netfilter.org/projects/iptables/files/iptables-1.3.7.tar.bz2
   1.335 + # tar xjf iptables-1.3.7.tar.bz2
   1.336 + # cd iptables-1.3.7
   1.337 + # make KERNEL_DIR=../linux-2.6.20 BINDIR=/sbin \
   1.338 +   LIBDIR=/lib MANDIR=/usr/share/man
   1.339 + # make KERNEL_DIR=../linux-2.6.20 BINDIR=/sbin \
   1.340 +   LIBDIR=/lib MANDIR=/usr/share/man \
   1.341 +   DESTDIR=$PWD/_pkg install
   1.342 + # strip  _pkg/sbin/*
   1.343 + # strip  _pkg/lib/iptables/*
   1.344 +</pre>
   1.345 +<p>
   1.346 +Installing the iptables* applications and libraries sufficient for a basic firewall:
   1.347 +</p>
   1.348 +<pre> # cp -a _pkg/sbin/iptables* $fs/sbin
   1.349 + # mkdir $fs/lib/iptables
   1.350 + # cp -a _pkg/lib/iptables/{libipt_standard.so,libipt_conntrack.so} \
   1.351 +   $fs/lib/iptables
   1.352 + # cp -a _pkg/lib/iptables/{libipt_tcp.so,libipt_udp.so} $fs/lib/iptables
   1.353 +</pre>
   1.354 +<p>
   1.355 +To satisfy the iptables dependencies, you must copy the libnsl* library:
   1.356 +</p>
   1.357 +<pre> # cp -va /lib/libnsl* $fs/lib/tls
   1.358 + # strip $fs/lib/libnsl*
   1.359 +</pre>
   1.360 +<a name="sqlite"></a>
   1.361 +<h3><font color="#6c0023">sqlite-3.5.1 - Small SQL database engine</font></h3>
   1.362 +<p>
   1.363 +This package provides sqlite3 (<a href="http://www.sqlite.org/">www.sqlite.org</a>) and sqlite3.so* 
   1.364 +libraries. SQLite is fast and efficient and integrates directly to programs using database files: 
   1.365 +</p>
   1.366 +<pre> # cd ..
   1.367 + # wget http://www.sqlite.org/sqlite-3.5.1.tar.gz
   1.368 + # tar xzf sqlite-3.5.1.tar.gz
   1.369 + # cd sqlite-3.5.1
   1.370 + # ./configure --prefix=/usr --disable-tcl
   1.371 + # make
   1.372 + # make DESTDIR=$PWD/_pkg install
   1.373 + # strip _pkg/usr/lib/*.so*
   1.374 + # strip _pkg/usr/bin/*
   1.375 +</pre>
   1.376 +<p>
   1.377 +Installing the sqlite3 utility and libraries in the rootfs of SliTaz:
   1.378 +</p>
   1.379 +<pre> # cp -a _pkg/usr/lib/*.so* $fs/usr/lib
   1.380 + # cp -a _pkg/usr/bin/* $fs/usr/bin
   1.381 +</pre>
   1.382 +<a name="cdrkit"></a>
   1.383 +<h3><font color="#6c0023">cdrkit-1.1.5 - Tools for manipulating cdrom and ISO images</font></h3>
   1.384 +<p>
   1.385 +cdrkit (<a href="http://www.cdrkit.org/">www.cdrkit.org</a>) provides tools for manipulating cdroms. 
   1.386 +SliTaz installs by default wodim for burning and genisoimage to create an ISO image. 
   1.387 +The compilation is a bit different (cmake), but shouldn't pose any problems:
   1.388 +</p>
   1.389 +<pre> # cd ..
   1.390 + # wget http://cdrkit.org/releases/cdrkit-1.1.5.tar.gz
   1.391 + # tar xzf cdrkit-1.1.5.tar.gz
   1.392 + # cd cdrkit-1.1.5
   1.393 + # make
   1.394 + # make install PREFIX=$PWD/_pkg/usr
   1.395 + # strip -v _pkg/usr/bin/*
   1.396 + # strip -v _pkg/usr/sbin/*
   1.397 + # cp _pkg/usr/bin/genisoimage $fs/usr/bin
   1.398 + # cp _pkg/usr/bin/wodim $fs/usr/bin
   1.399 +</pre>
   1.400 +<p>
   1.401 +Copy the library libcap.so.1 required by wodim:
   1.402 +</p>
   1.403 +<pre> # cp -a /lib/libcap.so* $fs/lib
   1.404 +</pre>
   1.405 +<a name="cpio"></a>
   1.406 +<h3><font color="#6c0023">cpio-2.8 - Archiver</font></h3>
   1.407 +<p>
   1.408 +<code>cpio</code> (<a href="http://www.gnu.org/software/cpio/">http://www.gnu.org/software/cpio/</a>) provides tools for 
   1.409 +manipulating cpio archives. The archive format is used for packages and the SliTaz initramfs image of the cdrom. 
   1.410 +Note that BusyBox provides a version of cpio that only unpacks archives:
   1.411 +</p>
   1.412 +<pre> # cd ..
   1.413 + # wget ftp://sunsite.cnlab-switch.ch/mirror/gnu/cpio/cpio-2.8.tar.gz
   1.414 + # tar xzf cpio-2.8.tar.gz
   1.415 + # cd cpio-2.8
   1.416 + # ./configure --prefix=/usr --bindir=/bin \
   1.417 +   --libexecdir=/usr/bin --mandir=/usr/share/man \
   1.418 +   --infodir=/usr/share/info
   1.419 + # make
   1.420 + # make DESTDIR=$PWD/_pkg install
   1.421 + # strip -v _pkg/bin/*
   1.422 + # strip -v _pkg/usr/bin/*
   1.423 +</pre>
   1.424 +<p>
   1.425 +Installing <code>cpio</code> in /bin and <code>rmt</code> in /usr/bin. You can also install the French locale files:
   1.426 +</p>
   1.427 +<pre> # cp -a _pkg/bin/* $fs/bin
   1.428 + # cp -a _pkg/usr/bin/* $fs/usr/bin
   1.429 + # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
   1.430 +</pre>
   1.431 +<a name="microperl"></a>
   1.432 +<h3><font color="#6c0023">microperl-5.8.8 - A tiny Perl</font></h3>
   1.433 +<p>
   1.434 +Microperl is a tiny implementation of Perl using the most basic functions of the language. 
   1.435 +You can find more info in the source archive and the file <code>README.micro</code>. 
   1.436 +We use a small <code>sed</code> on the configuration file that searches for microperl modules 
   1.437 +in /usr/lib/perl5. We also create a link to the #! /usr/bin/perl script:
   1.438 +</p>
   1.439 +<pre> # wget http://ftp.funet.fi/pub/CPAN/src/perl-5.8.8.tar.gz
   1.440 + # tar xzf perl-5.8.8.tar.gz
   1.441 + # cd perl-5.8.8
   1.442 + # sed -i s/'usr\/local'/'usr'/ uconfig.sh
   1.443 + # sed -i s/'perl5\/5.9'/'perl5'/ uconfig.sh
   1.444 + # sed -i s/'unknown'/'i486-pc-linux-gnu'/ uconfig.sh
   1.445 + # make -f Makefile.micro regen_uconfig
   1.446 + # make -f Makefile.micro
   1.447 + # strip microperl
   1.448 + # cp microperl $fs/usr/bin
   1.449 + # chroot $fs /bin/ash
   1.450 + /# cd /usr/bin
   1.451 + /# ln -s microperl perl
   1.452 + /# exit
   1.453 +</pre>
   1.454 +<a name="module-init-tools"></a>
   1.455 +<h3><font color="#6c0023">module-init-tools-3.2 - Utilities for manipulating kernel modules</font></h3>
   1.456 +<p>
   1.457 +The <a href="http://ftp.kernel.org/pub/linux/utils/kernel/module-init-tools/">module-init-tools</a> 
   1.458 +from kernel.org: modprobe, insmod, rmmod and lsmod. We have chosen to use these because we can compile 
   1.459 +modutils/modprobe to support compressed (.gz) modules to save space. To do this we use the option 
   1.460 +--enable-zlib, we then clean and copy the binaries. We do not take everything that has been created, 
   1.461 +only what we need: depmod, insmod, modinfo, modprobe and rmmod in /sbin and lsmod in /bin:
   1.462 +</p>
   1.463 +<pre> # cd ..
   1.464 + # wget http://ftp.kernel.org/pub/linux/utils/kernel/module-init-tools/module-init-tools-3.2.tar.bz2
   1.465 + # tar xjf module-init-tools-3.2.tar.bz2
   1.466 + # cd module-init-tools-3.2
   1.467 + # ./configure --enable-zlib --prefix=/usr --sbindir=/sbin --bindir=/bin \
   1.468 +   --sysconfdir=/etc --infodir=/usr/share/info --mandir=/usr/share/man
   1.469 + # make
   1.470 + # make DESTDIR=$PWD/_pkg install
   1.471 + # strip -v _pkg/sbin/{depmod,insmod,modinfo,modprobe,rmmod}
   1.472 + # strip -v _pkg/bin/lsmod
   1.473 + # cp -i _pkg/sbin/{depmod,insmod,modinfo,modprobe,rmmod} $fs/sbin
   1.474 + # cp -i _pkg/bin/lsmod $fs/bin
   1.475 + # cd ..
   1.476 +</pre>
   1.477 +<a name="kernel-modules"></a>
   1.478 +<h3><font color="#6c0023">Copy kernel modules</font></h3>
   1.479 +<p>
   1.480 +Copy files from linux-2.6.20/_pkg:
   1.481 +</p>
   1.482 +<pre> # cp -a linux-2.6.20/_pkg/lib/* $fs/lib
   1.483 +</pre>
   1.484 +<h4>Compress kernel modules</h4>
   1.485 +<p>
   1.486 +Compress modules, this step will us gain back around 50% of available space.
   1.487 +We begin by moving into the rootfs, then we search for all files with the 
   1.488 +<code>.ko</code> extension, and compress them. You
   1.489 +can also do this with the 'gzmodtaz.sh' script found in SliTaz tools:
   1.490 +</p>
   1.491 +<pre> # cd $fs
   1.492 +</pre>
   1.493 +<p>
   1.494 +With 'gztazmod.sh':
   1.495 +</p>
   1.496 +<pre> # cp -v ../src/slitaz-tools-1.1/utils/gztazmod.sh sbin
   1.497 + # ./sbin/gztazmod.sh lib/modules/2.6.20-slitaz
   1.498 +</pre>
   1.499 +<p>
   1.500 +Or by hand:
   1.501 +</p>
   1.502 +<pre> # cd lib/modules/2.6.20-slitaz
   1.503 + # find . -name "*.ko" -exec gzip '{}' \;
   1.504 + # sed 's/\.ko/.ko.gz/g' modules.dep &gt; tmp.dep
   1.505 + # rm modules.dep
   1.506 + # mv tmp.dep modules.dep
   1.507 +</pre>
   1.508 +<a name="initramfs-iso"></a>
   1.509 +<h3><font color="#6c0023">Generate the initramfs and an ISO image</font></h3>
   1.510 +<p>
   1.511 +To create a new ISO image, you can use 'mktaziso' in 
   1.512 +<a href="http://www.slitaz.org/en/doc/cookbook/slitaz-tools.html">SliTaz tools</a>.  
   1.513 +Or you can create a new initramfs image, copy it to /boot in the root of the cdrom
   1.514 +(rootcd) and finally generate an ISO image with genisoimage:
   1.515 +</p>
   1.516 +<pre> # cd $fs
   1.517 + # find . -print | cpio -o -H newc | gzip -9 &gt; ../rootfs.gz
   1.518 + # cd ..
   1.519 + # cp rootfs.gz rootcd/boot
   1.520 + # genisoimage -R -o slitaz-test.iso -b boot/isolinux/isolinux.bin \
   1.521 +   -c boot/isolinux/boot.cat -no-emul-boot -boot-load-size 4 \
   1.522 +   -V "SliTaz" -input-charset iso8859-1 -boot-info-table rootcd
   1.523 +</pre>
   1.524 +<p>
   1.525 +Test iso image:
   1.526 +</p>
   1.527 +<pre> # qemu -cdrom slitaz-test.iso
   1.528 +</pre>
   1.529 +
   1.530 +<h4>Following chapter</h4>
   1.531 +<p>
   1.532 +The next chapter is called <a href="base-ncurses.html">Base Ncurses</a>. It
   1.533 +covers the installation and configuration of the ncurses libraries and
   1.534 +applications.
   1.535 +</p> 
   1.536 +
   1.537 +<!-- End of content -->
   1.538 +</div>
   1.539 +
   1.540 +<!-- Footer. -->
   1.541 +<div id="footer">
   1.542 +	<div class="footer-right"></div>
   1.543 +	<a href="#top">Top of the page</a> | 
   1.544 +	<a href="index.html">Table of contents</a>
   1.545 +</div>
   1.546 +
   1.547 +<div id="copy">
   1.548 +    Copyright &copy; 2008 <a href="http://www.slitaz.org/en/">SliTaz</a> -
   1.549 +    <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>;<br />
   1.550 +    Documentation is under
   1.551 +    <a href="http://www.gnu.org/copyleft/fdl.html">GNU Free Documentation License</a>
   1.552 +    and code is <a href="http://validator.w3.org/">valid xHTML 1.0</a>.
   1.553 +</div>
   1.554 +
   1.555 +</body>
   1.556 +</html>
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/en/doc/scratchbook/base-ncurses.html	Tue Dec 23 14:10:23 2008 +0000
     2.3 @@ -0,0 +1,444 @@
     2.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     2.5 +    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     2.6 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
     2.7 +<head>
     2.8 +    <title>SliTaz Scratchbook - Base Ncurses</title>
     2.9 +    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
    2.10 +    <meta name="description" content="" />
    2.11 +    <meta name="expires" content="never" />
    2.12 +    <meta name="modified" content="2008-11-22 17:00:00" />
    2.13 +    <meta name="publisher" content="www.slitaz.org" />
    2.14 +    <meta name="author" content="Christophe Lincoln"/>
    2.15 +    <link rel="shortcut icon" href="favicon.ico" />
    2.16 +    <link rel="stylesheet" type="text/css" href="book.css" />
    2.17 +</head>
    2.18 +<body bgcolor="#ffffff">
    2.19 +
    2.20 +<!-- Header and quick navigation -->
    2.21 +<div id="header">
    2.22 +<div align="right" id="quicknav">
    2.23 +    <a name="top"></a>
    2.24 +    <a href="base-apps.html">Base apps</a> |
    2.25 +    <a href="index.html">Table of contents</a> |
    2.26 +    <a href="locale.html">Locale &amp; i18n</a>
    2.27 +</div>
    2.28 +<h1><font color="#3E1220">SliTaz Scratchbook</font></h1>
    2.29 +</div>
    2.30 +
    2.31 +<!-- Content. -->
    2.32 +<div id="content">
    2.33 +<div class="content-right"></div>
    2.34 +
    2.35 +
    2.36 +<h2><font color="#df8f06">Ncurses libraries and applications</font></h2>
    2.37 +<p>
    2.38 +Installation and configuration of ncurses libraries and applications.
    2.39 +</p>
    2.40 +<ul>
    2.41 +    <li><a href="#about">About the chapter.</a> - Description and environmental
    2.42 +    variable ($fs)</li>
    2.43 +    <li><a href="#ncurses">ncurses-5.6</a> -  Utilities and libraries for terminal.</li>
    2.44 +    <li><a href="#clex">clex-3.16</a> - File manager.</li>
    2.45 +    <li><a href="#nano">nano-2.0.6</a> - Advanced text editor with colored syntax.</li>
    2.46 +    <li><a href="#retawq">retawq-0.2.6c</a> - Navigate the web in text 
    2.47 +    mode using ncurses.</li>
    2.48 +    <li><a href="#htop">htop-0.6.5</a> - System process viewer.</li>
    2.49 +    <li><a href="#dialog">dialog-1.1-20070409</a> - GUI shell scripts.</li>
    2.50 +    <li><a href="#ninvaders">ninvaders-0.1.1</a> - Space Invaders clone.</li>
    2.51 +    <li><a href="#bastet">bastet-0.41</a> - Bastard Tetris clone.</li>
    2.52 +    <li><a href="#rhapsody">rhapsody-0.28b</a> - IRC chat client.</li>
    2.53 +    <li><a href="#initramfs-iso">Generate the initramfs and an ISO image.</a></li>
    2.54 +</ul>
    2.55 +<a name="about"></a>
    2.56 +<h3><font color="#6c0023">About</font></h3>
    2.57 +<p>
    2.58 +This chapter describes the construction and installation of some ncurses applications 
    2.59 +and libraries in SliTaz. The procedure consists of moving into the /src directory, 
    2.60 +downloading the sources for the application in question, unpacking, reading the README or 
    2.61 +INSTALL file(s), compiling and installing the binary in SliTaz. Once the applications 
    2.62 +are installed, we can create a new initramfs, copy it to the root of the cdrom and generate 
    2.63 +a new ISO image. For this you can also use <code>mktaziso</code> in 
    2.64 +<a href="http://www.slitaz.org/en/doc/cookbook/slitaz-tools.html">SliTaz tools</a>.
    2.65 +</p>
    2.66 +<h4>Assign an environment variable ($fs)</h4>
    2.67 +<p>
    2.68 +An environmental variable can't specify the path to the directory, just the name of the directory. 
    2.69 +We will affect a variable '$fs' to indicate the path to the root filesystem
    2.70 +(rootfs). To do this, we venture into the working directory SliTaz/, and type:
    2.71 +</p>
    2.72 +<pre> # export fs=$PWD/rootfs
    2.73 +</pre>
    2.74 +<p>
    2.75 +To check:
    2.76 +</p>
    2.77 +<pre> # echo $fs
    2.78 +</pre>
    2.79 +<a name="ncurses"></a>
    2.80 +<h3><font color="#6c0023">ncurses-5.6 - Terminal utilities and libraries</font></h3>
    2.81 +<p>
    2.82 +ncurses (<a href="http://dickey.his.com/ncurses/">dickey.his.com/ncurses/</a>) contains 
    2.83 +functions to display text in different ways on the screen of a Linux terminal and also provides 
    2.84 +the terminfo file. Ncurses libraries are used among others by retawq, nano and some games. 
    2.85 +We install the libraries in /lib and the rest in /usr/bin with a small strip to clean the executables:
    2.86 +</p>
    2.87 +<pre> # cd src
    2.88 + # wget ftp://invisible-island.net/ncurses/ncurses-5.6.tar.gz
    2.89 + # tar xzf ncurses-5.6.tar.gz
    2.90 + # cd ncurses-5.6
    2.91 + # ./configure --prefix=/usr \
    2.92 +   --libdir=/lib --sysconfdir=/etc \
    2.93 +   --infodir=/usr/share/info --mandir=/usr/share/man \
    2.94 +   --with-shared --without-debug --without-ada
    2.95 + # make
    2.96 + # make DESTDIR=$PWD/_pkg install
    2.97 + # strip -v _pkg/lib/*
    2.98 + # strip -v _pkg/usr/bin/*
    2.99 +</pre>
   2.100 +<p>
   2.101 +Copy the libcurses library and some applications in SliTaz. The reset utility is used at the end of 
   2.102 +the rcS initialization script to remove the Linux logo. If you wish, you can copy the associated utilities 
   2.103 +(tic, tack, toe, etc), being careful not to delete the link to BusyBox:
   2.104 +</p>
   2.105 +<pre> # cp -a _pkg/lib/libncurses.so* $fs/lib
   2.106 + # cp -ia _pkg/usr/bin/{clear,ncurses5-config,tset,reset} \
   2.107 +   $fs/usr/bin
   2.108 +</pre>
   2.109 +<p>
   2.110 +Copy terminfo files, we only use a few files. If you want more, you can copy:
   2.111 +</p>
   2.112 +<pre> # mkdir -v $fs/usr/share/terminfo
   2.113 + # mkdir -v $fs/usr/share/terminfo/{a,l,r,v,x}
   2.114 + # cp _pkg/usr/share/terminfo/a/ansi \
   2.115 +   $fs/usr/share/terminfo/a
   2.116 + # cp _pkg/usr/share/terminfo/l/linux \
   2.117 +   $fs/usr/share/terminfo/l
   2.118 + # cp _pkg/usr/share/terminfo/r/rxvt \
   2.119 +   $fs/usr/share/terminfo/r
   2.120 + # cp _pkg/usr/share/terminfo/x/{xterm,xterm-color,xterm-new,xterm-vt220} \
   2.121 +   $fs/usr/share/terminfo/x
   2.122 + # cp _pkg/usr/share/terminfo/v/{vt100,vt102*} \
   2.123 +   $fs/usr/share/terminfo/v
   2.124 +</pre>
   2.125 +<p>
   2.126 +Copy the tabset files:
   2.127 +</p>
   2.128 +<pre> # cp -a _pkg/usr/share/tabset $fs/usr/share
   2.129 +</pre>
   2.130 +<a name="clex"></a>
   2.131 +<h3><font color="#6c0023">clex-3.16 - File Manager</font></h3>
   2.132 +<p>
   2.133 +CLEX (<a href="http://www.clex.sk/">http://www.clex.sk/</a>) is a small ncurses file 
   2.134 +manager (160 KB). The configuration file (rc) is ~/clexrc; ~/.clexbm is used for 
   2.135 +bookmarks:
   2.136 +</p>
   2.137 +<pre> # cd ..
   2.138 + # wget http://www.clex.sk/download/clex-3.16.tar.gz
   2.139 + # tar xzf clex-3.16.tar.gz
   2.140 + # cd clex-3.16
   2.141 + # ./configure --prefix=/usr --infodir=/usr/share/info \
   2.142 +   --mandir=/usr/share/man
   2.143 + # make
   2.144 + # make DESTDIR=$PWD/_pkg install
   2.145 + # strip -v _pkg/usr/bin/clex
   2.146 +</pre>
   2.147 +<p>
   2.148 +Install the clex binary in the rootfs of SliTaz:
   2.149 +</p>
   2.150 +<pre> # cp _pkg/usr/bin/clex $fs/usr/bin
   2.151 +</pre>
   2.152 +<h4>libs</h4>
   2.153 +<p>
   2.154 +If we execute the <code>ldd</code> command on clex, the following dependancies should be displayed:
   2.155 +</p>
   2.156 +<pre class="script">        libncurses.so.5 =&gt; /lib/libncurses.so.5 (0x40025000)
   2.157 +        libc.so.6 =&gt; /lib/libc.so.6 (0x40064000)
   2.158 +        /lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0x40000000)
   2.159 +</pre>
   2.160 +<a name="nano"></a>
   2.161 +<h3><font color="#6c0023">nano-2.0.6 - Advanced Text Editor</font></h3>
   2.162 +<p>
   2.163 +GNU nano (<a href="http://www.nano-editor.org/">www.nano-editor.org</a>)  is a well known, 
   2.164 +fast, effective GNU/Linux text editor that supports colored syntax.
   2.165 +This is the default text editor in SliTaz:
   2.166 +</p>
   2.167 +<pre> # cd ..
   2.168 + # wget http://www.nano-editor.org/dist/v2.0/nano-2.0.6.tar.gz
   2.169 + # tar xzf nano-2.0.6.tar.gz
   2.170 + # cd nano-2.0.6
   2.171 + # ./configure --enable-all --enable-extra --prefix=/usr \
   2.172 +   --infodir=/usr/share/info --mandir=/usr/share/man \
   2.173 +   --sysconfdir=/etc
   2.174 + # make
   2.175 + # make DESTDIR=$PWD/_pkg install
   2.176 + # strip -v _pkg/usr/bin/nano
   2.177 +</pre>
   2.178 +<p>
   2.179 +Copy the nano binary and the rnano link in SliTaz:
   2.180 +</p>
   2.181 +<pre> # cp -a _pkg/usr/bin/* $fs/usr/bin
   2.182 +</pre>
   2.183 +<p>
   2.184 +Copy the configuration files in _pkg/usr/share/nano to our rootfs:
   2.185 +</p>
   2.186 +<pre> # cp -a _pkg/usr/share/nano $fs/usr/share
   2.187 +</pre>
   2.188 +<h4>libs</h4>
   2.189 +<p>
   2.190 +If we execute the <code>ldd</code> command on nano, the following dependancies 
   2.191 +should be displayed:
   2.192 +</p>
   2.193 +<pre class="script">        libncurses.so.5 =&gt; /lib/libncurses.so.5 (0x40025000)
   2.194 +        libc.so.6 =&gt; /lib/libc.so.6 (0x40064000)
   2.195 +        /lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0x40000000)
   2.196 +</pre>
   2.197 +<h4>locale</h4>
   2.198 +<p>
   2.199 +About the language, you can copy the .mo files created when installing nano from
   2.200 +/usr/share/locale/(fr,en,de,es,etc)/LC_MESSAGES to the rootfs. Example for the the French language:
   2.201 +</p>
   2.202 +<pre> # cp -a _pkg/usr/share/locale/fr/LC_MESSAGES $fs/usr/share/locale/fr
   2.203 +</pre>
   2.204 +<h4>Customize nano</h4>
   2.205 +<p>
   2.206 +You can customize nano via /etc/nanorc or ~/.nanorc for each user of the system. It's in 
   2.207 +this file that you can define the colors used by nano through the files in /usr/share/nano. 
   2.208 +You will find a broad example of this file in the archive of nano and
   2.209 +<a href="http://www.slitaz.org/en/doc/cookbook/slitaz-tools.html">SliTaz tools</a>.
   2.210 +</p>
   2.211 +<p>
   2.212 +For a system configuration file, you can copy the file in SliTaz tools to /etc in the rootfs:
   2.213 +</p>
   2.214 +<pre> # cd ..
   2.215 + # cp -a slitaz-tools-1.1/etc/nanorc $fs/etc
   2.216 +</pre>
   2.217 +<a name="retawq"></a>
   2.218 +<h3><font color="#6c0023">retawq-0.2.6c - Text mode Web browser</font></h3>
   2.219 +<p>
   2.220 +retawq (<a href="http://retawq.sourceforge.net/">retawq.sourceforge.net</a>) 
   2.221 +is a small text-only web browser. We only flag a few useful options when configuring, 
   2.222 +retawq needs terminfo files, libcurses libraries and libthread:
   2.223 +</p>
   2.224 +<pre> # wget http://switch.dl.sourceforge.net/sourceforge/retawq/retawq-0.2.6c.tar.gz
   2.225 + # tar xzf retawq-0.2.6c.tar.gz
   2.226 + # cd retawq-0.2.6c
   2.227 + # ./configure --enable-i18n --enable-local-cgi --path-prefix=/usr \
   2.228 +   --path-doc=/usr/share/doc/retawq --path-man=/usr/share/man
   2.229 + # make
   2.230 + # strip -v retawq
   2.231 +</pre>
   2.232 +<p>
   2.233 +Copy the retawq binary in SliTaz:
   2.234 +</p>
   2.235 +<pre> # cp retawq $fs/usr/bin
   2.236 +</pre>
   2.237 +<h4>libs</h4>
   2.238 +<pre class="script">        libncurses.so.5 =&gt; /lib/libncurses.so.5 (0x40025000)
   2.239 +        libpthread.so.0 =&gt; /lib/libpthread.so.0 (0x40064000)
   2.240 +        libc.so.6 =&gt; /lib/libc.so.6 (0x40074000)
   2.241 +        /lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0x40000000)
   2.242 +</pre>
   2.243 +<p>
   2.244 +You can copy the lipthread library from your host system or use the minimum package 
   2.245 +glibc-2.3.6 distributed by SliTaz:
   2.246 +</p>
   2.247 +<pre> # cp -a /lib/libpthread* $fs/lib
   2.248 + # strip --strip-unneeded $fs/lib/*
   2.249 +</pre>
   2.250 +<h4>locale</h4>
   2.251 +<p>
   2.252 +For language, you can copy the .mo files in /i18n of the retawq archive to 
   2.253 +/usr/share/locale/(fr,en,es,etc)/LC_MESSAGES. Example for the French language, 
   2.254 +renaming the file to retawq.mo:
   2.255 +</p>
   2.256 +<pre> # cp -v i18n/fr.mo $fs/usr/share/locale/fr/LC_MESSAGES/retawq.mo
   2.257 +</pre>
   2.258 +<h4>Customize retawq</h4>
   2.259 +<p>
   2.260 +To personalize retawq, you can use a ~/.retawq directory containing a config file. 
   2.261 +You can also save bookmarks (html) in the root directory of the user. You will find an
   2.262 +examples/ in the archive of retawq (or SliTaz tools) containing a bookmarks.html 
   2.263 +page with a list of favorite web sites. You can also copy the docs (/documents) from retawq 
   2.264 +to /usr/share/doc/retawq.
   2.265 +</p>
   2.266 +<a name="htop"></a>
   2.267 +<h3><font color="#6c0023">htop-6.0.5 - System process viewer</font></h3>
   2.268 +<p>
   2.269 +
   2.270 +htop (<a href="http://htop.sourceforge.net/">htop.sourceforge.net/</a>) is software 
   2.271 +that displays system processes using ncurses.
   2.272 +</p>
   2.273 +<p>
   2.274 +Returning to the /src directory, download, unpack, configure, compile and clean (with strip):
   2.275 +</p>
   2.276 +<pre> # cd ..
   2.277 + # wget http://switch.dl.sourceforge.net/sourceforge/htop/htop-0.6.5.tar.gz
   2.278 + # tar xzf htop-0.6.5.tar.gz
   2.279 + # cd htop-0.6.5
   2.280 + # ./configure --prefix=/usr --mandir=/usr/share/man
   2.281 + # make
   2.282 + # make DESTDIR=$PWD/_pkg install
   2.283 + # strip -v _pkg/usr/bin/htop
   2.284 +</pre>
   2.285 +<p>
   2.286 +Copy the htop binary in SliTaz:
   2.287 +</p>
   2.288 +<pre> # cp _pkg/usr/bin/htop $fs/usr/bin
   2.289 +</pre>
   2.290 +<p>
   2.291 +You can still copy the htop icon found in: _pkg/usr/share/pixmaps.
   2.292 +</p>
   2.293 +<h4>libs</h4>
   2.294 +<pre class="script">        libm.so.6 =&gt; /lib/libm.so.6 (0xb7f97000)
   2.295 +        libncurses.so.5 =&gt; /lib/libncurses.so.5 (0xb7f55000)
   2.296 +        libc.so.6 =&gt; /lib/libc.so.6 (0xb7e20000)
   2.297 +        /lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0xb7fc9000)
   2.298 +</pre>
   2.299 +<a name="dialog"></a>
   2.300 +<h3><font color="#6c0023">dialog-1.1.20070409 - GUI shell scripts</font></h3>
   2.301 +<p>
   2.302 +
   2.303 +dialog (<a href="http://invisible-island.net/dialog/dialog.html">invisible-island.net/dialog/dialog.html</a>), 
   2.304 +is a utility to build GUI-based consoles:
   2.305 +</p>
   2.306 +<pre> # cd ..
   2.307 + # wget ftp://invisible-island.net/dialog/dialog.tar.gz
   2.308 + # tar xzf dialog.tar.gz
   2.309 + # cd dialog-1.1-20070409
   2.310 + # ./configure --enable-nls --with-ncurses --prefix=/usr \
   2.311 +   --sysconfdir=/etc --mandir=/usr/share/man
   2.312 + # make
   2.313 + # make DESTDIR=$PWD/_pkg install
   2.314 + # strip -v _pkg/usr/bin/dialog
   2.315 +</pre>
   2.316 +<p>
   2.317 +Copy dialog binary in SliTaz:
   2.318 +</p>
   2.319 +<pre> # cp _pkg/usr/bin/dialog $fs/usr/bin
   2.320 +</pre>
   2.321 +<h4>libs</h4>
   2.322 +<pre class="script">        libncurses.so.5 =&gt; /lib/libncurses.so.5 (0x40027000)
   2.323 +        libm.so.6 =&gt; /lib/libm.so.6 (0x40066000)
   2.324 +        libc.so.6 =&gt; /lib/libc.so.6 (0x40089000)
   2.325 +        /lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0x40000000)
   2.326 +</pre>
   2.327 +<h4>locale</h4>
   2.328 +<p>
   2.329 +You can install locale files if you wish:  
   2.330 +</p>
   2.331 +<pre> # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
   2.332 +</pre>
   2.333 +<p>
   2.334 +The dialog configuration file is /etc/dialogrc and/or ~/.dialogrc for each user.
   2.335 +There are also full examples of scripts in the /sample directory in the sources of dialog.
   2.336 +</p>
   2.337 +<a name="ninvaders"></a>
   2.338 +<h3><font color="#6c0023">Ninvaders-0.1.1 - Space Invaders clone</font></h3>
   2.339 +<p>
   2.340 +
   2.341 +ninvaders (<a href="http://ninvaders.sourceforge.net/">http://ninvaders.sourceforge.net/</a>) 
   2.342 +is a clone of the popular Space Invaders game (46 KB). We begin by placing ourselves in the 
   2.343 +/src directory, then we download, untar, compile, clean using strip and copy the nInvaders binary 
   2.344 +in /usr/games of SliTaz:
   2.345 +</p>
   2.346 +<pre> # cd ..
   2.347 + # wget http://ovh.dl.sourceforge.net/sourceforge/ninvaders/ninvaders-0.1.1.tar.gz
   2.348 + # tar xzf ninvaders-0.1.1.tar.gz
   2.349 + # cd ninvaders-0.1.1
   2.350 + # make
   2.351 + # strip -v nInvaders
   2.352 + # cp nInvaders $fs/usr/games
   2.353 +</pre>
   2.354 +<a name="bastet"></a>
   2.355 +<h3><font color="#6c0023">bastet-0.41 -  Bastard Tetris clone</font></h3>
   2.356 +<p>
   2.357 +A game of Tetris (17 KB):
   2.358 +</p>
   2.359 +<pre> # wget http://fph.altervista.org/prog/bastet-0.41.tgz
   2.360 + # tar xzf bastet-0.41.tgz
   2.361 + # cd bastet-0.41
   2.362 + # make
   2.363 + # strip bastet
   2.364 + # cp bastet $fs/usr/games
   2.365 + # mkdir -p $fs/var/games
   2.366 + # touch $fs/var/games/bastet.scores
   2.367 + # chmod 666 $fs/var/games/bastet.scores
   2.368 +</pre>
   2.369 +<a name="rhapsody"></a>
   2.370 +<h3><font color="#6c0023">rhapsody-0.28b - IRC chat client</font></h3>
   2.371 +<p>
   2.372 +Rhapsody (<a href="http://rhapsody.sourceforge.net/">http://rhapsody.sourceforge.net/</a>) 
   2.373 +is a fast and lightweight chat client supporting the IRC protocol. It provides a menu for 
   2.374 +managing servers, channels and configuration. It is therefore easy to use:
   2.375 +</p>
   2.376 +<pre> # cd ..
   2.377 + # wget http://switch.dl.sourceforge.net/sourceforge/rhapsody/rhapsody_0.28b.tgz
   2.378 + # tar xzf rhapsody_0.28b.tgz
   2.379 + # cd rhapsody-0.28b
   2.380 + # ./configure -i /usr/bin -d /usr/share/doc/rhapsody
   2.381 + # make
   2.382 + # strip -v rhapsody
   2.383 +</pre>
   2.384 +<p>
   2.385 +Install the binary and help files in SliTaz. We must adjust permissions on 
   2.386 +these files so that everyone can read:
   2.387 +</p>
   2.388 +<pre> # cp rhapsody $fs/usr/bin
   2.389 + # mkdir $fs/usr/share/doc/rhapsody
   2.390 + # cp -a help $fs/usr/share/doc/rhapsody/help
   2.391 + # chmod 644 $fs/usr/share/doc/rhapsody/help/*
   2.392 +</pre>
   2.393 +<h4>libs</h4>
   2.394 +<p>
   2.395 +Rhapsody uses the following libraries:
   2.396 +</p>
   2.397 +<pre class="script">        libncurses.so.5 =&gt; /lib/libncurses.so.5 (0x40026000)
   2.398 +        libc.so.6 =&gt; /lib/libc.so.6 (0x40066000)
   2.399 +        /lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0x40000000))
   2.400 +</pre>
   2.401 +<h4>Rhapsody use the following libraries:</h4>
   2.402 +<p>
   2.403 +You can customize rhapsody via ~/.rhapsodyrc or use &lt;Ctrl+T&gt;  for options:
   2.404 +</p>
   2.405 +<a name="initramfs-iso"></a>
   2.406 +<h3><font color="#6c0023">Generate the initramfs and an ISO image</font></h3>
   2.407 +<p>
   2.408 +To create a new ISO image, you can use 'mktaziso' in SliTaz tools.  
   2.409 +Or you can create a new initramfs image, copy it to /boot in the root of the cdrom
   2.410 +(rootcd) and finally generate an ISO image with genisoimage:
   2.411 +</p>
   2.412 +<pre> # cd $fs
   2.413 + # find . -print | cpio -o -H newc | gzip -9 &gt; ../rootfs.gz
   2.414 + # cd ..
   2.415 + # cp rootfs.gz rootcd/boot
   2.416 + # genisoimage -R -o slitaz-cooking.iso -b boot/isolinux/isolinux.bin \
   2.417 +   -c boot/isolinux/boot.cat -no-emul-boot -boot-load-size 4 \
   2.418 +   -V "SliTaz" -input-charset iso8859-1 -boot-info-table rootcd
   2.419 +</pre>
   2.420 +<h4>Following chapter</h4>
   2.421 +<p>
   2.422 +The next chapter describes the installation of the
   2.423 +<a href="locale.html">locales</a>
   2.424 +and i18n.
   2.425 +</p>
   2.426 +
   2.427 +
   2.428 +<!-- End of content -->
   2.429 +</div>
   2.430 +
   2.431 +<!-- Footer. -->
   2.432 +<div id="footer">
   2.433 +	<div class="footer-right"></div>
   2.434 +	<a href="#top">Top of the page</a> | 
   2.435 +	<a href="index.html">Table of contents</a>
   2.436 +</div>
   2.437 +
   2.438 +<div id="copy">
   2.439 +    Copyright &copy; 2008 <a href="http://www.slitaz.org/en/">SliTaz</a> -
   2.440 +    <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>;<br />
   2.441 +    Documentation is under
   2.442 +    <a href="http://www.gnu.org/copyleft/fdl.html">GNU Free Documentation License</a>
   2.443 +    and code is <a href="http://validator.w3.org/">valid xHTML 1.0</a>.
   2.444 +</div>
   2.445 +
   2.446 +</body>
   2.447 +</html>
     3.1 --- a/en/doc/scratchbook/base-system.html	Fri Dec 19 12:31:56 2008 +0100
     3.2 +++ b/en/doc/scratchbook/base-system.html	Tue Dec 23 14:10:23 2008 +0000
     3.3 @@ -18,8 +18,8 @@
     3.4  <div id="header">
     3.5  <div align="right" id="quicknav">
     3.6      <a name="top"></a>
     3.7 -    <a href="index.html">Introduction</a> |
     3.8 -    <a href="../index.html">SliTaz doc</a>
     3.9 +    <a href="index.html">Table of contents</a> |
    3.10 +    <a href="base-apps.html">Base apps</a>
    3.11  </div>
    3.12  <h1><font color="#3E1220">SliTaz Scratchbook</font></h1>
    3.13  </div>
    3.14 @@ -647,6 +647,11 @@
    3.15  </p>
    3.16  <pre># qemu -cdrom slitaz-cooking.iso
    3.17  </pre>
    3.18 +<h4>Following chapter</h4>
    3.19 +<p>
    3.20 +The next chapter <a href="base-apps.html">Base applications</a> provides all the instructions to install 
    3.21 +and configure the basic applications and libraries.
    3.22 +</p>
    3.23  
    3.24  <!-- End of content -->
    3.25  </div>
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/en/doc/scratchbook/boot-scripts.html	Tue Dec 23 14:10:23 2008 +0000
     4.3 @@ -0,0 +1,207 @@
     4.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     4.5 +    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     4.6 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
     4.7 +<head>
     4.8 +    <title>SliTaz Scratchbook - Boot Scripts</title>
     4.9 +    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
    4.10 +    <meta name="description" content="" />
    4.11 +    <meta name="expires" content="never" />
    4.12 +    <meta name="modified" content="2008-11-22 17:00:00" />
    4.13 +    <meta name="publisher" content="www.slitaz.org" />
    4.14 +    <meta name="author" content="Christophe Lincoln"/>
    4.15 +    <link rel="shortcut icon" href="favicon.ico" />
    4.16 +    <link rel="stylesheet" type="text/css" href="book.css" />
    4.17 +</head>
    4.18 +<body bgcolor="#ffffff">
    4.19 +
    4.20 +<!-- Header and quick navigation -->
    4.21 +<div id="header">
    4.22 +<div align="right" id="quicknav">
    4.23 +    <a name="top"></a>
    4.24 +    <a href="locale.html">Locale &amp; i18n</a> |
    4.25 +    <a href="index.html">Table of contents</a> |
    4.26 +    <a href="x-window-system.html">X window system</a>
    4.27 +</div>
    4.28 +<h1><font color="#3E1220">SliTaz Scratchbook</font></h1>
    4.29 +</div>
    4.30 +
    4.31 +<!-- Content. -->
    4.32 +<div id="content">
    4.33 +<div class="content-right"></div>
    4.34 +
    4.35 +<h2><font color="#df8f06">Boot scripts</font></h2>
    4.36 +<p>
    4.37 +The startup and shutdown scripts with their configuration files.
    4.38 +</p>
    4.39 +
    4.40 +<ul>
    4.41 +  	<li><a href="#intro">SliTaz and startup.</a></li>
    4.42 +	<li><a href="#init.d">/etc/init.d/*</a> - Directory of scripts and daemons.</li>
    4.43 +	<li><a href="#rcS">/etc/init.d/rcS</a> - Primary initialization script.</li>
    4.44 +	<li><a href="#rc-scripts">Specific scripts and daemons</a> - Scripts and
    4.45 +	daemons with a very specific task.</li>
    4.46 +	<li><a href="#inittab">/etc/inittab</a> - Configuration file init.</li>
    4.47 +</ul>
    4.48 +
    4.49 +<a name="intro"></a>
    4.50 +<h3><font color="#6c0023">SliTaz and startup</font></h3>
    4.51 +
    4.52 +<p>
    4.53 +SliTaz does not use a level of execution (runlevel), the
    4.54 +system is initialized via a primary script and its main 
    4.55 +configuration file. This script itself launches some other smaller 
    4.56 +scripts which deal with the internationalization or the
    4.57 +commands placed for the system to start.
    4.58 +</p>
    4.59 +
    4.60 +<a name="init.d"></a>
    4.61 +<h3><font color="#6c0023">/etc/init.d/* - Directory of scripts and daemons</font></h3>
    4.62 +<p>
    4.63 +The directory /etc/init.d contains all of the rc scripts,
    4.64 +scripts finishing with '.sh' are simple shell scripts and
    4.65 +daemons such as 'dropbear' or 'lighttpd' are scripts
    4.66 +that launch a service. The daemon scripts can start, stop or
    4.67 +restart through the command:
    4.68 +</p>
    4.69 +<pre> # /etc/init.d/daemon [start|stop|restart]
    4.70 +</pre>
    4.71 +<p>
    4.72 +On SliTaz you will find a /etc/init.d/README describing the
    4.73 +basic function of rc scripts. Also note that all startup
    4.74 +scripts and daemons can call upon the <code>/etc/init.d/rc.functions</code>
    4.75 +file. This file makes it possible to include various functions
    4.76 +in rc scripts. SliTaz uses a function <code>status</code> to check whether
    4.77 +the previous command has succeeded (0) or not.
    4.78 +</p>
    4.79 +
    4.80 +<a name="rcS"></a>
    4.81 +<h3><font color="#6c0023">/etc/init.d/rcS - Primary initialization script</font></h3>
    4.82 +<p>
    4.83 +The <code>/etc/init.d/rcS</code> script configures all the 
    4.84 +basic services and initializes the base system. It begins by 
    4.85 +mounting the filesystems and starts services like syslogd, klogd,
    4.86 +mdev and cleans up the system and so on. It
    4.87 +uses the configuration file <code>/etc/rcS.conf</code> to locate which daemons
    4.88 +and scripts to launch at startup. You can browse the script
    4.89 +to know which commands are executed:
    4.90 +</p>
    4.91 +<pre> # nano rootfs/etc/init.d/rcS 
    4.92 +</pre>
    4.93 +
    4.94 +
    4.95 +<a name="rc-scripts"></a>
    4.96 +<h3><font color="#6c0023">Specific scripts and daemons</font></h3>
    4.97 +
    4.98 +<h4>bootopts.sh - LiveCD mode options</h4>
    4.99 +<p>
   4.100 +This script is used to configure the LiveCD options passed
   4.101 +at boot time and is readable via the /proc/cmdline file. 
   4.102 +This is the script that allows you to use a USB key or 
   4.103 +external hard disk <code>/home</code>  partition with the option home=usb
   4.104 +or home=sda[1-9] or directly specify the language and 
   4.105 +keyboard parameters.
   4.106 +</p>
   4.107 +
   4.108 +<h4>network.sh - Initializing the network</h4>
   4.109 +<p>
   4.110 +This script searches the network.sh configuration file 
   4.111 +/etc/network.conf for the network interface to use; if one wants to
   4.112 +launch the DHCP client (or not) or if you want to use a fixed 
   4.113 +(static) IP. On SliTaz the /etc/init.d/network.sh 
   4.114 +script configures the network interfaces to start using the 
   4.115 +information contained in /etc/network.conf. If the variable 
   4.116 +$DHCP is equal to yes, then the /etc/init.d/network.sh 
   4.117 +script launches the DHCP client on the $INTERFACE interface.
   4.118 +</p>
   4.119 +
   4.120 +<h4>i18n.sh - Internationalization</h4>
   4.121 +<p>
   4.122 +SliTaz backs up the configuration of the default locale in
   4.123 +/etc/locale.conf which is read by /etc/profile at each 
   4.124 +login. The /etc/locale.conf is generated during boot time
   4.125 +thanks to the /etc/i18n.sh script. This script launches the
   4.126 +'tazlocale' application if /etc/locale.conf doesn't exist. 
   4.127 +We use the same process for the keyboard layout using 'tazkmap' 
   4.128 +and the /etc/kmap.conf configuration file. Both applications 
   4.129 +are installed and located in /sbin and use dialog and the 
   4.130 +ncurses library. The script also checks whether the 
   4.131 +configuration file for the time zone /etc/TZ exists, 
   4.132 +otherwise it creates one relying on the keyboard configuration.
   4.133 +</p>
   4.134 +
   4.135 +<h4>local.sh - Local commands</h4>
   4.136 +<p>
   4.137 +The /etc/init.d/local.sh script allows the system administrator
   4.138 +to add local commands to be executed at boot. Example:
   4.139 +</p>
   4.140 +<pre class="script">#!/bin/sh
   4.141 +# /etc/init.d/local.sh: Local startup commands.
   4.142 +# All commands here will be executed at boot time.
   4.143 +#
   4.144 +. /etc/init.d/rc.functions
   4.145 +
   4.146 +echo "Starting local startup commands... "
   4.147 +
   4.148 +</pre>
   4.149 +
   4.150 +<h4>rc.shutdown</h4>
   4.151 +<p>
   4.152 +This script is invoked by /etc/inittab during system shutdown.
   4.153 +It also stops all daemons via the variable RUN_DAEMONS in 
   4.154 +the primary <code>/etc/rcS.conf</code> configuration file.
   4.155 +</p>
   4.156 +
   4.157 +<a name="inittab"></a>
   4.158 +<h3><font color="#6c0023">/etc/inittab - Configuration file init</font></h3>
   4.159 +<p>
   4.160 +The first file read by the Kernel at boot. It defines the 
   4.161 +initialization script (/etc/init.d/rcS), shells (ttys) and
   4.162 +actions in the event of a reboot or disruption. You will find
   4.163 +a complete example with accompanying notes in <a href="http://www.slitaz.org/en/doc/cookbook/slitaz-tools.html">SliTaz tools</a>:
   4.164 +</p>
   4.165 +<pre class="script"># /etc/inittab: init configuration for SliTaz GNU/Linux.
   4.166 +# Boot-time system configuration/initialization script.
   4.167 +#
   4.168 +::sysinit:/etc/init.d/rcS
   4.169 +
   4.170 +# /sbin/getty respawn shell invocations for selected ttys.
   4.171 +tty1::respawn:/sbin/getty 38400 tty1
   4.172 +tty2::respawn:/sbin/getty 38400 tty2
   4.173 +tty3::respawn:/sbin/getty 38400 tty3
   4.174 +tty4::respawn:/sbin/getty 38400 tty4
   4.175 +tty5::respawn:/sbin/getty 38400 tty5
   4.176 +tty6::respawn:/sbin/getty 38400 tty6
   4.177 +
   4.178 +# Stuff to do when restarting the init 
   4.179 +# process, or before rebooting.
   4.180 +::restart:/etc/init.d/rc.shutdown
   4.181 +::restart:/sbin/init
   4.182 +::ctrlaltdel:/sbin/reboot
   4.183 +::shutdown:/etc/init.d/rc.shutdown
   4.184 +
   4.185 +</pre>
   4.186 +<h4>Following chapter</h4>
   4.187 +<p>
   4.188 +The next chapter continues on with the <a href="x-window-system.html">X window system</a>.
   4.189 +</p>
   4.190 +
   4.191 +<!-- End of content -->
   4.192 +</div>
   4.193 +
   4.194 +<!-- Footer. -->
   4.195 +<div id="footer">
   4.196 +	<div class="footer-right"></div>
   4.197 +	<a href="#top">Top of the page</a> | 
   4.198 +	<a href="index.html">Table of contents</a>
   4.199 +</div>
   4.200 +
   4.201 +<div id="copy">
   4.202 +    Copyright &copy; 2008 <a href="http://www.slitaz.org/en/">SliTaz</a> -
   4.203 +    <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>;<br />
   4.204 +    Documentation is under
   4.205 +    <a href="http://www.gnu.org/copyleft/fdl.html">GNU Free Documentation License</a>
   4.206 +    and code is <a href="http://validator.w3.org/">valid xHTML 1.0</a>.
   4.207 +</div>
   4.208 +
   4.209 +</body>
   4.210 +</html>
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/en/doc/scratchbook/gtk-apps.html	Tue Dec 23 14:10:23 2008 +0000
     5.3 @@ -0,0 +1,303 @@
     5.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     5.5 +    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     5.6 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
     5.7 +<head>
     5.8 +    <title>SliTaz Scratchbook - GTK+ Applications</title>
     5.9 +    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
    5.10 +    <meta name="description" content="" />
    5.11 +    <meta name="expires" content="never" />
    5.12 +    <meta name="modified" content="2008-11-22 17:00:00" />
    5.13 +    <meta name="publisher" content="www.slitaz.org" />
    5.14 +    <meta name="author" content="Christophe Lincoln"/>
    5.15 +    <link rel="shortcut icon" href="favicon.ico" />
    5.16 +    <link rel="stylesheet" type="text/css" href="book.css" />
    5.17 +</head>
    5.18 +<body bgcolor="#ffffff">
    5.19 +
    5.20 +<!-- Header and quick navigation -->
    5.21 +<div id="header">
    5.22 +<div id="quicknav" align="right">
    5.23 +    <a name="top"></a>
    5.24 +    <a href="gtk-libs.html">Gtk-libs</a> |
    5.25 +    <a href="index.html">Table of contents</a>
    5.26 +</div>
    5.27 +<h1><font color="#3e1220">SliTaz Scratchbook</font></h1>
    5.28 +</div>
    5.29 +
    5.30 +<!-- Content. -->
    5.31 +<div id="content">
    5.32 +<div class="content-right"></div>
    5.33 +
    5.34 +
    5.35 +<h2><font color="#df8f06">GTK+ Applications</font></h2>
    5.36 +<p>
    5.37 +Compiliation and installation of applications using GTK+.
    5.38 +</p>
    5.39 +<ul>
    5.40 +    <li><a href="#about">About this chapter.</a> - Description and environmental variable ($fs)</li>
    5.41 +    <li><a href="#leafpad">leafpad-0.8.10</a> - Simple text editor.</li>
    5.42 +    <li><a href="#gitmail">gitmail-0.4</a> -  Ghost In The Mail, mail client.</li>
    5.43 +    <li><a href="#gqview">gqview-2.0.4</a>  - Images Manager.</li>
    5.44 +    <li><a href="#mtpaint">mtpaint-3.11</a>  - Image creation and processing.</li>
    5.45 +    <li><a href="#transmission">Transmission-0.72</a> - Lightweight BitTorrent client.</li>
    5.46 +    <li><a href="#emelfm2">emelfm2-0.3.5</a> - File Manager.</li>
    5.47 +    <li><a href="#geany">geany-0.11</a> - Integrated Development Environment.</li>
    5.48 +    <li><a href="#gftp">gftp-2.0.18</a> - Fast and simple FTP client.</li>
    5.49 +    <li><a href="#xpad">xpad-2.12</a> - Mini note taking application.</li>
    5.50 +</ul>
    5.51 +<a name="about"></a>
    5.52 +<h3><font color="#6c0023">About</font></h3>
    5.53 +<p>
    5.54 +This chapter describes the commands for the compilation and installation of
    5.55 +GTK+ applications distributed by default on the SliTaz LiveCD. The installation 
    5.56 +of GTK+ libraries are described in the
    5.57 +<a href="http://www.slitaz.org/doc/scratchbook/gtk-libs.html">GTK+ libs</a> chapter.
    5.58 +</p>
    5.59 +<h4>Environmental variable ($fs)</h4>
    5.60 +<p>
    5.61 +If you do not specify any path to the rootfs directory, export the environmental variable:
    5.62 +</p>
    5.63 +<pre> # export fs=$PWD/rootfs
    5.64 +</pre>
    5.65 +<p>
    5.66 +To check:
    5.67 +</p>
    5.68 +<pre> # echo $fs
    5.69 +</pre>
    5.70 +<a name="leafpad"></a>
    5.71 +<h3><font color="#6c0023">leafpad-0.8.10 - Simple text editor</font></h3>
    5.72 +<p>
    5.73 +Website: <a href="http://tarot.freeshell.org/leafpad/">http://tarot.freeshell.org/leafpad/</a>
    5.74 +</p>
    5.75 +<pre> # wget http://savannah.nongnu.org/download/leafpad/leafpad-0.8.10.tar.gz
    5.76 + # tar xzf leafpad-0.8.10.tar.gz
    5.77 + # cd leafpad-0.8.10
    5.78 + # ./configure --prefix=/usr
    5.79 + # make
    5.80 + # make DESTDIR=$PWD/_pkg install
    5.81 + # strip _pkg/usr/bin/*
    5.82 +</pre>
    5.83 +<h4>Install in rootfs</h4>
    5.84 +<pre> # cp _pkg/usr/bin/* $fs/usr/bin
    5.85 + # cp _pkg/usr/share/pixmaps/leafpad.png $fs/usr/share/pixmaps
    5.86 + # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
    5.87 +</pre>
    5.88 +<a name="gitmail"></a>
    5.89 +<h3><font color="#6c0023">gitmail-0.4 - Ghost In The Mail, mail client</font></h3>
    5.90 +<p>
    5.91 +Ghost in the mail allows users to quickly and easily send mail via SMTP.
    5.92 +</p>
    5.93 +<p>
    5.94 +Website: <a href="http://gitmail.sourceforge.net/">http://gitmail.sourceforge.net/</a>
    5.95 +</p>
    5.96 +<pre> # wget http://switch.dl.sourceforge.net/sourceforge/gitmail/gitmail-0.4.tar.gz
    5.97 + # tar xzf gitmail-0.4.tar.gz
    5.98 + # cd GhostInTheMail-0.4
    5.99 + # ./configure --prefix=/usr
   5.100 + # make
   5.101 + # make DESTDIR=$PWD/_pkg \
   5.102 +   gitmaildocdir=/usr/share/doc/GhostInTheMail \
   5.103 +   install
   5.104 + # strip _pkg/usr/bin/*
   5.105 +</pre>
   5.106 +<h4>Install in rootfs</h4>
   5.107 +<pre> # cp _pkg/usr/bin/* $fs/usr/bin
   5.108 +</pre>
   5.109 +<a name="gqview"></a>
   5.110 +<h3><font color="#6c0023">gqview-2.0.4 - Images Manager</font></h3>
   5.111 +<p>
   5.112 +Website: <a href="http://gqview.sourceforge.net/">http://gqview.sourceforge.net/</a>
   5.113 +</p>
   5.114 +<pre> # wget http://belnet.dl.sourceforge.net/sourceforge/gqview/gqview-2.0.4.tar.gz
   5.115 + # tar xzf gqview-2.0.4.tar.gz
   5.116 + # cd gqview-2.0.4
   5.117 + # ./configure --prefix=/usr --mandir=/usr/share/man
   5.118 + # make
   5.119 + # make DESTDIR=$PWD/_pkg install
   5.120 + # strip _pkg/usr/bin/*
   5.121 +</pre>
   5.122 +<h4>Install in rootfs</h4>
   5.123 +<pre> # cp _pkg/usr/bin/* $fs/usr/bin
   5.124 + # cp _pkg/usr/share/pixmaps/* $fs/usr/share/pixmaps
   5.125 + # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
   5.126 +</pre>
   5.127 +<a name="mtpaint"></a>
   5.128 +<h3><font color="#6c0023">mtpaint-3.11 - Image creation and processing</font></h3>
   5.129 +<p>
   5.130 +Website: <a href="http://mtpaint.sourceforge.net/">http://mtpaint.sourceforge.net/</a>
   5.131 +</p>
   5.132 +<pre> # wget http://switch.dl.sourceforge.net/sourceforge/mtpaint/mtpaint-3.11.tar.bz2
   5.133 + # tar xjf mtpaint-3.11.tar.bz2
   5.134 + # cd mtpaint-3.11
   5.135 + # ./configure --cpu=i486 --prefix=/usr intl
   5.136 + # make
   5.137 + # strip src/mtpaint
   5.138 +</pre>
   5.139 +<h4>Install in rootfs</h4>
   5.140 +<pre> # cp src/mtpaint $fs/usr/bin
   5.141 + # cp po/fr.mo $fs/usr/share/locale/fr/LC_MESSAGES/mtpaint.mo
   5.142 + # cp src/icons1/icon.xpm $fs/usr/share/pixmaps/mtpaint.xpm
   5.143 +</pre>
   5.144 +<a name="transmission"></a>
   5.145 +<h3><font color="#6c0023">Transmission-0.72 - Lightweight BitTorrent client</font></h3>
   5.146 +<p>
   5.147 +Tranmission BitTorrent client is fast, lightweight and easy to use. The compiled package provides 
   5.148 +the command line client (transmissioncli) and a GTK+ client (transmission-gtk). We install the GTK+ client, 
   5.149 +the command line client is distributed as a separate SliTaz package (*.tazpkg).
   5.150 +</p>
   5.151 +<p>
   5.152 +Website: <a href="http://transmission.m0k.org/">http://transmission.m0k.org/</a>
   5.153 +</p>
   5.154 +<pre> # wget http://download.m0k.org/transmission/files/Transmission-0.72.tar.gz
   5.155 + # tar xzf Transmission-0.72.tar.gz
   5.156 +
   5.157 + La version 0.72 est mal archivée:
   5.158 + # mv "Transmission .72" Transmission-0.72
   5.159 +
   5.160 + # cd Transmission-0.72
   5.161 + # ./configure --prefix=/usr  --disable-openssl
   5.162 + # make
   5.163 + # strip gtk/transmission-gtk
   5.164 + # strip cli/transmissioncli
   5.165 +</pre>
   5.166 +<h4>Install in rootfs</h4>
   5.167 +<pre> # cp gtk/transmission-gtk $fs/usr/bin
   5.168 + # cp gtk/transmission.png $fs/usr/share/pixmaps
   5.169 + # cp gtk/po/fr.mo $fs/usr/share/locale/fr/LC_MESSAGES/transmission-gtk.mo
   5.170 +</pre>
   5.171 +<a name="emelfm2"></a>
   5.172 +<h3><font color="#6c0023">emelfm2-0.3.5 - File Manager</font></h3>
   5.173 +<p>
   5.174 +The emelFM2 application is a file manager providing lots of useful functions, such as mounting 
   5.175 +devices, a text viewer, opening a terminal in the current directory and so on.
   5.176 +</p>
   5.177 +<p>
   5.178 +Website: <a href="http://emelfm2.net/">http://emelfm2.net/</a>
   5.179 +</p>
   5.180 +<pre> # cd ..
   5.181 + # wget http://emelfm2.net/rel/emelfm2-0.3.5.tar.gz
   5.182 + # tar xzf emelfm2-0.3.5.tar.gz
   5.183 + # cd emelfm2-0.3.5
   5.184 + # make PREFIX=/usr
   5.185 + # make i18n PREFIX=/usr
   5.186 + # make install PREFIX=$PWD/_pkg/usr
   5.187 + # make install_i18n PREFIX=$PWD/_pkg/usr
   5.188 + # strip -v _pkg/usr/bin/*
   5.189 + # strip -v _pkg/usr/lib/emelfm2/plugins/*
   5.190 +</pre>
   5.191 +<h4>Install in rootfs</h4>
   5.192 +<pre> # cp _pkg/usr/bin/* $fs/usr/bin
   5.193 + # cp -a _pkg/usr/lib/* $fs/usr/lib
   5.194 + # cp -a _pkg/usr/share/pixmaps $fs/usr/share
   5.195 + # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
   5.196 +</pre>
   5.197 +<a name="geany"></a>
   5.198 +<h3><font color="#6c0023">geany-0.11 - Integrated Development Environment</font></h3>
   5.199 +<p>
   5.200 +Geany is a simple, fast and light IDE offering colored syntax, tabs, autocompletion, aids to scripts and much more.
   5.201 +</p>
   5.202 +<p>
   5.203 +Website: <a href="http://geany.uvena.de/">http://geany.uvena.de/</a>
   5.204 +</p>
   5.205 +<p>
   5.206 +To compile and run geany on SliTaz, you must have the libstdc++ and libgcc1 libraries, 
   5.207 +both provided by gcc (we recompiled with gcc-4.1.1), but you can copy the libraries from the host system.
   5.208 +</p>
   5.209 +<p>
   5.210 +Note: The force is with you, if you activate it via the option --enable-the-force.
   5.211 +</p>
   5.212 +<pre> # wget http://mesh.dl.sourceforge.net/sourceforge/geany/geany-0.11.tar.gz
   5.213 + # tar xzf geany-0.11.tar.gz
   5.214 + # cd geany-0.11
   5.215 + # ./configure --prefix=/usr --mandir=/usr/share/man \
   5.216 +   --disable-vte --enable-the-force
   5.217 + # make
   5.218 + # make DESTDIR=$PWD/_pkg install
   5.219 + # strip -v _pkg/usr/bin/*
   5.220 +</pre>
   5.221 +<h4>Install in rootfs</h4>
   5.222 +<pre> # cp _pkg/usr/bin/* $fs/usr/bin
   5.223 + # cp -a _pkg/usr/share/geany $fs/usr/share
   5.224 + # cp _pkg/usr/share/pixmaps/geany.png $fs/usr/share/pixmaps
   5.225 + # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
   5.226 +</pre>
   5.227 +<a name="gftp"></a>
   5.228 +<h3><font color="#6c0023">gftp-2.0.18 - Fast and simple FTP client</font></h3>
   5.229 +<p>
   5.230 +The gFTP application is a fast and efficient FTP client with a GTK+ graphical interface. 
   5.231 +Note that we compile without support for a text interface and ssl support. Get, untar, 
   5.232 +configure, compile and install.
   5.233 +</p>
   5.234 +<p>
   5.235 +Website: <a href="http://www.gftp.org/">http://www.gftp.org/</a>
   5.236 +</p>
   5.237 +<pre> # wget http://www.gftp.org/gftp-2.0.18.tar.gz
   5.238 + # tar xzf gftp-2.0.18.tar.gz
   5.239 + # cd gftp-2.0.18
   5.240 + # ./configure --prefix=/usr --mandir=/usr/share/man \
   5.241 +   --disable-ssl --disable-textport \
   5.242 +   --build=i486-pc-linux-gnu --host=i486-pc-linux-gnu
   5.243 + # make
   5.244 + # make DESTDIR=$PWD/_pkg install
   5.245 + # strip _pkg/usr/bin/*
   5.246 +</pre>
   5.247 +<h4>Install in rootfs</h4>
   5.248 +<p>
   5.249 +SliTaz provides only the GTK+ client on the CD. Note that <code>gftp</code> is just a small 
   5.250 +script that detects the environment (console or X) and launches the right interface:
   5.251 +</p>
   5.252 +<pre> # cp _pkg/usr/bin/gftp $fs/usr/bin
   5.253 + # cp _pkg/usr/bin/gftp-gtk $fs/usr/bin
   5.254 + # cp -a _pkg/usr/share/gftp $fs/usr/share
   5.255 + # cp -a _pkg/usr/share/pixmaps $fs/usr/share
   5.256 + # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
   5.257 +</pre>
   5.258 +<p>
   5.259 +To save a little space and avoid duplication, you can delete 'COPYING' (17 KB) 
   5.260 +included in /usr/share/gftp. The GNU licence is already present in /usr/share/licence, 
   5.261 +if you want to create a symbolic link.
   5.262 +</p>
   5.263 +<a name="xpad"></a>
   5.264 +<h3><font color="#6c0023">xpad-2.12 - Mini note taking application</font></h3>
   5.265 +<p>
   5.266 +The Xpad application can quickly take notes via various customizable (GTK+) windows.
   5.267 +</p>
   5.268 +<p>
   5.269 +Website: <a href="http://xpad.sourceforge.net/">http://xpad.sourceforge.net/</a>
   5.270 +</p>
   5.271 +<pre> # wget http://surfnet.dl.sourceforge.net/sourceforge/xpad/xpad-2.12.tar.bz2
   5.272 + # tar xjf xpad-2.12.tar.bz2
   5.273 + # cd xpad-2.12
   5.274 + # ./configure --prefix=/usr --mandir=/usr/share/man \
   5.275 +   --build=i486-pc-linux-gnu --host=i486-pc-linux-gnu
   5.276 + # make
   5.277 + # make DESTDIR=$PWD/_pkg install
   5.278 + # strip _pkg/usr/bin/*
   5.279 +</pre>
   5.280 +<h4>Install in rootfs</h4>
   5.281 +<pre> # cp _pkg/usr/bin/xpad $fs/usr/bin
   5.282 + # cp -a _pkg/usr/share/pixmaps $fs/usr/share
   5.283 + # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
   5.284 +</pre>
   5.285 +
   5.286 +
   5.287 +<!-- End of content -->
   5.288 +</div>
   5.289 +
   5.290 +<!-- Footer. -->
   5.291 +<div id="footer">
   5.292 +	<div class="footer-right"></div>
   5.293 +	<a href="#top">Top of the page</a> | 
   5.294 +	<a href="index.html">Table of contents</a>
   5.295 +</div>
   5.296 +
   5.297 +<div id="copy">
   5.298 +    Copyright &copy; 2008 <a href="http://www.slitaz.org/en/">SliTaz</a> -
   5.299 +    <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>;<br />
   5.300 +    Documentation is under
   5.301 +    <a href="http://www.gnu.org/copyleft/fdl.html">GNU Free Documentation License</a>
   5.302 +    and code is <a href="http://validator.w3.org/">valid xHTML 1.0</a>.
   5.303 +</div>
   5.304 +
   5.305 +</body>
   5.306 +</html>
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/en/doc/scratchbook/gtk-libs.html	Tue Dec 23 14:10:23 2008 +0000
     6.3 @@ -0,0 +1,251 @@
     6.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     6.5 +    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     6.6 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
     6.7 +<head>
     6.8 +    <title>SliTaz Scratchbook - GTK+ Libraries</title>
     6.9 +    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
    6.10 +    <meta name="description" content="" />
    6.11 +    <meta name="expires" content="never" />
    6.12 +    <meta name="modified" content="2008-11-22 17:00:00" />
    6.13 +    <meta name="publisher" content="www.slitaz.org" />
    6.14 +    <meta name="author" content="Christophe Lincoln"/>
    6.15 +    <link rel="shortcut icon" href="favicon.ico" />
    6.16 +    <link rel="stylesheet" type="text/css" href="book.css" />
    6.17 +</head>
    6.18 +<body bgcolor="#ffffff">
    6.19 +
    6.20 +<!-- Header and quick navigation -->
    6.21 +<div id="header">
    6.22 +<div id="quicknav" align="right">
    6.23 +	<a name="top"></a>
    6.24 +	<a href="x-window-system.html">X window system</a> |
    6.25 +	<a href="index.html">Table of contents</a> |
    6.26 +	<a href="gtk-apps.html">GTK+ apps</a>
    6.27 +</div>
    6.28 +<h1><font color="#3e1220">SliTaz Scratchbook</font></h1>
    6.29 +</div>
    6.30 +
    6.31 +<!-- Content. -->
    6.32 +<div id="content">
    6.33 +<div class="content-right"></div>
    6.34 +
    6.35 +
    6.36 +<h2><font color="#df8f06">GTK+ Libraries</font></h2>
    6.37 +<p>
    6.38 +Compilation and installation of GTK+ packages and libraries.
    6.39 +</p>
    6.40 +<ul>
    6.41 +	<li><a href="#about">About this chapter.</a> - Description and environmental variable ($fs)</li>
    6.42 +	<li><a href="#cairo">cairo-1.2.6</a> - 2D graphics library.</li>
    6.43 +	<li><a href="#glib">glib-2.12.4</a> - C routines.</li>
    6.44 +	<li><a href="#pango">pango-1.14.8</a> - Library for layout and rendering of text.</li>
    6.45 +	<li><a href="#atk">atk-1.12.4</a> - Accessibility toolkit.</li>
    6.46 +	<li><a href="#gtk">gtk-2.8.20</a> - The GIMP Toolkit.</li>
    6.47 +	<li><a href="#initramfs-iso">Generate the initramfs and an ISO image.</a></li>
    6.48 +</ul>
    6.49 +<a name="about"></a>
    6.50 +<h3><font color="#6c0023">About</font></h3>
    6.51 +<p>
    6.52 +This chapter describes the installation and configuration of GTK libraries 
    6.53 +on SliTaz used by lots of free software. Note that you can simply compile and 
    6.54 +create a SliTaz package that you can install on demand with tazpkg.
    6.55 +</p>
    6.56 +<p>
    6.57 +The compilation of GTK applications can take quite some time and you must meet many dependencies. 
    6.58 +You will find a guide in English: 
    6.59 +<a href="http://developer.gnome.org/doc/API/2.0/gtk/gtk-building.html">gtk-building.html</a> on developer.gnome.org. 
    6.60 +This document sets out the need to compile things in order: Glib, Pango, ATK and GTK+, etc. 
    6.61 +Before commencing you must verify that the dependencies are properly installed on your host system. 
    6.62 +Glib, Pango, ATK and GTK+ form a group of packages and are distributed by the team of GTK developers.
    6.63 +</p>
    6.64 +<h4>Environmental variable ($fs)</h4>
    6.65 +<p>
    6.66 +If you do not specify any path to the rootfs directory, export the environmental variable:
    6.67 +</p>
    6.68 +<pre> # export fs=$PWD/rootfs
    6.69 +</pre>
    6.70 +<p>
    6.71 +To check:
    6.72 +</p>
    6.73 +<pre> # echo $fs
    6.74 +</pre>
    6.75 +<a name="cairo"></a>
    6.76 +<h3><font color="#6c0023">cairo-1.2.6 - 2D graphics library</font></h3>
    6.77 +<p>
    6.78 +We begin with libcairo (<a href="http://www.cairographics.org/">http://www.cairographics.org/</a>) 
    6.79 +used to compile pango:
    6.80 +</p>
    6.81 +<pre> # cd src
    6.82 + # wget http://cairographics.org/releases/cairo-1.2.6.tar.gz
    6.83 + # tar xzf cairo-1.2.6.tar.gz
    6.84 + # cd cairo-1.2.6
    6.85 + # ./configure --prefix=/usr --mandir=/usr/share/man \
    6.86 +   --with-html-dir=/usr/share/doc
    6.87 + # make
    6.88 + # make DESTDIR=$PWD/_pkg install
    6.89 + # strip -v _pkg/usr/lib/*.so*
    6.90 +</pre>
    6.91 +<h4>Install in rootfs</h4>
    6.92 +<pre> # cp -av _pkg/usr/lib/*.so* $fs/usr/lib
    6.93 +</pre>
    6.94 +<a name="glib"></a>
    6.95 +<h3><font color="#6c0023">glib-2.12.4 - C routines</font></h3>
    6.96 +<pre> # cd ..
    6.97 + # wget ftp://ftp.gtk.org/pub/glib/2.12/glib-2.12.4.tar.bz2
    6.98 + # tar xjf glib-2.12.4.tar.bz2
    6.99 + # cd glib-2.12.4
   6.100 + # ./configure --prefix=/usr --sysconfdir=/etc \
   6.101 +   --mandir=/usr/share/man --with-html-dir=/usr/share/doc
   6.102 + # make
   6.103 + # make DESTDIR=$PWD/_pkg install
   6.104 + # strip -v _pkg/usr/bin/*
   6.105 + # strip -v _pkg/usr/lib/*.so*
   6.106 +</pre>
   6.107 +<h4>Install in rootfs</h4>
   6.108 +<p>
   6.109 +Option: the utilities glib-genmarshal and gobject-query need the /lib/tls/librt.so.1:
   6.110 +</p>
   6.111 +<pre> # cp -a _pkg/usr/lib/*.so* $fs/usr/lib
   6.112 + # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
   6.113 + 
   6.114 + The binaries and options:
   6.115 + # cp -a _pkg/usr/bin/* $fs/usr/bin
   6.116 +</pre>
   6.117 +<a name="pango"></a>
   6.118 +<h3><font color="#6c0023">pango-1.14.8 - Library for layout and rendering of text</font></h3>
   6.119 +<pre> # cd ..
   6.120 + # wget ftp://ftp.gtk.org/pub/pango/1.14/pango-1.14.8.tar.bz2
   6.121 + # tar xjf pango-1.14.8.tar.bz2
   6.122 + # cd pango-1.14.8
   6.123 + # ./configure --prefix=/usr --sysconfdir=/etc \
   6.124 +   --mandir=/usr/share/man --with-html-dir=/usr/share/doc
   6.125 + # make
   6.126 + # make DESTDIR=$PWD/_pkg install
   6.127 + # strip -v _pkg/usr/bin/*
   6.128 + # strip -v _pkg/usr/lib/*.so*
   6.129 + # strip -v _pkg/usr/lib/pango/1.5.0/modules/*
   6.130 +</pre>
   6.131 +<h4>Install in rootfs</h4>
   6.132 +<pre> # cp -a _pkg/usr/bin/* $fs/usr/bin
   6.133 + # cp -a _pkg/usr/lib/*.so* $fs/usr/lib
   6.134 + # cp -a _pkg/usr/lib/pango $fs/usr/lib
   6.135 + # rm -rf $fs/usr/lib/pango/1.5.0/modules/*.la
   6.136 + # cp -a _pkg/etc $fs
   6.137 +</pre>
   6.138 +<p>
   6.139 +Create /etc/pango.modules via chroot in the rootfs (pango-querymodules uses librt.so.1):
   6.140 +</p>
   6.141 +<pre> # chroot $fs /bin/ash
   6.142 + /# pango-querymodules &gt; /etc/pango/pango.modules
   6.143 + # exit
   6.144 +</pre>
   6.145 +<a name="atk"></a>
   6.146 +<h3><font color="#6c0023">atk-1.12.4 - Accessibility toolkit</font></h3>
   6.147 +<pre> # cd ..
   6.148 + # wget http://ftp.gnome.org/pub/gnome/sources/atk/1.12/atk-1.12.4.tar.bz2
   6.149 + # tar xjf atk-1.12.4.tar.bz2
   6.150 + # cd atk-1.12.4
   6.151 + # ./configure --prefix=/usr --mandir=/usr/share/man \
   6.152 +   --with-html-dir=/usr/share/doc
   6.153 + # make
   6.154 + # make DESTDIR=$PWD/_pkg install
   6.155 + # strip -v _pkg/usr/lib/*.so*
   6.156 +</pre>
   6.157 +<h4>Install in rootfs</h4>
   6.158 +<pre> # cp -a _pkg/usr/lib/*.so* $fs/usr/lib
   6.159 + # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
   6.160 +</pre>
   6.161 +<a name="gtk"></a>
   6.162 +<h3><font color="#6c0023">gtk+-2.8.20 -  The GIMP Toolkit</font></h3>
   6.163 +<pre> # cd ..
   6.164 + # wget ftp://ftp.gtk.org/pub/gtk/v2.8/gtk+-2.8.20.tar.bz2
   6.165 + # tar xjf gtk+-2.8.20.tar.bz2
   6.166 + # cd gtk+-2.8.20
   6.167 + # ./configure --prefix=/usr --sysconfdir=/etc \
   6.168 +   --mandir=/usr/share/man --with-html-dir=/usr/share/doc
   6.169 + # make
   6.170 + # make DESTDIR=$PWD/_pkg install
   6.171 + # strip -v _pkg/usr/bin/*
   6.172 + # strip -v _pkg/usr/lib/*.so*
   6.173 + # strip -v --strip-unneeded \
   6.174 +   _pkg/usr/lib/gtk-2.0/2.4.0/*/*
   6.175 +</pre>
   6.176 +<h4>Install in rootfs</h4>
   6.177 +<pre> # cp -a _pkg/usr/lib/*.so* $fs/usr/lib
   6.178 + # mkdir $fs/usr/lib/gtk-2.0
   6.179 + # cp -a _pkg/usr/lib/gtk-2.0/2.4.0 $fs/usr/lib/gtk-2.0
   6.180 + # rm -rf $fs/usr/lib/gtk-2.0/2.4.0/*/*.la
   6.181 + 
   6.182 + Locale and themes:
   6.183 + # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
   6.184 + # cp -a _pkg/usr/share/themes $fs/usr/share
   6.185 + 
   6.186 + The applications:
   6.187 + # cp  _pkg/usr/bin/gtk-query-immodules-2.0 $fs/usr/bin
   6.188 + # cp  _pkg/usr/bin/gtk-update-icon-cache $fs/usr/bin
   6.189 + # cp  _pkg/usr/bin/gdk-pixbuf-csource $fs/usr/bin
   6.190 + # cp  _pkg/usr/bin/gdk-pixbuf-query-loaders $fs/usr/bin
   6.191 + ...
   6.192 + 
   6.193 + For the gtk-demo application:
   6.194 + # cp -a _pkg/usr/bin/gtk-demo $fs/usr/bin
   6.195 + # cp -a _pkg/usr/share/gtk-2.0 $fs/usr/share
   6.196 +</pre>
   6.197 +<p>
   6.198 +Create files /etc/gtk-2.0/gtk.immodules and gdk-pixbuf.loaders via a chroot in the rootfs:
   6.199 +</p>
   6.200 +<pre> # chroot $fs /bin/ash
   6.201 + /# mkdir /etc/gtk-2.0
   6.202 + /# gtk-query-immodules-2.0 &gt; /etc/gtk-2.0/gtk.immodules
   6.203 + /# gdk-pixbuf-query-loaders &gt; /etc/gtk-2.0/gdk-pixbuf.loaders
   6.204 + # exit
   6.205 +</pre>
   6.206 +<p>
   6.207 +At this stage you can test GTK+ with the 'gtk-demo' application by creating an ISO and using qemu. 
   6.208 +You can also compile a small GTK application such as LeafPad and test! The compiliation and installation 
   6.209 +of GTK+ applications distributed by default with SliTaz are described in the next chapter
   6.210 +<a href="http://www.slitaz.org/doc/scratchbook/gtk-apps.html">GTK apps</a>.
   6.211 +</p>
   6.212 +<a name="initramfs-iso"></a>
   6.213 +<h3><font color="#6c0023">Generate the initramfs and an ISO image</font></h3>
   6.214 +<p>
   6.215 +To create a new ISO image, you can use 'mktaziso' in 
   6.216 +<a href="http://www.slitaz.org/en/doc/cookbook/slitaz-tools.html">SliTaz tools</a> .  
   6.217 +Or you can create a new initramfs image, copy it to /boot in the root of the cdrom
   6.218 +(rootcd) and finally generate an ISO image with genisoimage:
   6.219 +</p>
   6.220 +<pre> # cd $fs
   6.221 + # find . -print | cpio -o -H newc | gzip -9 &gt; ../rootfs.gz
   6.222 + # cd ..
   6.223 + # cp rootfs.gz rootcd/boot
   6.224 + # genisoimage -R -o slitaz-cooking.iso -b boot/isolinux/isolinux.bin \
   6.225 +   -c boot/isolinux/boot.cat -no-emul-boot -boot-load-size 4 \
   6.226 +   -V "SliTaz" -boot-info-table rootcd 
   6.227 +</pre>
   6.228 +<h4>Following chapter</h4>
   6.229 +<p>
   6.230 +After the libraries, the
   6.231 +<a href="gtk-apps.html">GTK+ applications</a>.
   6.232 +</p>
   6.233 +
   6.234 +
   6.235 +<!-- End of content -->
   6.236 +</div>
   6.237 +
   6.238 +<!-- Footer. -->
   6.239 +<div id="footer">
   6.240 +	<div class="footer-right"></div>
   6.241 +	<a href="#top">Top of the page</a> | 
   6.242 +	<a href="index.html">Table of contents</a>
   6.243 +</div>
   6.244 +
   6.245 +<div id="copy">
   6.246 +    Copyright &copy; 2008 <a href="http://www.slitaz.org/en/">SliTaz</a> -
   6.247 +    <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>;<br />
   6.248 +    Documentation is under
   6.249 +    <a href="http://www.gnu.org/copyleft/fdl.html">GNU Free Documentation License</a>
   6.250 +    and code is <a href="http://validator.w3.org/">valid xHTML 1.0</a>.
   6.251 +</div>
   6.252 +
   6.253 +</body>
   6.254 +</html>
     7.1 --- a/en/doc/scratchbook/index.html	Fri Dec 19 12:31:56 2008 +0100
     7.2 +++ b/en/doc/scratchbook/index.html	Tue Dec 23 14:10:23 2008 +0000
     7.3 @@ -39,6 +39,14 @@
     7.4  	<li><a href="#intro">Introduction.</a></li>
     7.5  	<li><a href="#org">Organize a working directory.</a></li>
     7.6  	<li><a href="base-system.html">Construction of the base SliTaz system.</a></li>
     7.7 +	<li><a href="base-apps.html">Base applications.</a></li>
     7.8 +	<li><a href="base-ncurses.html">Ncurses libraries and applications.</a></li>
     7.9 +	<li><a href="locale.html">Install and configure Locale &amp; i18n.</a></li>
    7.10 +	<li><a href="boot-scripts.html">Boot scripts.</a></li>
    7.11 +	<li><a href="x-window-system.html">X window system.</a></li>
    7.12 +	<li><a href="gtk-libs.html">GTK+ packages and libraries.</a></li>
    7.13 +	<li><a href="gtk-apps.html">GTK+ applications.</a></li>
    7.14 +	<li><a href="xorg.html">Xorg.</a></li>
    7.15  </ul>
    7.16  
    7.17  <a name="intro"></a>
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/en/doc/scratchbook/locale.html	Tue Dec 23 14:10:23 2008 +0000
     8.3 @@ -0,0 +1,162 @@
     8.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     8.5 +    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     8.6 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
     8.7 +<head>
     8.8 +    <title>SliTaz Scratchbook - Locale &amp; i18n</title>
     8.9 +    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
    8.10 +    <meta name="description" content="" />
    8.11 +    <meta name="expires" content="never" />
    8.12 +    <meta name="modified" content="2008-11-22 17:00:00" />
    8.13 +    <meta name="publisher" content="www.slitaz.org" />
    8.14 +    <meta name="author" content="Christophe Lincoln"/>
    8.15 +    <link rel="shortcut icon" href="favicon.ico" />
    8.16 +    <link rel="stylesheet" type="text/css" href="book.css" />
    8.17 +</head>
    8.18 +<body bgcolor="#ffffff">
    8.19 +
    8.20 +<!-- Header and quick navigation -->
    8.21 +<div id="header">
    8.22 +<div align="right" id="quicknav">
    8.23 +    <a name="top"></a>
    8.24 +    <a href="base-ncurses.html">Base ncurses</a> |
    8.25 +    <a href="index.html">Table of contents</a> |
    8.26 +    <a href="boot-scripts.html">Boot scripts</a>
    8.27 +</div>
    8.28 +<h1><font color="#3E1220">SliTaz Scratchbook</font></h1>
    8.29 +</div>
    8.30 +
    8.31 +<!-- Content. -->
    8.32 +<div id="content">
    8.33 +<div class="content-right"></div>
    8.34 +
    8.35 +
    8.36 +<h2><font color="#df8f06">Locale &amp; i18n</font></h2>
    8.37 +<p>
    8.38 +Installation and configuration of locales.
    8.39 +</p>
    8.40 +<ul>
    8.41 +	<li><a href="#install">Locale installation.</a></li>
    8.42 +	<li><a href="#config">Config and use of locale on SliTaz.</a></li>
    8.43 +</ul>
    8.44 +<a name="install"></a>
    8.45 +<h3><font color="#6c0023">Locale installation</font></h3>
    8.46 +<p>
    8.47 +This chapter describes the installation of locales in SliTaz GNU/Linux from a SliTaz GNU/Linux host system. 
    8.48 +The installation of locales contained in the X server are described in the chapter 
    8.49 +<a href="x-window-system.html">X window system</a>. The various files copied in this chapter come from the 
    8.50 +compiliation package glibc-2.3.6 forming part of the <em>toolchain</em>.
    8.51 +</p>
    8.52 +<h4>Various file directories</h4>
    8.53 +<p>
    8.54 +We begin by creating the directories that contain libraries and files relevant to the different locales. 
    8.55 +The directory LC_MESSAGES contains the files for the translated messages (.mo), if they exist:
    8.56 +</p>
    8.57 +<pre> # mkdir -p rootfs/usr/share/{i18n,locale}
    8.58 + # mkdir -p rootfs/usr/lib/{locale,gconv}
    8.59 + # mkdir -p rootfs/usr/share/i18n/{charmaps,locales}
    8.60 + # mkdir -p rootfs/usr/share/locale/fr/LC_MESSAGES
    8.61 +</pre>
    8.62 +<p>
    8.63 +Copy the localization files for French, Swiss-French and Swiss-German in /usr/share/i18n/locales:
    8.64 +</p>
    8.65 +<pre> # cp -a /usr/share/i18n/locales/{de_CH,fr_CH,fr_FR,i18n,iso14651_t1} \
    8.66 +   rootfs/usr/share/i18n/locales
    8.67 +</pre>
    8.68 +<p>   
    8.69 +Copy the translit_* files in /usr/share/i18n/locales:
    8.70 +</p>
    8.71 +<pre> # cp -a /usr/share/i18n/locales/{translit_circle,translit_cjk_compat} \
    8.72 +   rootfs/usr/share/i18n/locales
    8.73 + # cp -a /usr/share/i18n/locales/{translit_combining,translit_compat} \
    8.74 +   rootfs/usr/share/i18n/locales   
    8.75 + # cp -a /usr/share/i18n/locales/{translit_font,translit_fraction} \
    8.76 +   rootfs/usr/share/i18n/locales
    8.77 + # cp -a /usr/share/i18n/locales/{translit_narrow,translit_neutral} \
    8.78 +   rootfs/usr/share/i18n/locales
    8.79 + # cp -a /usr/share/i18n/locales/{translit_small,translit_wide} \
    8.80 +   rootfs/usr/share/i18n/locales
    8.81 +</pre>
    8.82 +<p>
    8.83 +Copy the charmaps files in /usr/share/i18n/charmaps:
    8.84 +</p>
    8.85 +<pre> # cp -a /usr/share/i18n/charmaps/ANSI_X3.* rootfs/usr/share/i18n/charmaps
    8.86 + # cp -a /usr/share/i18n/charmaps/{ISO-8859-1.gz,ISO-8859-2.gz,ISO-8859-15.gz} \
    8.87 +   rootfs/usr/share/i18n/charmaps
    8.88 +</pre>
    8.89 +<p>
    8.90 +Copy the gconv libraries in /usr/lib/gconv to rootfs of SliTaz:
    8.91 +</p>
    8.92 +<pre> # cp /usr/lib/gconv/{ANSI_X3.110.so,gconv-modules,UNICODE.so} \
    8.93 +   rootfs/usr/lib/gconv
    8.94 + # cp /usr/lib/gconv/{ISO8859-1.so,ISO8859-2.so,ISO8859-15.so} \
    8.95 +   rootfs/usr/lib/gconv
    8.96 + # strip -v rootfs/usr/lib/gconv/*.so
    8.97 +</pre>
    8.98 +<p>
    8.99 +Copy the locale utility:
   8.100 +</p>
   8.101 +<pre> # cp /usr/bin/locale rootfs/usr/bin
   8.102 +</pre>
   8.103 +<p>
   8.104 +It's necessary that the file /usr/lib/locale/locale-archive is generated, 
   8.105 +for that we use the localedef utility while chrooted in SliTaz:
   8.106 +</p>
   8.107 +<pre> # cp /usr/bin/localedef rootfs/usr/bin
   8.108 + # chroot rootfs /bin/ash
   8.109 +</pre>
   8.110 +<p>
   8.111 +Use of <code>localedef</code> for French-speaking Switzerland and France:
   8.112 +</p>
   8.113 +<pre> /# localedef -i fr_CH -f ISO-8859-1 fr_CH
   8.114 + /# localedef -i fr_FR -f ISO-8859-1 fr_FR
   8.115 + /# exit
   8.116 +</pre>
   8.117 +<p>
   8.118 +You can delete the <code>localedef</code> binary to gain some space:
   8.119 +</p>
   8.120 +<pre> # rm rootfs/usr/bin/localedef
   8.121 +</pre>
   8.122 +<a name="config"></a>
   8.123 +<h3><font color="#6c0023">Config and use of locale</font></h3>
   8.124 +<p>
   8.125 +To use a language in a session, you can create a script launched at boot, or 
   8.126 +add 2 lines to the ~/.profile specific to each user with:
   8.127 +</p>
   8.128 +<pre class="script">
   8.129 +export LANG=fr_CH
   8.130 +export LC_ALL=fr_CH
   8.131 +
   8.132 +</pre>
   8.133 +<p>
   8.134 +Voil&agrave;, the French language should now function If you installed retawq or nano, you can check the 
   8.135 +performance of locales by copying the .mo files in the sources of Retawq or Nano to /usr/share/locale/fr/LC_MESSAGES.
   8.136 +</p>
   8.137 +<h4>Following chapter</h4>
   8.138 +<p>
   8.139 +SliTaz uses the /etc/init.d/i18n.sh script and the /etc/locale.conf configuration file to 
   8.140 +manage the system locale. This is detailed in the next chapter <a href="boot-scripts.html">Boot scripts</a>. 
   8.141 +On a working system, just modify /etc/locale.conf with a text editor or launch 'tazlocale' 
   8.142 +to change the default system locale Or to specify the language as a boot option: <code>lang=xx</code>.
   8.143 +</p>
   8.144 +
   8.145 +
   8.146 +<!-- End of content -->
   8.147 +</div>
   8.148 +
   8.149 +<!-- Footer. -->
   8.150 +<div id="footer">
   8.151 +	<div class="footer-right"></div>
   8.152 +	<a href="#top">Top of the page</a> | 
   8.153 +	<a href="index.html">Table of contents</a>
   8.154 +</div>
   8.155 +
   8.156 +<div id="copy">
   8.157 +    Copyright &copy; 2008 <a href="http://www.slitaz.org/en/">SliTaz</a> -
   8.158 +    <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>;<br />
   8.159 +    Documentation is under
   8.160 +    <a href="http://www.gnu.org/copyleft/fdl.html">GNU Free Documentation License</a>
   8.161 +    and code is <a href="http://validator.w3.org/">valid xHTML 1.0</a>.
   8.162 +</div>
   8.163 +
   8.164 +</body>
   8.165 +</html>
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/en/doc/scratchbook/x-window-system.html	Tue Dec 23 14:10:23 2008 +0000
     9.3 @@ -0,0 +1,470 @@
     9.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     9.5 +    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     9.6 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
     9.7 +<head>
     9.8 +    <title>SliTaz Scratchbook - X Window System</title>
     9.9 +    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
    9.10 +    <meta name="description" content="" />
    9.11 +    <meta name="expires" content="never" />
    9.12 +    <meta name="modified" content="2008-11-22 17:00:00" />
    9.13 +    <meta name="publisher" content="www.slitaz.org" />
    9.14 +    <meta name="author" content="Christophe Lincoln"/>
    9.15 +    <link rel="shortcut icon" href="favicon.ico" />
    9.16 +    <link rel="stylesheet" type="text/css" href="book.css" />
    9.17 +</head>
    9.18 +<body bgcolor="#ffffff">
    9.19 +
    9.20 +<!-- Header and quick navigation -->
    9.21 +<div id="header">
    9.22 +<div id="quicknav" align="right">
    9.23 +	<a name="top"></a>
    9.24 +	<a href="boot-scripts.html">Boot scripts</a> |
    9.25 +	<a href="index.html">Table of contents</a> |
    9.26 +	<a href="gtk-libs.html">GTK+ libs</a>
    9.27 +</div>
    9.28 +<h1><font color="#3e1220">SliTaz Scratchbook</font></h1>
    9.29 +</div>
    9.30 +
    9.31 +<!-- Content. -->
    9.32 +<div id="content">
    9.33 +<div class="content-right"></div>
    9.34 +
    9.35 +
    9.36 +<h2><font color="#df8f06">X window system</font></h2>
    9.37 +<p>
    9.38 +Installation and basic configuration of the X window system.
    9.39 +</p>
    9.40 +<ul>
    9.41 +    <li><a href="#about">About this chapter</a> - Description and environmental
    9.42 +    variable ($fs)</li>
    9.43 +    <li><a href="#expat">expat-2.0.0</a> - XML parser library.</li>
    9.44 +    <li><a href="#freetype">freetype-2.3.1</a> - System font libraries.</li>
    9.45 +    <li><a href="#fontconfig">fontconfig 2.4.2</a> - Font management tools.</li>
    9.46 +    <li><a href="#xserver">Xserver</a> - Graphical server Xvesa of Xfree86
    9.47 +    4.6.0 and Xorg libraries.</li>
    9.48 +    <li><a href="#xterm">xterm-223</a> - Terminal emulator.</li>
    9.49 +    <li><a href="#libpng">libpng-1.2.18</a> - Libraries that manipulate PNG images.</li>
    9.50 +    <li><a href="#jwm">jwm-2.0</a> - Window manager.</li>
    9.51 +    <li><a href="#jpeg">jpeg-6b</a> - Libraries that manipulate JPEG images.</li>
    9.52 +    <li><a href="#tiff">tiff-3.8.2</a> - TIFF libraries and utilities.</li>
    9.53 +    <li><a href="#links">links-2.1pre29</a> - Graphical and text web browser.</li>
    9.54 +    <li><a href="#initramfs-iso">Generate the initramfs and an ISO image.</a></li>
    9.55 +</ul>
    9.56 +<a name="about"></a>
    9.57 +<h3><font color="#6c0023">About</font></h3>
    9.58 +<p>
    9.59 +This chapter describes the installation and configuration of the X window system on SliTaz. We will 
    9.60 +install libraries for expat, XML, fonts, a graphical server (Xvesa), a terminal emulator (xterm), 
    9.61 +various small tools and a window manager (JWM). We'll also install the JPEG libraries and Links web browser.
    9.62 +</p>
    9.63 +<h4>Environmental variable ($fs)</h4>
    9.64 +<p>
    9.65 +If you do not specify any path to the rootfs directory, export the environmental variable:
    9.66 +</p>
    9.67 +<pre> # export fs=$PWD/rootfs
    9.68 +</pre>
    9.69 +<p>
    9.70 +To check:
    9.71 +</p>
    9.72 +<pre> # echo $fs
    9.73 +</pre>
    9.74 +<a name="expat"></a>
    9.75 +<h3><font color="#6c0023">expat-2.0.0 - XML parser library</font></h3>
    9.76 +<p>
    9.77 +Expat (<a href="http://expat.sourceforge.net/">http://expat.sourceforge.net/</a>)
    9.78 +contains the XML parsing libraries:
    9.79 +</p>
    9.80 +<pre> # cd ..
    9.81 + # wget http://switch.dl.sourceforge.net/sourceforge/expat/expat-2.0.0.tar.gz
    9.82 + # tar xzf expat-2.0.0.tar.gz
    9.83 + # cd expat-2.0.0
    9.84 + # ./configure --sysconfdir=/etc --prefix=/usr \
    9.85 +   --mandir=/usr/share/man
    9.86 + # make
    9.87 + # make DESTDIR=$PWD/_pkg install
    9.88 + # strip -v _pkg/usr/lib/*
    9.89 + # strip -v _pkg/usr/bin/*
    9.90 +</pre>
    9.91 +<p>
    9.92 +Thereafter, we will install 'xterm' which needs libexpat.so.0, simply create a symbolic link and voil&agrave;. 
    9.93 +Then you can install the 'xmlwf' application and libraries in the rootfs:
    9.94 +</p>
    9.95 +<pre> # cd _pkg/usr/lib
    9.96 + # ln -s libexpat.so.1.5.0 libexpat.so.0
    9.97 + # cp -a *.so* $fs/usr/lib
    9.98 + # cd ..
    9.99 + # cp -a bin/* $fs/usr/bin
   9.100 + # cd ../..
   9.101 +</pre>
   9.102 +<h4>libs</h4>
   9.103 +Libraries used by xmlwf:
   9.104 +<pre class="script">        libexpat.so.1 =&gt; /usr/lib/libexpat.so.1 (0x40021000)
   9.105 +        libc.so.6 =&gt; /lib/tls/libc.so.6 (0x40041000)
   9.106 +        /lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0x40000000)
   9.107 +</pre>
   9.108 +<a name="freetype"></a>
   9.109 +<h3><font color="#6c0023">freetype-2.3.1 - System font libraries</font></h3>
   9.110 +<p>
   9.111 +The package freetype (<a href="http://www.freetype.org/">http://www.freetype.org/</a>) 
   9.112 +contains libraries used by X for configuring the system fonts:
   9.113 +</p>
   9.114 +<pre> # cd ..
   9.115 + # wget http://download.savannah.gnu.org/releases/freetype/freetype-2.3.1.tar.bz2
   9.116 + # tar xjf freetype-2.3.1.tar.bz2
   9.117 + # cd freetype-2.3.1
   9.118 + # ./configure --sysconfdir=/etc --prefix=/usr \
   9.119 +   --mandir=/usr/share/man
   9.120 + # make
   9.121 + # make DESTDIR=$PWD/_pkg install
   9.122 + # strip -vs _pkg/usr/lib/*
   9.123 + # cp -a _pkg/usr/bin/* $fs/usr/bin
   9.124 + # cp -a _pkg/usr/lib/*.so* $fs/usr/lib
   9.125 +</pre>
   9.126 +<a name="fontconfig"></a>
   9.127 +<h3><font color="#6c0023">fontconfig-2.4.2 - Manage system fonts</font></h3>
   9.128 +<p>
   9.129 +The fontconfig package (<a href="http://www.fontconfig.org/wiki/">www.fontconfig.org/wiki/</a>) 
   9.130 +provides the libfontconfig library used by many programs under X. Note XFree86 also provides these 
   9.131 +utilities. We chose the original package because it works better with JWM:
   9.132 +</p>
   9.133 +<pre> # cd ..
   9.134 + # wget http://fontconfig.org/release/fontconfig-2.4.2.tar.gz
   9.135 + # tar xzf fontconfig-2.4.2.tar.gz
   9.136 + # cd fontconfig-2.4.2
   9.137 + # ./configure --sysconfdir=/etc --prefix=/usr \
   9.138 +   --mandir=/usr/share/man --localstatedir=/var
   9.139 + # make
   9.140 + # make DESTDIR=$PWD/_pkg install
   9.141 + # strip -v _pkg/usr/bin/*
   9.142 + # strip -v _pkg/usr/lib/*
   9.143 + # cp -a _pkg/usr/bin/* $fs/usr/bin
   9.144 + # cp -a _pkg/usr/lib/*.so* $fs/usr/lib
   9.145 + # cp -a _pkg/etc $fs
   9.146 + # cp -a _pkg/var $fs
   9.147 +</pre>
   9.148 +<h4>libs</h4>
   9.149 +<p>
   9.150 +A 'ldd' on fc-cache gives the libraries below. You can also use libfreetype of XFree86:
   9.151 +</p>
   9.152 +<pre class="script">        libfreetype.so.6 =&gt; /usr/lib/libfreetype.so.6 (0xb7f12000)
   9.153 +        libz.so.1 =&gt; /usr/lib/libz.so.1 (0xb7eff000)
   9.154 +        libexpat.so.1 =&gt; /usr/lib/libexpat.so.1 (0xb7edf000)
   9.155 +        libfontconfig.so.1 =&gt; /usr/lib/libfontconfig.so.1 (0xb7eb0000)
   9.156 +        libc.so.6 =&gt; /lib/tls/libc.so.6 (0xb7d7b000)
   9.157 +        /lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0xb7f8c000)
   9.158 +</pre>
   9.159 +<a name="xserver"></a>
   9.160 +<h3><font color="#6c0023">Xserver - Graphical Xvesa server of Xfree86</font></h3>
   9.161 +<p>
   9.162 +We will use the binary versions of Xvesa server (<a href="http://www.xfree86.org/">www.xfree86.org/</a>) 
   9.163 +and fonts distributed by Xfree86.org. We could also copy Xorg libraries from the host system that would 
   9.164 +be used for compiling X applications. Xvesa works well like this and simplifies things. You can also rebuild
   9.165 +<a href="xorg.html">Xorg packages</a> on your development system.
   9.166 +</p>
   9.167 +<h4>Xtinyx server - Xvesa</h4>
   9.168 +<p>
   9.169 +The Xvesa server is very light and uses tiny libraries; it is contained in the Xtinyx.tgz archive. 
   9.170 +Download and install in /usr/bin of SliTaz rootfs:
   9.171 +</p>
   9.172 +<pre> # cd ..
   9.173 + # mkdir -p XFree86-4.6.0 &amp;&amp; cd XFree86-4.6.0
   9.174 + # wget http://ftp.xfree86.org/pub/XFree86/4.6.0/binaries/Linux-ix86-glibc23/Xtinyx.tgz
   9.175 + # tar xzf Xtinyx.tgz
   9.176 + # cp bin/Xvesa $fs/usr/bin
   9.177 + # strip $fs/usr/bin/Xvesa
   9.178 + # chmod 4711 $fs/usr/bin/Xvesa
   9.179 +</pre>
   9.180 +<h4>libs for Xvesa</h4>
   9.181 +<pre class="script">        libz.so.1 =&gt; /usr/lib/libz.so.1 (0xb7ed6000)
   9.182 +        libm.so.6 =&gt; /lib/tls/libm.so.6 (0xb7eb1000)
   9.183 +        libc.so.6 =&gt; /lib/tls/libc.so.6 (0xb7d7e000)
   9.184 +        /lib/ld-linux.so.2 (0xb7ef8000)
   9.185 +</pre>
   9.186 +<h4>rgb.txt - RGB colors in X</h4>
   9.187 +<p>
   9.188 +The colors configuration file used by the X server is called: <code>rgb.txt</code>; we suggest 
   9.189 +that you copy it to the host system. The library libX11.so will seek the configuration files in 
   9.190 +/usr/share/X11, and the Xvesa server in /usr/X11R6/lib/X11; we create a link in /usr/share/X11 to enable this:
   9.191 +</p>
   9.192 +<pre> # mkdir -p $fs/usr/share/X11
   9.193 + # cp /usr/share/X11/rgb.txt $fs/usr/share/X11
   9.194 + # chroot $fs /bin/ash
   9.195 + /# mkdir -p /usr/X11R6/lib/X11/
   9.196 + /# ln -s /usr/share/X11/rgb.txt /usr/X11R6/lib/X11/rgb.txt
   9.197 + /# exit
   9.198 +</pre>
   9.199 +<h4>Xfnts - Fonts</h4>
   9.200 +<p>
   9.201 +To operate the server, we need the basic fonts; you can download them from Xfree86.org and then compile 
   9.202 +packages from Xorg, or copy them from your host system. The system fonts can be put into different folders 
   9.203 +and the cache updated with <code>lc-cache</code>. Attention, fonts take pride of place and you can only install 
   9.204 +the minimum. /usr/share/fonts contains the TrueType fonts such as bitstream-vera:
   9.205 +</p>
   9.206 +<pre> # wget http://ftp.xfree86.org/pub/XFree86/4.6.0/binaries/Linux-ix86-glibc23/Xfnts.tgz
   9.207 + # tar xzf Xfnts.tgz
   9.208 + # mkdir -p $fs/usr/X11R6/lib/X11/fonts
   9.209 + # mkdir -p $fs/usr/share/fonts/truetype
   9.210 +
   9.211 + Copy the fonts...
   9.212 + (# cp -a lib/X11/fonts/* $fs/usr/X11R6/lib/X11/fonts)
   9.213 + (# cp -a /usr/share/fonts/truetype/* $fs/usr/share/fonts/truetype
   9.214 +</pre>
   9.215 +<p>
   9.216 +Then regenerate the fonts.dir file, you must run mkfontdir on the directory in question:
   9.217 +</p>
   9.218 +<pre> # mkfontdir $fs/usr/X11R6/lib/X11/fonts/75dpi
   9.219 +</pre>
   9.220 +<p>
   9.221 +Fontconfig configuration files can be found in /etc/fonts provided by the fontconfig package. 
   9.222 +Now you can run 'fc-cache' to update the cache, and 'fc-list' for a list of fonts. You do this 
   9.223 +by chrooting into the rootfs:
   9.224 +</p>
   9.225 +<pre> # chroot $fs /bin/ash
   9.226 + # fc-cache -v
   9.227 + # fc-list
   9.228 + # exit
   9.229 +</pre>
   9.230 +<h4>Xlib locale - Localization files</h4>
   9.231 +<p>
   9.232 +On SliTaz, we installed 4 locales: C, iso8859-1, iso8859-15 and iso 8859-2 from the 
   9.233 +<a href="xorg.html">compilation of Xorg</a>. 
   9.234 +You can copy the files from the host system or use the files distributed by XFree86. 
   9.235 +Sample copy of all the locales from the host system:
   9.236 +</p>
   9.237 +<pre> # mkdir -p $fs/usr/share/X11/locale
   9.238 + # cp -a /usr/share/X11/locale/* $fs/usr/share/X11/locale
   9.239 +</pre>
   9.240 +<h4>Using X</h4>
   9.241 +<p>
   9.242 +Note that can already use Xvesa as a X terminal if you have a machine on the network accepting XDMCP connections. 
   9.243 +For this, you can start the server with <code>-query</code>, for example:
   9.244 +</p>
   9.245 +<pre> # Xvesa -ac -shadow -screen 1024x768x24 -query 192.168.0.2
   9.246 +</pre>
   9.247 +<a name="xterm"></a>
   9.248 +<h3><font color="#6c0023">xterm - Terminal Emulator</font></h3>
   9.249 +<p>
   9.250 +The xterm package (<a href="http://invisible-island.net/xterm/">invisible-island.net/xterm/</a>) 
   9.251 +provides a terminal emulator for X:
   9.252 +</p>
   9.253 +<pre> # wget ftp://invisible-island.net/xterm/xterm-223.tgz
   9.254 + # tar xzf xterm-223.tgz
   9.255 + # cd xterm-223
   9.256 + # ./configure --prefix=/usr --sysconfdir=/etc \
   9.257 +   --mandir=/usr/share/man --localstatedir=/var \
   9.258 +   --with-app-defaults=/usr/share/X11/app-defaults \
   9.259 +   --build=i486-pc-linux-gnu --host=i486-pc-linux-gnu
   9.260 + # make
   9.261 + # make DESTDIR=$PWD/_pkg install
   9.262 + # strip _pkg/usr/bin/*
   9.263 + # cp _pkg/usr/bin/* $fs/usr/bin
   9.264 + # cp -a _pkg/usr/share/X11/* $fs/usr/share/X11
   9.265 +</pre>
   9.266 +<h4>libs</h4>
   9.267 +<p>
   9.268 +A ldd on XTerm, we copy (and strip) the missing libraries from the host system:
   9.269 +</p>
   9.270 +<pre class="script">    libXft.so.2 =&gt; /usr/lib/libXft.so.2 (0xb7f09000)
   9.271 +    libXrender.so.1 =&gt; /usr/lib/libXrender.so.1 (0xb7f00000)
   9.272 +    libfontconfig.so.1 =&gt; /usr/lib/libfontconfig.so.1 (0xb7ed5000)
   9.273 +    libfreetype.so.6 =&gt; /usr/lib/libfreetype.so.6 (0xb7e68000)
   9.274 +    libz.so.1 =&gt; /usr/lib/libz.so.1 (0xb7e54000)
   9.275 +    libX11.so.6 =&gt; /usr/lib/libX11.so.6 (0xb7d68000)
   9.276 +    libXaw.so.7 =&gt; /usr/lib/libXaw.so.7 (0xb7d0f000)
   9.277 +    libXmu.so.6 =&gt; /usr/lib/libXmu.so.6 (0xb7cfa000)
   9.278 +    libXext.so.6 =&gt; /usr/lib/libXext.so.6 (0xb7cec000)
   9.279 +    libXt.so.6 =&gt; /usr/lib/libXt.so.6 (0xb7c9e000)
   9.280 +    libSM.so.6 =&gt; /usr/lib/libSM.so.6 (0xb7c96000)
   9.281 +    libICE.so.6 =&gt; /usr/lib/libICE.so.6 (0xb7c7f000)
   9.282 +    libncurses.so.5 =&gt; /lib/libncurses.so.5 (0xb7c3c000)
   9.283 +    libc.so.6 =&gt; /lib/libc.so.6 (0xb7b2c000)
   9.284 +    libexpat.so.1 =&gt; /usr/lib/libexpat.so.1 (0xb7b0b000)
   9.285 +    libXau.so.6 =&gt; /usr/lib/libXau.so.6 (0xb7b08000)
   9.286 +    libXdmcp.so.6 =&gt; /usr/lib/libXdmcp.so.6 (0xb7b03000)
   9.287 +    libdl.so.2 =&gt; /lib/libdl.so.2 (0xb7aff000)
   9.288 +    libXpm.so.4 =&gt; /usr/lib/libXpm.so.4 (0xb7aee000)
   9.289 +</pre>
   9.290 +<a name="libpng"></a>
   9.291 +<h3><font color="#6c0023">libpng-1.2.18 - PNG Libraries</font></h3>
   9.292 +<p>
   9.293 +PNG libraries (<a href="http://libpng.org/pub/png/libpng.html">http://libpng.org/pub/png/libpng.html</a>) 
   9.294 +are used to manipulate and format PNG images:
   9.295 +</p>
   9.296 +<pre> # wget http://puzzle.dl.sourceforge.net/sourceforge/libpng/libpng-1.2.18.tar.bz2
   9.297 + # tar xjf libpng-1.2.18.tar.bz2
   9.298 + # cd libpng-1.2.18
   9.299 + # ./configure --enable-shared --prefix=/usr \
   9.300 +   --mandir=/usr/share/man
   9.301 + # make
   9.302 + # make DESTDIR=$PWD/_pkg install
   9.303 + # strip _pkg/usr/lib/*.so*
   9.304 + # cp -a _pkg/usr/lib/libpng12.so* $fs/usr/lib
   9.305 + # cp -a _pkg/usr/bin/libpng12* $fs/usr/bin
   9.306 +</pre>
   9.307 +<a name="jwm"></a>
   9.308 +<h3><font color="#6c0023">jwm-2.0 - Window manager</font></h3>
   9.309 +<p>
   9.310 +Joe's Window Manager (<a href="http://www.joewing.net/programs/jwm/">http://www.joewing.net/programs/jwm/</a>) 
   9.311 +is an ultra light and friendly window manager. This is the default SliTaz window manager. The main configuration 
   9.312 +file: /etc/jwm/system.jwnrc includes the style and config menu:
   9.313 +</p>
   9.314 +<pre> # cd ..
   9.315 + # wget http://www.joewing.net/programs/jwm/releases/jwm-2.0.tar.bz2
   9.316 + # tar xjf jwm-2.0.tar.bz2
   9.317 + # cd jwm-2.0
   9.318 + # ./configure --prefix=/usr --mandir=/usr/share/man \
   9.319 +   --sysconfdir=/etc/jwm --disable-xinerama
   9.320 + # make
   9.321 + # strip src/jwm
   9.322 + # cp src/jwm $fs/usr/bin
   9.323 + # mkdir $fs/etc/jwm
   9.324 + # cp example.jwmrc $fs/etc/jwm/system.jwmrc
   9.325 +</pre>
   9.326 +<h4>libs</h4>
   9.327 +<p>
   9.328 +Ldd libraries that we have provided:
   9.329 +</p>
   9.330 +<pre class="script">    libX11.so.6 =&gt; /usr/lib/libX11.so.6 (0xb7e35000)
   9.331 +    libpng12.so.0 =&gt; /usr/lib/libpng12.so.0 (0xb7e12000)
   9.332 +    libXft.so.2 =&gt; /usr/lib/libXft.so.2 (0xb7e00000)
   9.333 +    libXrender.so.1 =&gt; /usr/lib/libXrender.so.1 (0xb7df7000)
   9.334 +    libfontconfig.so.1 =&gt; /usr/lib/libfontconfig.so.1 (0xb7dcc000)
   9.335 +    libfreetype.so.6 =&gt; /usr/lib/libfreetype.so.6 (0xb7d5f000)
   9.336 +    libz.so.1 =&gt; /usr/lib/libz.so.1 (0xb7d4a000)
   9.337 +    libXpm.so.4 =&gt; /usr/lib/libXpm.so.4 (0xb7d3a000)
   9.338 +    libXext.so.6 =&gt; /usr/lib/libXext.so.6 (0xb7d2c000)
   9.339 +    libc.so.6 =&gt; /lib/libc.so.6 (0xb7c1c000)
   9.340 +    libXau.so.6 =&gt; /usr/lib/libXau.so.6 (0xb7c19000)
   9.341 +    libXdmcp.so.6 =&gt; /usr/lib/libXdmcp.so.6 (0xb7c14000)
   9.342 +    libdl.so.2 =&gt; /lib/libdl.so.2 (0xb7c0f000)
   9.343 +    libm.so.6 =&gt; /lib/libm.so.6 (0xb7bea000)
   9.344 +    libexpat.so.1 =&gt; /usr/lib/libexpat.so.1 (0xb7bc9000)
   9.345 +</pre>
   9.346 +<p>
   9.347 +You can start the X server and JWM with the command below or create a script in 
   9.348 +/usr/bin/startx with the content:
   9.349 +</p>
   9.350 +<pre>Xvesa -ac -shadow -screen 1024x768x24 &amp; exec jwm
   9.351 +</pre>
   9.352 +<h4>On SliTaz</h4>
   9.353 +<p>
   9.354 +SliTaz uses the ~/.Xsession file to start a graphical session. The 'startx' command checks 
   9.355 +whether the file exists or it runs 'tazx' to configure the X system. The user guide on X 
   9.356 +window is located in: /usr/share/doc/slitaz/user-guide/x-window.html or is on the website:
   9.357 +</p>
   9.358 +<p>
   9.359 +We chose to use the Tango icons theme <a href="http://tango.freedesktop.org/">http://tango.freedesktop.org/</a>, 
   9.360 +that aren't compiled. We only use the minimum: images in 16 x 16 format that we put in /usr/share/icons.
   9.361 +</p>
   9.362 +<p>
   9.363 +To test JWM with a cooking ISO:
   9.364 +</p>
   9.365 +<pre> # Xvesa -ac -shadow -screen 800x600x24 &amp; exec jwm
   9.366 +</pre>
   9.367 +<a name="jpeg"></a>
   9.368 +<h3><font color="#6c0023">jpeg-6b - JPEG Libraries</font></h3>
   9.369 +<p>
   9.370 +Libraries handling JPEG images, and some small utilities:
   9.371 +</p>
   9.372 +<pre> # wget http://www.ijg.org/files/jpegsrc.v6b.tar.gz
   9.373 + # tar xzf jpegsrc.v6b.tar.gz
   9.374 + # cd jpeg-6b
   9.375 + # ./configure --enable-shared --prefix=/usr \
   9.376 +   --mandir=/usr/share/man
   9.377 + # make
   9.378 + # strip .libs/*
   9.379 + # cp -a .libs/*.so* $fs/usr/lib
   9.380 + # cp .libs/{cjpeg,djpeg,jpegtran} $fs/usr/bin
   9.381 +</pre>
   9.382 +<a name="tiff"></a>
   9.383 +<h3><font color="#6c0023">tiff-3.8.2 - TIFF Libraries and Utilities</font></h3>
   9.384 +<p>
   9.385 +Libraries handling TIFF images and some small optional utilities:
   9.386 +</p>
   9.387 +<pre> # wget ftp://ftp.remotesensing.org/pub/libtiff/tiff-3.8.2.tar.gz
   9.388 + # tar xzf tiff-3.8.2.tar.gz
   9.389 + # cd tiff-3.8.2
   9.390 + # ./configure  --prefix=/usr --mandir=/usr/share/man
   9.391 + # make
   9.392 + # make DESTDIR=$PWD/_pkg install
   9.393 + # strip _pkg/usr/bin/*
   9.394 + # strip _pkg/usr/lib/*.so*
   9.395 + # cp -a _pkg/usr/lib/*.so* $fs/usr/lib
   9.396 +</pre>
   9.397 +<p>
   9.398 +You can install the utilities you want.
   9.399 +</p>
   9.400 +<a name="links"></a>
   9.401 +<h3><font color="#6c0023">links-2.1pre29 - Graphical and text mode web browser</font></h3>
   9.402 +<p>
   9.403 +Links (<a href="http://links.twibright.com/">links.twibright.com</a>) is a web browser offering 
   9.404 +graphical and text modes. It is translated into multiple languages, including French:
   9.405 +</p>
   9.406 +<pre> # cd ..
   9.407 + # wget http://links.twibright.com/download/links-2.1pre28.tar.gz
   9.408 + # tar xzf links-2.1pre28.tar.gz
   9.409 + # cd links-2.1pre28
   9.410 + # ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man \
   9.411 +   --without-directfb --without-ssl --enable-graphics --enable-javascript
   9.412 + # make
   9.413 + # make DESTDIR=$PWD/_pkg install
   9.414 + # strip -v _pkg/usr/bin/*
   9.415 + # cp -v _pkg/usr/bin/* $fs/usr/bin
   9.416 +</pre>
   9.417 +<h4>libs</h4>
   9.418 +<pre class="script">    libtiff.so.3 =&gt; /usr/lib/libtiff.so.3
   9.419 +    libjpeg.so.62 =&gt; /usr/lib/libjpeg.so.62 (0xb7ede000)
   9.420 +    libpng12.so.0 =&gt; /usr/lib/libpng12.so.0 (0xb7eba000)
   9.421 +    libz.so.1 =&gt; /usr/lib/libz.so.1 (0xb7ea7000)
   9.422 +    libX11.so.6 =&gt; /usr/lib/libX11.so.6 (0xb7dbb000)
   9.423 +    libdl.so.2 =&gt; /lib/tls/libdl.so.2 (0xb7db7000)
   9.424 +    libpcre.so.0 =&gt; /usr/lib/libpcre.so.0 (0xb7d96000)
   9.425 +    libm.so.6 =&gt; /lib/tls/libm.so.6 (0xb7d70000)
   9.426 +    libc.so.6 =&gt; /lib/tls/libc.so.6 (0xb7c3e000)
   9.427 +    libXau.so.6 =&gt; /usr/lib/libXau.so.6 (0xb7c3b000)
   9.428 +    libXdmcp.so.6 =&gt; /usr/lib/libXdmcp.so.6 (0xb7c36000)
   9.429 +    /lib/ld-linux.so.2 (0xb7f5d000)
   9.430 +</pre>
   9.431 +<a name="initramfs-iso"></a>
   9.432 +<h3><font color="#6c0023">Generate the initramfs and an ISO image</font></h3>
   9.433 +<p>
   9.434 +To create a new ISO image, you can use 'mktaziso' in 
   9.435 +<a href="http://www.slitaz.org/en/doc/cookbook/slitaz-tools.html">SliTaz tools</a> .  
   9.436 +Or you can create a new initramfs image, copy it to /boot in the root of the cdrom
   9.437 +(rootcd) and finally generate an ISO image with genisoimage:
   9.438 +</p>
   9.439 +<pre> # cd $fs
   9.440 + # find . -print | cpio -o -H newc | gzip -9 &gt; ../rootfs.gz
   9.441 + # cd ..
   9.442 + # cp rootfs.gz rootcd/boot
   9.443 + # genisoimage -R -o slitaz-cooking.iso -b boot/isolinux/isolinux.bin \
   9.444 +   -c boot/isolinux/boot.cat -no-emul-boot -boot-load-size 4 \
   9.445 +   -V "SliTaz" -boot-info-table rootcd
   9.446 +</pre>
   9.447 +<h4>Following chapter</h4>
   9.448 +<p>
   9.449 +The next chapter <a href="gtk-libs.html">GTK+ libs</a> 
   9.450 +describes the installation of GTK libraries.
   9.451 +</p>
   9.452 +
   9.453 +
   9.454 +<!-- End of content -->
   9.455 +</div>
   9.456 +
   9.457 +<!-- Footer. -->
   9.458 +<div id="footer">
   9.459 +	<div class="footer-right"></div>
   9.460 +	<a href="#top">Top of the page</a> | 
   9.461 +	<a href="index.html">Table of contents</a>
   9.462 +</div>
   9.463 +
   9.464 +<div id="copy">
   9.465 +    Copyright &copy; 2008 <a href="http://www.slitaz.org/en/">SliTaz</a> -
   9.466 +    <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>;<br />
   9.467 +    Documentation is under
   9.468 +    <a href="http://www.gnu.org/copyleft/fdl.html">GNU Free Documentation License</a>
   9.469 +    and code is <a href="http://validator.w3.org/">valid xHTML 1.0</a>.
   9.470 +</div>
   9.471 +
   9.472 +</body>
   9.473 +</html>
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/en/doc/scratchbook/xorg.html	Tue Dec 23 14:10:23 2008 +0000
    10.3 @@ -0,0 +1,144 @@
    10.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    10.5 +    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    10.6 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    10.7 +<head>
    10.8 +    <title>SliTaz Scratchbook - Xorg</title>
    10.9 +    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
   10.10 +    <meta name="description" content="" />
   10.11 +    <meta name="expires" content="never" />
   10.12 +    <meta name="modified" content="2008-11-22 17:00:00" />
   10.13 +    <meta name="publisher" content="www.slitaz.org" />
   10.14 +    <meta name="author" content="Christophe Lincoln"/>
   10.15 +    <link rel="shortcut icon" href="favicon.ico" />
   10.16 +    <link rel="stylesheet" type="text/css" href="book.css" />
   10.17 +</head>
   10.18 +<body bgcolor="#ffffff">
   10.19 +
   10.20 +<!-- Header and quick navigation -->
   10.21 +<div id="header">
   10.22 +<div id="quicknav" align="right">
   10.23 +    <a name="top"></a>
   10.24 +    <a href="index.html">Table of contents</a>
   10.25 +</div>
   10.26 +<h1><font color="#3e1220">SliTaz Scratchbook</font></h1>
   10.27 +</div>
   10.28 +
   10.29 +<!-- Content. -->
   10.30 +<div id="content">
   10.31 +<div class="content-right"></div>
   10.32 +
   10.33 +
   10.34 +<h2><font color="#df8f06">How-to Xorg - Modular graphical server</font></h2>
   10.35 +<ul>
   10.36 +    <li><a href="#woking">Build Xorg automatically with Tazwok.</a></li>
   10.37 +    <li><a href="#get">Download Xorg using wget.</a></li>
   10.38 +    <li><a href="#make">Compile Xorg by hand.</a></li>
   10.39 +</ul>
   10.40 +<p>
   10.41 +Note SliTaz uses the Xvesa server provided by XFree86 and Xorg libraries, this page describes 
   10.42 +the compilation of Xorg libraries used by SliTaz. This document is primarily aimed at 
   10.43 +develpers and contributors to the project, but it may be useful to all those seeking to rebuild 
   10.44 +Xorg and Xlib libraries from source generating a minimum of dependencies.
   10.45 +</p>
   10.46 +
   10.47 +<a name="woking"></a>
   10.48 +<h3>Build Xorg automatically with Tazwok</h3>
   10.49 +<p>
   10.50 +On SliTaz, if you have Tazwok installed, you can rebuild Xorg with a few commands. 
   10.51 +The wok contains a package called <code>xorg</code> and another named <code>xorg-dev</code>, 
   10.52 +they can compile/cook all the packages used by Xorg on SliTaz. To compile, you must have 
   10.53 +most of the development packages installed; if this is not the case:
   10.54 +</p>
   10.55 +<pre> # tazpkg get-install slitaz-dev-pkgs
   10.56 +</pre>
   10.57 +<p>
   10.58 +Then you can start to cook (if everything is ready, wok and development packages, etc), 
   10.59 +starting with the protos' (xproto, etc):
   10.60 +</p>
   10.61 +<pre> # tazwok cook xorg-dev-proto
   10.62 + # tazwok cook xorg
   10.63 + # tazwok cook xorg-dev
   10.64 +</pre>
   10.65 +
   10.66 +<a name="get"></a>
   10.67 +<h3>Download Xorg (7.2) using wget</h3>
   10.68 +<p>
   10.69 +Xorg is distributed in the form of modules, which is handy because you can only install what you want, 
   10.70 +but it takes a lot of downloads. To help, we have created a small script that downloads the minimum 
   10.71 +required for SliTaz; you can find the script <code>getXorg.sh</code> in 
   10.72 +<a href="http://www.slitaz.org/en/doc/cookbook/slitaz-tools.html">SliTaz tools (1.1)</a>.
   10.73 +This script is no longer updated, developers use the 
   10.74 +<a href="http://www.slitaz.org/en/doc/cookbook/wok-tools.html">wok and tools</a>. 
   10.75 +To use the script, it must be placed in the directory where you want to download Xorg:
   10.76 +</p>
   10.77 +<pre> # cd ..
   10.78 + # mkdir Xorg &amp;&amp; cd Xorg
   10.79 + # cp slitaz-tools-1.1/utils/getXorg-7.2.sh .
   10.80 + # ./getXorg-7.2.sh
   10.81 +</pre>
   10.82 +<a name="make"></a>
   10.83 +<h3>Compile Xorg by hand</h3>
   10.84 +<p>
   10.85 +Compiling Xorg can take a long time, there are many packages. To commence you need to 
   10.86 +compile the downloaded proto packages, you can use the command <code>make DESTDIR=$PWD/_pkg install</code> to 
   10.87 +install the package in a given directory. Example:
   10.88 +</p>
   10.89 +<pre> # cd proto
   10.90 + # tar xzf xproto-X11R7.2-7.0.10.tar.gz
   10.91 + # cd xproto-X11R7.2-7.0.10
   10.92 + # ./configure --prefix=/usr --sysconfdir=/etc \
   10.93 +   --mandir=/usr/share/man --localstatedir=/var \
   10.94 +   --build=i486-pc-linux-gnu --host=i486-pc-linux-gnu
   10.95 +  # make
   10.96 +  # make install
   10.97 +</pre>
   10.98 +<p>
   10.99 +Compile libraries by taking again the options used by proto. Example using the proper package to 
  10.100 +compile xtrans, remember to run <code>ldconfig</code> if you install the package on the development machine:
  10.101 +</p>
  10.102 +<pre> # cd .. &amp;&amp; cd lib
  10.103 + # tar xzf xtrans-X11R7.2-1.0.3.tar.gz
  10.104 + # cd xtrans-X11R7.2-1.0.3
  10.105 + # ./configure --prefix=/usr --sysconfdir=/etc \
  10.106 +   --mandir=/usr/share/man --localstatedir=/var \
  10.107 +   --build=i486-pc-linux-gnu --host=i486-pc-linux-gnu
  10.108 + # make
  10.109 + # make install
  10.110 + # ldconfig
  10.111 +</pre>
  10.112 +<p>
  10.113 +Once all the packaged libraries are compiled, you can begin to compile X applications such as the 
  10.114 +graphical terminal Xterm. Note: SliTaz uses the RGB package containing the /usr/share/X11/rgt.text 
  10.115 +file for defining colors. Example using the <code>xsetroot</code> application that permits 
  10.116 +you to change the background color of the screen (modify $VERSION for the version that you want downloaded):
  10.117 +</p>
  10.118 +<pre> # cd .. &amp;&amp; cd app
  10.119 + # tar xzf xsetroot-$VERSION.tar.gz
  10.120 + # cd xsetroot-$VERSION
  10.121 + # ./configure --prefix=/usr --sysconfdir=/etc \
  10.122 +   --mandir=/usr/share/man --localstatedir=/var \
  10.123 +   --build=i486-pc-linux-gnu --host=i486-pc-linux-gnu
  10.124 + # make &amp;&amp; make install
  10.125 +</pre>
  10.126 +
  10.127 +
  10.128 +<!-- End of content -->
  10.129 +</div>
  10.130 +
  10.131 +<!-- Footer. -->
  10.132 +<div id="footer">
  10.133 +	<div class="footer-right"></div>
  10.134 +	<a href="#top">Top of the page</a> | 
  10.135 +	<a href="index.html">Table of contents</a>
  10.136 +</div>
  10.137 +
  10.138 +<div id="copy">
  10.139 +    Copyright &copy; 2008 <a href="http://www.slitaz.org/en/">SliTaz</a> -
  10.140 +    <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>;<br />
  10.141 +    Documentation is under
  10.142 +    <a href="http://www.gnu.org/copyleft/fdl.html">GNU Free Documentation License</a>
  10.143 +    and code is <a href="http://validator.w3.org/">valid xHTML 1.0</a>.
  10.144 +</div>
  10.145 +
  10.146 +</body>
  10.147 +</html>