website rev 267

pt: add scratchbook english pages for future translation
author Claudinei Pereira <claudinei@ensinoemrede.com>
date Fri Jan 30 18:32:32 2009 +0000 (2009-01-30)
parents b9177cd5b410
children 978655362d8e
files pt/doc/index.html pt/doc/scratchbook/base-apps.html pt/doc/scratchbook/base-ncurses.html pt/doc/scratchbook/base-system.html pt/doc/scratchbook/book.css pt/doc/scratchbook/boot-scripts.html pt/doc/scratchbook/favicon.ico pt/doc/scratchbook/gtk-apps.html pt/doc/scratchbook/gtk-libs.html pt/doc/scratchbook/images/css/content-tl.png pt/doc/scratchbook/images/css/content-tr.png pt/doc/scratchbook/images/css/footer-bl.png pt/doc/scratchbook/images/css/footer-br.png pt/doc/scratchbook/images/css/header.png pt/doc/scratchbook/index.html pt/doc/scratchbook/locale.html pt/doc/scratchbook/template.html pt/doc/scratchbook/x-window-system.html pt/doc/scratchbook/xorg.html
line diff
     1.1 --- a/pt/doc/index.html	Fri Jan 30 14:55:14 2009 +0000
     1.2 +++ b/pt/doc/index.html	Fri Jan 30 18:32:32 2009 +0000
     1.3 @@ -85,6 +85,12 @@
     1.4      conforme suas necessidades e preferências.</li>
     1.5      <li><a href="cookbook/">Cookbook</a> - Livro de Receitas. Instruções de
     1.6      utilização do wok e das receitas de pacotes.</li>
     1.7 +    <li><a href="scratchbook/">Scratchbook</a> - Livro de Rascunhos do SliTaz. 
     1.8 +    Descreve os estágio necessários para a criação do SliTaz, desde instruções 
     1.9 +    para a compilação do kernel Linux até a instalação de um servidor gráfico 
    1.10 +    (Xvesa) e aplicativos GTK. Contem técnicas que requerem tempo e motivação 
    1.11 +    para serem aprendidas mas que habilitam aquele que tiver interesse a 
    1.12 +    construir um sistema GNU/Linux a partir dos fontes.</li>
    1.13  </ul>
    1.14      
    1.15  <h2><font color="#df8f06">Manuais</font></h2>    
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/pt/doc/scratchbook/base-apps.html	Fri Jan 30 18:32:32 2009 +0000
     2.3 @@ -0,0 +1,553 @@
     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 Applications</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-system.html">Base system</a> |
    2.25 +    <a href="index.html">Table of contents</a> |
    2.26 +    <a href="base-ncurses.html">Base ncurses</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">Base Applications</font></h2>
    2.37 +<p>
    2.38 +Install and configure libraries and basic applications.
    2.39 +</p>
    2.40 +<ul>
    2.41 +    <li><a href="#about">About the chapter</a> - Description and environmental variable ($fs)</li>
    2.42 +    <li><a href="#bc">bc-1.06</a> - Text mode calculator.</li>
    2.43 +    <li><a href="#zlib">zlib-1.2.3</a> - Compression libraries.</li>
    2.44 +    <li><a href="#pcre">pcre-7.4</a> - Perl-compatible regular expressions.</li>
    2.45 +    <li><a href="#e2fsprogs">e2fsprogs-1.39</a> - Filesystem management utilities.</li>
    2.46 +    <li><a href="#dropbear">dropbear-0.50</a> - Lightweight SSH server and client.</li>
    2.47 +    <li><a href="#lighttpd">lighttpd-1.4.18</a> - HTTP web server.</li>
    2.48 +    <li><a href="#iptables">iptables-1.3.7</a> - Netfilter, Linux firewall.</li>
    2.49 +    <li><a href="#sqlite">sqlite-3.5.1</a> - Small SQL database engine.</li>
    2.50 +    <li><a href="#cdrkit">cdrkit-1.1.5</a> - Tools for manipulating cdrom
    2.51 +    and ISO images.</li>
    2.52 +    <li><a href="#cpio">cpio-2.8</a> - Archiver used for SliTaz packages and
    2.53 +    initramfs.</li>
    2.54 +    <li><a href="#microperl">microperl-5.8.8</a> - A tiny Perl.</li>
    2.55 +    <li><a href="#module-init-tools">module-init-tools-3.2</a> - Tools for
    2.56 +    manipulating the kernel modules.</li>
    2.57 +    <li><a href="#kernel-modules">Copy and compress the Kernel modules.</a></li>
    2.58 +    <li><a href="#initramfs-iso">Generate the initramfs and an ISO image.</a></li>
    2.59 +</ul>
    2.60 +<a name="about"></a>
    2.61 +<h3><font color="#6c0023">About</font></h3>
    2.62 +<p>
    2.63 +This chapter describes the facilities libraries and basic text mode applications supplied with
    2.64 +SliTaz.
    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="bc"></a>
    2.80 +<h3><font color="#6c0023">bc-1.06 - Text mode calculator</font></h3>
    2.81 +<p>
    2.82 +The application bc (<a href="http://www.gnu.org/software/bc/">www.gnu.org/software/bc/</a>) provides 
    2.83 +a small calculator. When compiling the utility, dc is also built, 
    2.84 +but not installed by SliTaz. Note that dc is also available with BusyBox. If you decide to copy dc, you 
    2.85 +need to delete the link to BusyBox (if it exists). We use a directory _pkg (package) for installation, 
    2.86 +use strip to clean the executables and copy the utilities:
    2.87 +</p>
    2.88 +<pre> # cd src
    2.89 + # wget http://ftp.gnu.org/pub/gnu/bc/bc-1.06.tar.gz
    2.90 + # tar xzfv bc-1.06.tar.gz
    2.91 + # cd bc-1.06
    2.92 + # ./configure --prefix=/usr --infodir=/usr/share/info \
    2.93 +   --mandir=/usr/share/man
    2.94 + # make
    2.95 + # make DESTDIR=$PWD/_pkg install
    2.96 + # strip -vs _pkg/usr/bin/*
    2.97 + # cp -avi _pkg/usr/bin/bc $fs/usr/bin
    2.98 +</pre>
    2.99 +<h4>libs</h4>
   2.100 +<p>
   2.101 +A small <code>ldd</code> on bc should produce:
   2.102 +</p>
   2.103 +<pre class="script">        libc.so.6 =&gt; /lib/libc.so.6 (0x40029000)
   2.104 +        /lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0x40000000)
   2.105 +</pre>
   2.106 +<a name="zlib"></a>
   2.107 +<h3><font color="#6c0023">zlib-1.2.3 - Compression libraries</font></h3>
   2.108 +<p>
   2.109 +The zlib (<a href="http://www.zlib.net/">http://www.zlib.net/</a>) package provides compression 
   2.110 +and decompression functions used by among others, the SSH server Dropbear and the X server:
   2.111 +</p>
   2.112 +<pre> # cd ..
   2.113 + # wget http://www.gzip.org/zlib/zlib-1.2.3.tar.bz2
   2.114 + # tar xjfv zlib-1.2.3.tar.bz2
   2.115 + # cd zlib-1.2.3
   2.116 + # ./configure --shared --prefix=/usr
   2.117 + # make
   2.118 + # strip -vs libz.so*
   2.119 + # cp -av libz.so* $fs/usr/lib
   2.120 +</pre>
   2.121 +<a name="pcre"></a>
   2.122 +<h3><font color="#6c0023">pcre-7.4 - Perl-compatible regular expressions</font></h3>
   2.123 +<p>
   2.124 +The package pcre (<a href="http://www.pcre.org/">http://www.pcre.org/</a>) provides libraries of 
   2.125 +functions for Perl compatible regular expressions used by among others, the web server Lighttpd:
   2.126 +</p>
   2.127 +<pre> # cd ..
   2.128 + # wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-7.4.tar.gz
   2.129 + # tar xzfv pcre-7.4.tar.gz
   2.130 + # cd pcre-7.4
   2.131 + # ./configure --prefix=/usr
   2.132 + # make
   2.133 + # make DESTDIR=$PWD/_pkg install
   2.134 + # strip -vs _pkg/usr/bin/*
   2.135 + # strip -vs _pkg/usr/lib/*
   2.136 + # cp -av _pkg/usr/bin/* $fs/usr/bin
   2.137 + # cp -av _pkg/usr/lib/*.so* $fs/usr/lib
   2.138 +</pre>
   2.139 +<a name="e2fsprogs"></a>
   2.140 +<h3><font color="#6c0023">e2fsprogs-1.39 - Filesystem management utilities</font></h3>
   2.141 +<p>
   2.142 +The e3fsprogs (<a href="http://e2fsprogs.sourceforge.net/">http://e2fsprogs.sourceforge.net/</a>) provides 
   2.143 +utilities for handling ext2 and ext3 filesystems. We will not take all of them because we need the space. 
   2.144 +It should be noted that we use fsck of BusyBox:
   2.145 +</p>
   2.146 +<pre> # cd ..
   2.147 + # wget http://puzzle.dl.sourceforge.net/sourceforge/e2fsprogs/e2fsprogs-1.39.tar.gz
   2.148 + # tar xzf e2fsprogs-1.39.tar.gz
   2.149 + # cd e2fsprogs-1.39
   2.150 + # ./configure --prefix=/usr --with-root-prefix="" \
   2.151 +   --enable-elf-shlibs --disable-evms --sysconfdir=/etc \
   2.152 +   --infodir=/usr/share/info --mandir=/usr/share/man
   2.153 + # make
   2.154 + # make DESTDIR=$PWD/_pkg install
   2.155 + # strip -vs _pkg/sbin/*
   2.156 + # strip -vs _pkg/lib/*
   2.157 + # strip -vs _pkg/usr/bin/*
   2.158 + # strip -vs _pkg/usr/sbin/*
   2.159 + # strip -vs _pkg/usr/lib/*
   2.160 +</pre>
   2.161 +<p>
   2.162 +Install the utilities, configuration files and libraries in the rootfs of SliTaz. Be careful if you  
   2.163 +used fsck, that you didn't destroy the link to BusyBox:
   2.164 +</p>
   2.165 +<pre> # cp -i _pkg/sbin/{badblocks,blkid,dumpe2fs,e2fsck,e2image} $fs/sbin
   2.166 + # cp -i _pkg/sbin/{e2label,findfs,logsave,mke2fs,mkfs.*} $fs/sbin
   2.167 + # cp -i _pkg/sbin/{resize2fs,tune2fs} $fs/sbin
   2.168 + # cp -a _pkg/lib/* $fs/lib
   2.169 + # rm -rf $fs/lib/libss*
   2.170 + # cp -a _pkg/etc/* $fs/etc
   2.171 + # cp -a _pkg/usr/bin/* $fs/usr/bin
   2.172 + # cp -a _pkg/usr/sbin/* $fs/usr/sbin
   2.173 + # cp -ad _pkg/usr/lib/*.so $fs/usr/lib
   2.174 + # rm -rf $fs/usr/lib/libss*
   2.175 +</pre>
   2.176 +<p>
   2.177 +You can also copy files from the French locale:
   2.178 +</p>
   2.179 +<pre> # mkdir $fs/usr/share/locale
   2.180 + # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
   2.181 +</pre>
   2.182 +<a name="dropbear"></a>
   2.183 +<h3><font color="#6c0023">Dropbear-0.50 - Lightweight SSH client and server</font></h3>
   2.184 +<p>
   2.185 +Dropbear (<a href="http://matt.ucc.asn.au/dropbear/dropbear.html">http://matt.ucc.asn.au/dropbear/dropbear.html</a>) 
   2.186 +is a small secure client/server supporting SSH 2. Dropbear is compatible with
   2.187 +OpenSSH and uses ~/.ssh/authorized_keys for the management of public keys. Dropbear also
   2.188 +provides a version of scp, which must be compiled with 'make scp':
   2.189 +</p>
   2.190 +<pre> # cd ..
   2.191 + # wget http://matt.ucc.asn.au/dropbear/releases/dropbear-0.50.tar.gz
   2.192 + # tar xzf dropbear-0.50.tar.gz
   2.193 + # cd dropbear-0.50
   2.194 + # ./configure --prefix=/usr
   2.195 + # make
   2.196 + # make scp
   2.197 + # make DESTDIR=$PWD/_pkg install
   2.198 + # strip -v scp
   2.199 + # strip -v _pkg/usr/bin/*
   2.200 + # strip -v _pkg/usr/sbin/*
   2.201 +</pre>
   2.202 +<p>
   2.203 +Install the client and tools in /usr/bin, and the server in /usr/sbin:
   2.204 +</p>
   2.205 +<pre> # cp scp $fs/usr/bin
   2.206 + # cp -a _pkg/usr/bin/* $fs/usr/bin
   2.207 + # cp -a _pkg/usr/sbin/* $fs/usr/sbin
   2.208 +</pre>
   2.209 +<h4>libs</h4>
   2.210 +<pre class="script">        libutil.so.1 =&gt; /lib/libutil.so.1 (0x40025000)
   2.211 +        libz.so.1 =&gt; /usr/lib/libz.so.1 (0x40028000)
   2.212 +        libcrypt.so.1 =&gt; /lib/libcrypt.so.1 (0x4003b000)
   2.213 +        libc.so.6 =&gt; /lib/libc.so.6 (0x40068000)
   2.214 +        /lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0x40000000)
   2.215 +</pre>
   2.216 +<p>
   2.217 +Copy the library libutil.so.1 to $fs/lib, if this is not already the case. Other libraries 
   2.218 +should be present following the construction of the base system:
   2.219 +</p>
   2.220 +<pre> # cp -a /lib/libutil* $fs/lib
   2.221 +</pre>
   2.222 +<h4>Configure Dropbear</h4>
   2.223 +<p>
   2.224 +The user configuration files authorized_keys and known_hosts are in ~/.ssh. This directory and the 
   2.225 +file known_hosts are created automatically the first time the user launches dbclient. The system 
   2.226 +configuration files for the Dropbear server are in /etc/dropbear:
   2.227 + </p>
   2.228 +<pre> # mkdir $fs/etc/dropbear
   2.229 +</pre>
   2.230 +<p>
   2.231 +You must generate the secure keys before starting the Dropbear server on SliTaz. 
   2.232 +You can use dropbearkey with the following commands:
   2.233 +</p>
   2.234 +<pre> # dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key
   2.235 + # dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key
   2.236 +</pre>
   2.237 +<p>
   2.238 +On SliTaz, you can start the SSH server with the command:
   2.239 +</p>
   2.240 +<pre> # /etc/init.d/dropbear start
   2.241 +</pre>
   2.242 +<a name="lighttpd"></a>
   2.243 +<h3><font color="#6c0023">lighttpd-1.4.18 - HTTP Web server</font></h3>
   2.244 +<p>
   2.245 +Lighttpd (<a href="http://www.lighttpd.net/">www.lighttpd.net</a>) is a light, secure and powerful web server. 
   2.246 +The project is very active and the server's configuration simple. It supports virtual hosts, CGI scripts, 
   2.247 +and allows intelligent management of the CPU:
   2.248 +</p>
   2.249 +<pre> # cd ..
   2.250 + # wget http://www.lighttpd.net/download/lighttpd-1.4.18.tar.gz
   2.251 + # tar xzf lighttpd-1.4.18.tar.gz
   2.252 + # cd lighttpd-1.4.18
   2.253 + # ./configure -enable-shared --disable-ipv6 --prefix=/usr \
   2.254 +   --libdir=/usr/lib/lighttpd --mandir=/usr/share/man
   2.255 + # make
   2.256 + # make DESTDIR=$PWD/_pkg install
   2.257 + # strip -vs _pkg/usr/bin/*
   2.258 + # strip -vs _pkg/usr/sbin/*
   2.259 + # strip -vs _pkg/usr/lib/lighttpd/*
   2.260 +</pre>
   2.261 +<p>
   2.262 +Install the server and generated libraries. We will then copy some of the modules (9):
   2.263 +</p>
   2.264 +<pre> # cp _pkg/usr/bin/* $fs/usr/bin
   2.265 + # cp _pkg/usr/sbin/* $fs/usr/sbin
   2.266 + # mkdir $fs/usr/lib/lighttpd
   2.267 + Modules :
   2.268 + # cp _pkg/usr/lib/lighttpd/mod_access.so $fs/usr/lib/lighttpd
   2.269 + # cp _pkg/usr/lib/lighttpd/mod_accesslog.so $fs/usr/lib/lighttpd
   2.270 + # cp _pkg/usr/lib/lighttpd/mod_alias.so $fs/usr/lib/lighttpd
   2.271 + # cp _pkg/usr/lib/lighttpd/mod_auth.so $fs/usr/lib/lighttpd
   2.272 + # cp _pkg/usr/lib/lighttpd/mod_cgi.so $fs/usr/lib/lighttpd
   2.273 + # cp _pkg/usr/lib/lighttpd/mod_compress.so $fs/usr/lib/lighttpd
   2.274 + # cp _pkg/usr/lib/lighttpd/mod_rewrite.so $fs/usr/lib/lighttpd
   2.275 + # cp _pkg/usr/lib/lighttpd/mod_status.so $fs/usr/lib/lighttpd
   2.276 + # cp _pkg/usr/lib/lighttpd/mod_userdir.so $fs/usr/lib/lighttpd
   2.277 +</pre>
   2.278 +<h4>libs</h4>
   2.279 +<p>
   2.280 +There should be a libdl.so.2 library; if missing, we can copy:
   2.281 +</p>
   2.282 +<pre> # cp -a /lib/libdl* $fs/lib
   2.283 +</pre>
   2.284 +<h4>/var/www - root of documents served</h4>
   2.285 +<p>
   2.286 +/var/www is the root directory of documents served by default. You can access this via the url http://localhost/. 
   2.287 +This directory contains an <code>index.html</code> automatically displayed by a query. 
   2.288 +We will create the directory /var/www, to see what's placed inside:
   2.289 +</p>
   2.290 +<pre> # mkdir -p $fs/var/www
   2.291 +</pre>
   2.292 +<h4>lighttpd.conf - Lighttpd configuration file</h4>
   2.293 +<p>
   2.294 +The Lighttpd main configuration file is located at /etc/lighttpd and is called lighttpd.conf. 
   2.295 +The configuration file SliTaz provides is self-explanatary, just browse. You can find other examples on the 
   2.296 +Lighttpd website and as well as an example configuration in /doc in the Lighttpd archive:
   2.297 +</p>
   2.298 +<pre> # cp -a ../slitaz-tools-1.1/etc/lighttpd $fs/etc
   2.299 +</pre>
   2.300 +<p>
   2.301 +Creating the directory containing the log files:
   2.302 +</p>
   2.303 +<pre> # mkdir $fs/var/log/lighttpd
   2.304 +</pre>
   2.305 +<h4>User and group www</h4>
   2.306 +<p>
   2.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. 
   2.308 +The default user on SliTaz is 'www', but you can change this in the configuration file lighttpd.conf. 
   2.309 +The BusyBox application adduser has some limitations, so we add user 'www' manually. We also change permissions on 
   2.310 +the directory of web server logs:
   2.311 +</p>
   2.312 +<pre> # echo "www:x:80:80:www:/var/www:/bin/sh" &gt;&gt; $fs/etc/passwd
   2.313 + # echo "www:*:13509:0:99999:7:::" &gt;&gt; $fs/etc/shadow
   2.314 + # echo "www:*:13509:0:99999:7:::" &gt;&gt; $fs/etc/shadow-
   2.315 + # chroot $fs /bin/ash
   2.316 + /# addgroup -g 80 www
   2.317 + /# chown www.www /var/log/lighttpd
   2.318 + # exit
   2.319 +</pre>
   2.320 +<p>
   2.321 +To start the web server, you can use script /etc/init.d/lighttpd provided by SliTaz tools, by typing: 
   2.322 +<code>/etc/init.d/lighttpd start</code>. You can also automate its 
   2.323 +launch at boot with a link /etc/init.d/lighttpd pointing to /etc/rc.d/60lighttpd.
   2.324 +</p>
   2.325 +<a name="iptables"></a>
   2.326 +<h3><font color="#6c0023">iptables-1.3.7 - Netfilter, Linux firewall</font></h3>
   2.327 +<p>
   2.328 +Netfilter (<a href="http://www.netfilter.org/">www.netfilter.org</a>) is the module which provides the Linux 
   2.329 +kernel firewall functions, shared internet connections (NAT) and the archiving of network traffic. 
   2.330 +The iptables command allows you to configure Netfilter using iptables-restore 
   2.331 +and iptable-save, to save and restore the Netfilter configuration:
   2.332 +</p>
   2.333 +<pre> # cd ..
   2.334 + # wget http://www.netfilter.org/projects/iptables/files/iptables-1.3.7.tar.bz2
   2.335 + # tar xjf iptables-1.3.7.tar.bz2
   2.336 + # cd iptables-1.3.7
   2.337 + # make KERNEL_DIR=../linux-2.6.20 BINDIR=/sbin \
   2.338 +   LIBDIR=/lib MANDIR=/usr/share/man
   2.339 + # make KERNEL_DIR=../linux-2.6.20 BINDIR=/sbin \
   2.340 +   LIBDIR=/lib MANDIR=/usr/share/man \
   2.341 +   DESTDIR=$PWD/_pkg install
   2.342 + # strip  _pkg/sbin/*
   2.343 + # strip  _pkg/lib/iptables/*
   2.344 +</pre>
   2.345 +<p>
   2.346 +Installing the iptables* applications and libraries sufficient for a basic firewall:
   2.347 +</p>
   2.348 +<pre> # cp -a _pkg/sbin/iptables* $fs/sbin
   2.349 + # mkdir $fs/lib/iptables
   2.350 + # cp -a _pkg/lib/iptables/{libipt_standard.so,libipt_conntrack.so} \
   2.351 +   $fs/lib/iptables
   2.352 + # cp -a _pkg/lib/iptables/{libipt_tcp.so,libipt_udp.so} $fs/lib/iptables
   2.353 +</pre>
   2.354 +<p>
   2.355 +To satisfy the iptables dependencies, you must copy the libnsl* library:
   2.356 +</p>
   2.357 +<pre> # cp -va /lib/libnsl* $fs/lib/tls
   2.358 + # strip $fs/lib/libnsl*
   2.359 +</pre>
   2.360 +<a name="sqlite"></a>
   2.361 +<h3><font color="#6c0023">sqlite-3.5.1 - Small SQL database engine</font></h3>
   2.362 +<p>
   2.363 +This package provides sqlite3 (<a href="http://www.sqlite.org/">www.sqlite.org</a>) and sqlite3.so* 
   2.364 +libraries. SQLite is fast and efficient and integrates directly to programs using database files: 
   2.365 +</p>
   2.366 +<pre> # cd ..
   2.367 + # wget http://www.sqlite.org/sqlite-3.5.1.tar.gz
   2.368 + # tar xzf sqlite-3.5.1.tar.gz
   2.369 + # cd sqlite-3.5.1
   2.370 + # ./configure --prefix=/usr --disable-tcl
   2.371 + # make
   2.372 + # make DESTDIR=$PWD/_pkg install
   2.373 + # strip _pkg/usr/lib/*.so*
   2.374 + # strip _pkg/usr/bin/*
   2.375 +</pre>
   2.376 +<p>
   2.377 +Installing the sqlite3 utility and libraries in the rootfs of SliTaz:
   2.378 +</p>
   2.379 +<pre> # cp -a _pkg/usr/lib/*.so* $fs/usr/lib
   2.380 + # cp -a _pkg/usr/bin/* $fs/usr/bin
   2.381 +</pre>
   2.382 +<a name="cdrkit"></a>
   2.383 +<h3><font color="#6c0023">cdrkit-1.1.5 - Tools for manipulating cdrom and ISO images</font></h3>
   2.384 +<p>
   2.385 +cdrkit (<a href="http://www.cdrkit.org/">www.cdrkit.org</a>) provides tools for manipulating cdroms. 
   2.386 +SliTaz installs by default wodim for burning and genisoimage to create an ISO image. 
   2.387 +The compilation is a bit different (cmake), but shouldn't pose any problems:
   2.388 +</p>
   2.389 +<pre> # cd ..
   2.390 + # wget http://cdrkit.org/releases/cdrkit-1.1.5.tar.gz
   2.391 + # tar xzf cdrkit-1.1.5.tar.gz
   2.392 + # cd cdrkit-1.1.5
   2.393 + # make
   2.394 + # make install PREFIX=$PWD/_pkg/usr
   2.395 + # strip -v _pkg/usr/bin/*
   2.396 + # strip -v _pkg/usr/sbin/*
   2.397 + # cp _pkg/usr/bin/genisoimage $fs/usr/bin
   2.398 + # cp _pkg/usr/bin/wodim $fs/usr/bin
   2.399 +</pre>
   2.400 +<p>
   2.401 +Copy the library libcap.so.1 required by wodim:
   2.402 +</p>
   2.403 +<pre> # cp -a /lib/libcap.so* $fs/lib
   2.404 +</pre>
   2.405 +<a name="cpio"></a>
   2.406 +<h3><font color="#6c0023">cpio-2.8 - Archiver</font></h3>
   2.407 +<p>
   2.408 +<code>cpio</code> (<a href="http://www.gnu.org/software/cpio/">http://www.gnu.org/software/cpio/</a>) provides tools for 
   2.409 +manipulating cpio archives. The archive format is used for packages and the SliTaz initramfs image of the cdrom. 
   2.410 +Note that BusyBox provides a version of cpio that only unpacks archives:
   2.411 +</p>
   2.412 +<pre> # cd ..
   2.413 + # wget ftp://sunsite.cnlab-switch.ch/mirror/gnu/cpio/cpio-2.8.tar.gz
   2.414 + # tar xzf cpio-2.8.tar.gz
   2.415 + # cd cpio-2.8
   2.416 + # ./configure --prefix=/usr --bindir=/bin \
   2.417 +   --libexecdir=/usr/bin --mandir=/usr/share/man \
   2.418 +   --infodir=/usr/share/info
   2.419 + # make
   2.420 + # make DESTDIR=$PWD/_pkg install
   2.421 + # strip -v _pkg/bin/*
   2.422 + # strip -v _pkg/usr/bin/*
   2.423 +</pre>
   2.424 +<p>
   2.425 +Installing <code>cpio</code> in /bin and <code>rmt</code> in /usr/bin. You can also install the French locale files:
   2.426 +</p>
   2.427 +<pre> # cp -a _pkg/bin/* $fs/bin
   2.428 + # cp -a _pkg/usr/bin/* $fs/usr/bin
   2.429 + # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
   2.430 +</pre>
   2.431 +<a name="microperl"></a>
   2.432 +<h3><font color="#6c0023">microperl-5.8.8 - A tiny Perl</font></h3>
   2.433 +<p>
   2.434 +Microperl is a tiny implementation of Perl using the most basic functions of the language. 
   2.435 +You can find more info in the source archive and the file <code>README.micro</code>. 
   2.436 +We use a small <code>sed</code> on the configuration file that searches for microperl modules 
   2.437 +in /usr/lib/perl5. We also create a link to the #! /usr/bin/perl script:
   2.438 +</p>
   2.439 +<pre> # wget http://ftp.funet.fi/pub/CPAN/src/perl-5.8.8.tar.gz
   2.440 + # tar xzf perl-5.8.8.tar.gz
   2.441 + # cd perl-5.8.8
   2.442 + # sed -i s/'usr\/local'/'usr'/ uconfig.sh
   2.443 + # sed -i s/'perl5\/5.9'/'perl5'/ uconfig.sh
   2.444 + # sed -i s/'unknown'/'i486-pc-linux-gnu'/ uconfig.sh
   2.445 + # make -f Makefile.micro regen_uconfig
   2.446 + # make -f Makefile.micro
   2.447 + # strip microperl
   2.448 + # cp microperl $fs/usr/bin
   2.449 + # chroot $fs /bin/ash
   2.450 + /# cd /usr/bin
   2.451 + /# ln -s microperl perl
   2.452 + /# exit
   2.453 +</pre>
   2.454 +<a name="module-init-tools"></a>
   2.455 +<h3><font color="#6c0023">module-init-tools-3.2 - Utilities for manipulating kernel modules</font></h3>
   2.456 +<p>
   2.457 +The <a href="http://ftp.kernel.org/pub/linux/utils/kernel/module-init-tools/">module-init-tools</a> 
   2.458 +from kernel.org: modprobe, insmod, rmmod and lsmod. We have chosen to use these because we can compile 
   2.459 +modutils/modprobe to support compressed (.gz) modules to save space. To do this we use the option 
   2.460 +--enable-zlib, we then clean and copy the binaries. We do not take everything that has been created, 
   2.461 +only what we need: depmod, insmod, modinfo, modprobe and rmmod in /sbin and lsmod in /bin:
   2.462 +</p>
   2.463 +<pre> # cd ..
   2.464 + # wget http://ftp.kernel.org/pub/linux/utils/kernel/module-init-tools/module-init-tools-3.2.tar.bz2
   2.465 + # tar xjf module-init-tools-3.2.tar.bz2
   2.466 + # cd module-init-tools-3.2
   2.467 + # ./configure --enable-zlib --prefix=/usr --sbindir=/sbin --bindir=/bin \
   2.468 +   --sysconfdir=/etc --infodir=/usr/share/info --mandir=/usr/share/man
   2.469 + # make
   2.470 + # make DESTDIR=$PWD/_pkg install
   2.471 + # strip -v _pkg/sbin/{depmod,insmod,modinfo,modprobe,rmmod}
   2.472 + # strip -v _pkg/bin/lsmod
   2.473 + # cp -i _pkg/sbin/{depmod,insmod,modinfo,modprobe,rmmod} $fs/sbin
   2.474 + # cp -i _pkg/bin/lsmod $fs/bin
   2.475 + # cd ..
   2.476 +</pre>
   2.477 +<a name="kernel-modules"></a>
   2.478 +<h3><font color="#6c0023">Copy kernel modules</font></h3>
   2.479 +<p>
   2.480 +Copy files from linux-2.6.20/_pkg:
   2.481 +</p>
   2.482 +<pre> # cp -a linux-2.6.20/_pkg/lib/* $fs/lib
   2.483 +</pre>
   2.484 +<h4>Compress kernel modules</h4>
   2.485 +<p>
   2.486 +Compress modules, this step will gain us back around 50% of available space.
   2.487 +We begin by moving into the rootfs, then we search for all files with the 
   2.488 +<code>.ko</code> extension, and compress them. You
   2.489 +can also do this with the 'gzmodtaz.sh' script found in SliTaz tools:
   2.490 +</p>
   2.491 +<pre> # cd $fs
   2.492 +</pre>
   2.493 +<p>
   2.494 +With 'gztazmod.sh':
   2.495 +</p>
   2.496 +<pre> # cp -v ../src/slitaz-tools-1.1/utils/gztazmod.sh sbin
   2.497 + # ./sbin/gztazmod.sh lib/modules/2.6.20-slitaz
   2.498 +</pre>
   2.499 +<p>
   2.500 +Or by hand:
   2.501 +</p>
   2.502 +<pre> # cd lib/modules/2.6.20-slitaz
   2.503 + # find . -name "*.ko" -exec gzip '{}' \;
   2.504 + # sed 's/\.ko/.ko.gz/g' modules.dep &gt; tmp.dep
   2.505 + # rm modules.dep
   2.506 + # mv tmp.dep modules.dep
   2.507 +</pre>
   2.508 +<a name="initramfs-iso"></a>
   2.509 +<h3><font color="#6c0023">Generate the initramfs and an ISO image</font></h3>
   2.510 +<p>
   2.511 +To create a new ISO image, you can use 'mktaziso' in 
   2.512 +<a href="http://www.slitaz.org/en/doc/cookbook/slitaz-tools.html">SliTaz tools</a>.  
   2.513 +Or you can create a new initramfs image, copy it to /boot in the root of the cdrom
   2.514 +(rootcd) and finally generate an ISO image with genisoimage:
   2.515 +</p>
   2.516 +<pre> # cd $fs
   2.517 + # find . -print | cpio -o -H newc | gzip -9 &gt; ../rootfs.gz
   2.518 + # cd ..
   2.519 + # cp rootfs.gz rootcd/boot
   2.520 + # genisoimage -R -o slitaz-test.iso -b boot/isolinux/isolinux.bin \
   2.521 +   -c boot/isolinux/boot.cat -no-emul-boot -boot-load-size 4 \
   2.522 +   -V "SliTaz" -input-charset iso8859-1 -boot-info-table rootcd
   2.523 +</pre>
   2.524 +<p>
   2.525 +Test iso image:
   2.526 +</p>
   2.527 +<pre> # qemu -cdrom slitaz-test.iso
   2.528 +</pre>
   2.529 +
   2.530 +<h4>Following chapter</h4>
   2.531 +<p>
   2.532 +The next chapter is called <a href="base-ncurses.html">Base Ncurses</a>. It
   2.533 +covers the installation and configuration of the ncurses libraries and
   2.534 +applications.
   2.535 +</p> 
   2.536 +
   2.537 +<!-- End of content -->
   2.538 +</div>
   2.539 +
   2.540 +<!-- Footer. -->
   2.541 +<div id="footer">
   2.542 +	<div class="footer-right"></div>
   2.543 +	<a href="#top">Top of the page</a> | 
   2.544 +	<a href="index.html">Table of contents</a>
   2.545 +</div>
   2.546 +
   2.547 +<div id="copy">
   2.548 +    Copyright &copy; 2008 <a href="http://www.slitaz.org/en/">SliTaz</a> -
   2.549 +    <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>;<br />
   2.550 +    Documentation is under
   2.551 +    <a href="http://www.gnu.org/copyleft/fdl.html">GNU Free Documentation License</a>
   2.552 +    and code is <a href="http://validator.w3.org/">valid xHTML 1.0</a>.
   2.553 +</div>
   2.554 +
   2.555 +</body>
   2.556 +</html>
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/pt/doc/scratchbook/base-ncurses.html	Fri Jan 30 18:32:32 2009 +0000
     3.3 @@ -0,0 +1,444 @@
     3.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     3.5 +    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     3.6 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
     3.7 +<head>
     3.8 +    <title>SliTaz Scratchbook - Base Ncurses</title>
     3.9 +    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
    3.10 +    <meta name="description" content="" />
    3.11 +    <meta name="expires" content="never" />
    3.12 +    <meta name="modified" content="2008-11-22 17:00:00" />
    3.13 +    <meta name="publisher" content="www.slitaz.org" />
    3.14 +    <meta name="author" content="Christophe Lincoln"/>
    3.15 +    <link rel="shortcut icon" href="favicon.ico" />
    3.16 +    <link rel="stylesheet" type="text/css" href="book.css" />
    3.17 +</head>
    3.18 +<body bgcolor="#ffffff">
    3.19 +
    3.20 +<!-- Header and quick navigation -->
    3.21 +<div id="header">
    3.22 +<div align="right" id="quicknav">
    3.23 +    <a name="top"></a>
    3.24 +    <a href="base-apps.html">Base apps</a> |
    3.25 +    <a href="index.html">Table of contents</a> |
    3.26 +    <a href="locale.html">Locale &amp; i18n</a>
    3.27 +</div>
    3.28 +<h1><font color="#3E1220">SliTaz Scratchbook</font></h1>
    3.29 +</div>
    3.30 +
    3.31 +<!-- Content. -->
    3.32 +<div id="content">
    3.33 +<div class="content-right"></div>
    3.34 +
    3.35 +
    3.36 +<h2><font color="#df8f06">Ncurses libraries and applications</font></h2>
    3.37 +<p>
    3.38 +Installation and configuration of ncurses libraries and applications.
    3.39 +</p>
    3.40 +<ul>
    3.41 +    <li><a href="#about">About the chapter.</a> - Description and environmental
    3.42 +    variable ($fs)</li>
    3.43 +    <li><a href="#ncurses">ncurses-5.6</a> -  Utilities and libraries for terminal.</li>
    3.44 +    <li><a href="#clex">clex-3.16</a> - File manager.</li>
    3.45 +    <li><a href="#nano">nano-2.0.6</a> - Advanced text editor with colored syntax.</li>
    3.46 +    <li><a href="#retawq">retawq-0.2.6c</a> - Navigate the web in text 
    3.47 +    mode using ncurses.</li>
    3.48 +    <li><a href="#htop">htop-0.6.5</a> - System process viewer.</li>
    3.49 +    <li><a href="#dialog">dialog-1.1-20070409</a> - GUI shell scripts.</li>
    3.50 +    <li><a href="#ninvaders">ninvaders-0.1.1</a> - Space Invaders clone.</li>
    3.51 +    <li><a href="#bastet">bastet-0.41</a> - Bastard Tetris clone.</li>
    3.52 +    <li><a href="#rhapsody">rhapsody-0.28b</a> - IRC chat client.</li>
    3.53 +    <li><a href="#initramfs-iso">Generate the initramfs and an ISO image.</a></li>
    3.54 +</ul>
    3.55 +<a name="about"></a>
    3.56 +<h3><font color="#6c0023">About</font></h3>
    3.57 +<p>
    3.58 +This chapter describes the construction and installation of some ncurses applications 
    3.59 +and libraries in SliTaz. The procedure consists of moving into the /src directory, 
    3.60 +downloading the sources for the application in question, unpacking, reading the README or 
    3.61 +INSTALL file(s), compiling and installing the binary in SliTaz. Once the applications 
    3.62 +are installed, we can create a new initramfs, copy it to the root of the cdrom and generate 
    3.63 +a new ISO image. For this you can also use <code>mktaziso</code> in 
    3.64 +<a href="http://www.slitaz.org/en/doc/cookbook/slitaz-tools.html">SliTaz tools</a>.
    3.65 +</p>
    3.66 +<h4>Assign an environment variable ($fs)</h4>
    3.67 +<p>
    3.68 +An environmental variable can't specify the path to the directory, just the name of the directory. 
    3.69 +We will affect a variable '$fs' to indicate the path to the root filesystem
    3.70 +(rootfs). To do this, we venture into the working directory SliTaz/, and type:
    3.71 +</p>
    3.72 +<pre> # export fs=$PWD/rootfs
    3.73 +</pre>
    3.74 +<p>
    3.75 +To check:
    3.76 +</p>
    3.77 +<pre> # echo $fs
    3.78 +</pre>
    3.79 +<a name="ncurses"></a>
    3.80 +<h3><font color="#6c0023">ncurses-5.6 - Terminal utilities and libraries</font></h3>
    3.81 +<p>
    3.82 +ncurses (<a href="http://dickey.his.com/ncurses/">dickey.his.com/ncurses/</a>) contains 
    3.83 +functions to display text in different ways on the screen of a Linux terminal and also provides 
    3.84 +the terminfo file. Ncurses libraries are used among others by retawq, nano and some games. 
    3.85 +We install the libraries in /lib and the rest in /usr/bin with a small strip to clean the executables:
    3.86 +</p>
    3.87 +<pre> # cd src
    3.88 + # wget ftp://invisible-island.net/ncurses/ncurses-5.6.tar.gz
    3.89 + # tar xzf ncurses-5.6.tar.gz
    3.90 + # cd ncurses-5.6
    3.91 + # ./configure --prefix=/usr \
    3.92 +   --libdir=/lib --sysconfdir=/etc \
    3.93 +   --infodir=/usr/share/info --mandir=/usr/share/man \
    3.94 +   --with-shared --without-debug --without-ada
    3.95 + # make
    3.96 + # make DESTDIR=$PWD/_pkg install
    3.97 + # strip -v _pkg/lib/*
    3.98 + # strip -v _pkg/usr/bin/*
    3.99 +</pre>
   3.100 +<p>
   3.101 +Copy the libncurses library and some applications in SliTaz. The reset utility is used at the end of 
   3.102 +the rcS initialization script to remove the Linux logo. If you wish, you can copy the associated utilities 
   3.103 +(tic, tack, toe, etc), being careful not to delete the link to BusyBox:
   3.104 +</p>
   3.105 +<pre> # cp -a _pkg/lib/libncurses.so* $fs/lib
   3.106 + # cp -ia _pkg/usr/bin/{clear,ncurses5-config,tset,reset} \
   3.107 +   $fs/usr/bin
   3.108 +</pre>
   3.109 +<p>
   3.110 +Copy terminfo files, we only use a few files. If you want more, you can copy:
   3.111 +</p>
   3.112 +<pre> # mkdir -v $fs/usr/share/terminfo
   3.113 + # mkdir -v $fs/usr/share/terminfo/{a,l,r,v,x}
   3.114 + # cp _pkg/usr/share/terminfo/a/ansi \
   3.115 +   $fs/usr/share/terminfo/a
   3.116 + # cp _pkg/usr/share/terminfo/l/linux \
   3.117 +   $fs/usr/share/terminfo/l
   3.118 + # cp _pkg/usr/share/terminfo/r/rxvt \
   3.119 +   $fs/usr/share/terminfo/r
   3.120 + # cp _pkg/usr/share/terminfo/x/{xterm,xterm-color,xterm-new,xterm-vt220} \
   3.121 +   $fs/usr/share/terminfo/x
   3.122 + # cp _pkg/usr/share/terminfo/v/{vt100,vt102*} \
   3.123 +   $fs/usr/share/terminfo/v
   3.124 +</pre>
   3.125 +<p>
   3.126 +Copy the tabset files:
   3.127 +</p>
   3.128 +<pre> # cp -a _pkg/usr/share/tabset $fs/usr/share
   3.129 +</pre>
   3.130 +<a name="clex"></a>
   3.131 +<h3><font color="#6c0023">clex-3.16 - File Manager</font></h3>
   3.132 +<p>
   3.133 +CLEX (<a href="http://www.clex.sk/">http://www.clex.sk/</a>) is a small ncurses file 
   3.134 +manager (160 KB). The configuration file (rc) is ~/clexrc; ~/.clexbm is used for 
   3.135 +bookmarks:
   3.136 +</p>
   3.137 +<pre> # cd ..
   3.138 + # wget http://www.clex.sk/download/clex-3.16.tar.gz
   3.139 + # tar xzf clex-3.16.tar.gz
   3.140 + # cd clex-3.16
   3.141 + # ./configure --prefix=/usr --infodir=/usr/share/info \
   3.142 +   --mandir=/usr/share/man
   3.143 + # make
   3.144 + # make DESTDIR=$PWD/_pkg install
   3.145 + # strip -v _pkg/usr/bin/clex
   3.146 +</pre>
   3.147 +<p>
   3.148 +Install the clex binary in the rootfs of SliTaz:
   3.149 +</p>
   3.150 +<pre> # cp _pkg/usr/bin/clex $fs/usr/bin
   3.151 +</pre>
   3.152 +<h4>libs</h4>
   3.153 +<p>
   3.154 +If we execute the <code>ldd</code> command on clex, the following dependancies should be displayed:
   3.155 +</p>
   3.156 +<pre class="script">        libncurses.so.5 =&gt; /lib/libncurses.so.5 (0x40025000)
   3.157 +        libc.so.6 =&gt; /lib/libc.so.6 (0x40064000)
   3.158 +        /lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0x40000000)
   3.159 +</pre>
   3.160 +<a name="nano"></a>
   3.161 +<h3><font color="#6c0023">nano-2.0.6 - Advanced Text Editor</font></h3>
   3.162 +<p>
   3.163 +GNU nano (<a href="http://www.nano-editor.org/">www.nano-editor.org</a>)  is a well known, 
   3.164 +fast, effective GNU/Linux text editor that supports colored syntax.
   3.165 +This is the default text editor in SliTaz:
   3.166 +</p>
   3.167 +<pre> # cd ..
   3.168 + # wget http://www.nano-editor.org/dist/v2.0/nano-2.0.6.tar.gz
   3.169 + # tar xzf nano-2.0.6.tar.gz
   3.170 + # cd nano-2.0.6
   3.171 + # ./configure --enable-all --enable-extra --prefix=/usr \
   3.172 +   --infodir=/usr/share/info --mandir=/usr/share/man \
   3.173 +   --sysconfdir=/etc
   3.174 + # make
   3.175 + # make DESTDIR=$PWD/_pkg install
   3.176 + # strip -v _pkg/usr/bin/nano
   3.177 +</pre>
   3.178 +<p>
   3.179 +Copy the nano binary and the rnano link in SliTaz:
   3.180 +</p>
   3.181 +<pre> # cp -a _pkg/usr/bin/* $fs/usr/bin
   3.182 +</pre>
   3.183 +<p>
   3.184 +Copy the configuration files in _pkg/usr/share/nano to our rootfs:
   3.185 +</p>
   3.186 +<pre> # cp -a _pkg/usr/share/nano $fs/usr/share
   3.187 +</pre>
   3.188 +<h4>libs</h4>
   3.189 +<p>
   3.190 +If we execute the <code>ldd</code> command on nano, the following dependancies 
   3.191 +should be displayed:
   3.192 +</p>
   3.193 +<pre class="script">        libncurses.so.5 =&gt; /lib/libncurses.so.5 (0x40025000)
   3.194 +        libc.so.6 =&gt; /lib/libc.so.6 (0x40064000)
   3.195 +        /lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0x40000000)
   3.196 +</pre>
   3.197 +<h4>locale</h4>
   3.198 +<p>
   3.199 +About the language, you can copy the .mo files created when installing nano from
   3.200 +/usr/share/locale/(fr,en,de,es,etc)/LC_MESSAGES to the rootfs. Example for the French language:
   3.201 +</p>
   3.202 +<pre> # cp -a _pkg/usr/share/locale/fr/LC_MESSAGES $fs/usr/share/locale/fr
   3.203 +</pre>
   3.204 +<h4>Customize nano</h4>
   3.205 +<p>
   3.206 +You can customize nano via /etc/nanorc or ~/.nanorc for each user of the system. It's in 
   3.207 +this file that you can define the colors used by nano through the files in /usr/share/nano. 
   3.208 +You will find a broad example of this file in the archive of nano and
   3.209 +<a href="http://www.slitaz.org/en/doc/cookbook/slitaz-tools.html">SliTaz tools</a>.
   3.210 +</p>
   3.211 +<p>
   3.212 +For a system configuration file, you can copy the file in SliTaz tools to /etc in the rootfs:
   3.213 +</p>
   3.214 +<pre> # cd ..
   3.215 + # cp -a slitaz-tools-1.1/etc/nanorc $fs/etc
   3.216 +</pre>
   3.217 +<a name="retawq"></a>
   3.218 +<h3><font color="#6c0023">retawq-0.2.6c - Text mode Web browser</font></h3>
   3.219 +<p>
   3.220 +retawq (<a href="http://retawq.sourceforge.net/">retawq.sourceforge.net</a>) 
   3.221 +is a small text-only web browser. We only flag a few useful options when configuring, 
   3.222 +retawq needs terminfo files, libncurses libraries and libthread:
   3.223 +</p>
   3.224 +<pre> # wget http://switch.dl.sourceforge.net/sourceforge/retawq/retawq-0.2.6c.tar.gz
   3.225 + # tar xzf retawq-0.2.6c.tar.gz
   3.226 + # cd retawq-0.2.6c
   3.227 + # ./configure --enable-i18n --enable-local-cgi --path-prefix=/usr \
   3.228 +   --path-doc=/usr/share/doc/retawq --path-man=/usr/share/man
   3.229 + # make
   3.230 + # strip -v retawq
   3.231 +</pre>
   3.232 +<p>
   3.233 +Copy the retawq binary in SliTaz:
   3.234 +</p>
   3.235 +<pre> # cp retawq $fs/usr/bin
   3.236 +</pre>
   3.237 +<h4>libs</h4>
   3.238 +<pre class="script">        libncurses.so.5 =&gt; /lib/libncurses.so.5 (0x40025000)
   3.239 +        libpthread.so.0 =&gt; /lib/libpthread.so.0 (0x40064000)
   3.240 +        libc.so.6 =&gt; /lib/libc.so.6 (0x40074000)
   3.241 +        /lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0x40000000)
   3.242 +</pre>
   3.243 +<p>
   3.244 +You can copy the lipthread library from your host system or use the minimum package 
   3.245 +glibc-2.3.6 distributed by SliTaz:
   3.246 +</p>
   3.247 +<pre> # cp -a /lib/libpthread* $fs/lib
   3.248 + # strip --strip-unneeded $fs/lib/*
   3.249 +</pre>
   3.250 +<h4>locale</h4>
   3.251 +<p>
   3.252 +For language, you can copy the .mo files in /i18n of the retawq archive to 
   3.253 +/usr/share/locale/(fr,en,es,etc)/LC_MESSAGES. Example for the French language, 
   3.254 +renaming the file to retawq.mo:
   3.255 +</p>
   3.256 +<pre> # cp -v i18n/fr.mo $fs/usr/share/locale/fr/LC_MESSAGES/retawq.mo
   3.257 +</pre>
   3.258 +<h4>Customize retawq</h4>
   3.259 +<p>
   3.260 +To personalize retawq, you can use a ~/.retawq directory containing a config file. 
   3.261 +You can also save bookmarks (html) in the root directory of the user. You will find an
   3.262 +examples/ in the archive of retawq (or SliTaz tools) containing a bookmarks.html 
   3.263 +page with a list of favorite web sites. You can also copy the docs (/documents) from retawq 
   3.264 +to /usr/share/doc/retawq.
   3.265 +</p>
   3.266 +<a name="htop"></a>
   3.267 +<h3><font color="#6c0023">htop-6.0.5 - System process viewer</font></h3>
   3.268 +<p>
   3.269 +
   3.270 +htop (<a href="http://htop.sourceforge.net/">htop.sourceforge.net/</a>) is software 
   3.271 +that displays system processes using ncurses.
   3.272 +</p>
   3.273 +<p>
   3.274 +Returning to the /src directory, download, unpack, configure, compile and clean (with strip):
   3.275 +</p>
   3.276 +<pre> # cd ..
   3.277 + # wget http://switch.dl.sourceforge.net/sourceforge/htop/htop-0.6.5.tar.gz
   3.278 + # tar xzf htop-0.6.5.tar.gz
   3.279 + # cd htop-0.6.5
   3.280 + # ./configure --prefix=/usr --mandir=/usr/share/man
   3.281 + # make
   3.282 + # make DESTDIR=$PWD/_pkg install
   3.283 + # strip -v _pkg/usr/bin/htop
   3.284 +</pre>
   3.285 +<p>
   3.286 +Copy the htop binary in SliTaz:
   3.287 +</p>
   3.288 +<pre> # cp _pkg/usr/bin/htop $fs/usr/bin
   3.289 +</pre>
   3.290 +<p>
   3.291 +You can still copy the htop icon found in: _pkg/usr/share/pixmaps.
   3.292 +</p>
   3.293 +<h4>libs</h4>
   3.294 +<pre class="script">        libm.so.6 =&gt; /lib/libm.so.6 (0xb7f97000)
   3.295 +        libncurses.so.5 =&gt; /lib/libncurses.so.5 (0xb7f55000)
   3.296 +        libc.so.6 =&gt; /lib/libc.so.6 (0xb7e20000)
   3.297 +        /lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0xb7fc9000)
   3.298 +</pre>
   3.299 +<a name="dialog"></a>
   3.300 +<h3><font color="#6c0023">dialog-1.1.20070409 - GUI shell scripts</font></h3>
   3.301 +<p>
   3.302 +
   3.303 +dialog (<a href="http://invisible-island.net/dialog/dialog.html">invisible-island.net/dialog/dialog.html</a>), 
   3.304 +is a utility to build GUI-based consoles:
   3.305 +</p>
   3.306 +<pre> # cd ..
   3.307 + # wget ftp://invisible-island.net/dialog/dialog.tar.gz
   3.308 + # tar xzf dialog.tar.gz
   3.309 + # cd dialog-1.1-20070409
   3.310 + # ./configure --enable-nls --with-ncurses --prefix=/usr \
   3.311 +   --sysconfdir=/etc --mandir=/usr/share/man
   3.312 + # make
   3.313 + # make DESTDIR=$PWD/_pkg install
   3.314 + # strip -v _pkg/usr/bin/dialog
   3.315 +</pre>
   3.316 +<p>
   3.317 +Copy dialog binary in SliTaz:
   3.318 +</p>
   3.319 +<pre> # cp _pkg/usr/bin/dialog $fs/usr/bin
   3.320 +</pre>
   3.321 +<h4>libs</h4>
   3.322 +<pre class="script">        libncurses.so.5 =&gt; /lib/libncurses.so.5 (0x40027000)
   3.323 +        libm.so.6 =&gt; /lib/libm.so.6 (0x40066000)
   3.324 +        libc.so.6 =&gt; /lib/libc.so.6 (0x40089000)
   3.325 +        /lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0x40000000)
   3.326 +</pre>
   3.327 +<h4>locale</h4>
   3.328 +<p>
   3.329 +You can install locale files if you wish:  
   3.330 +</p>
   3.331 +<pre> # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
   3.332 +</pre>
   3.333 +<p>
   3.334 +The dialog configuration file is /etc/dialogrc and/or ~/.dialogrc for each user.
   3.335 +There are also full examples of scripts in the /sample directory in the sources of dialog.
   3.336 +</p>
   3.337 +<a name="ninvaders"></a>
   3.338 +<h3><font color="#6c0023">Ninvaders-0.1.1 - Space Invaders clone</font></h3>
   3.339 +<p>
   3.340 +
   3.341 +ninvaders (<a href="http://ninvaders.sourceforge.net/">http://ninvaders.sourceforge.net/</a>) 
   3.342 +is a clone of the popular Space Invaders game (46 KB). We begin by placing ourselves in the 
   3.343 +/src directory, then we download, untar, compile, clean using strip and copy the nInvaders binary 
   3.344 +in /usr/games of SliTaz:
   3.345 +</p>
   3.346 +<pre> # cd ..
   3.347 + # wget http://ovh.dl.sourceforge.net/sourceforge/ninvaders/ninvaders-0.1.1.tar.gz
   3.348 + # tar xzf ninvaders-0.1.1.tar.gz
   3.349 + # cd ninvaders-0.1.1
   3.350 + # make
   3.351 + # strip -v nInvaders
   3.352 + # cp nInvaders $fs/usr/games
   3.353 +</pre>
   3.354 +<a name="bastet"></a>
   3.355 +<h3><font color="#6c0023">bastet-0.41 -  Bastard Tetris clone</font></h3>
   3.356 +<p>
   3.357 +A game of Tetris (17 KB):
   3.358 +</p>
   3.359 +<pre> # wget http://fph.altervista.org/prog/bastet-0.41.tgz
   3.360 + # tar xzf bastet-0.41.tgz
   3.361 + # cd bastet-0.41
   3.362 + # make
   3.363 + # strip bastet
   3.364 + # cp bastet $fs/usr/games
   3.365 + # mkdir -p $fs/var/games
   3.366 + # touch $fs/var/games/bastet.scores
   3.367 + # chmod 666 $fs/var/games/bastet.scores
   3.368 +</pre>
   3.369 +<a name="rhapsody"></a>
   3.370 +<h3><font color="#6c0023">rhapsody-0.28b - IRC chat client</font></h3>
   3.371 +<p>
   3.372 +Rhapsody (<a href="http://rhapsody.sourceforge.net/">http://rhapsody.sourceforge.net/</a>) 
   3.373 +is a fast and lightweight chat client supporting the IRC protocol. It provides a menu for 
   3.374 +managing servers, channels and configuration. It is therefore easy to use:
   3.375 +</p>
   3.376 +<pre> # cd ..
   3.377 + # wget http://switch.dl.sourceforge.net/sourceforge/rhapsody/rhapsody_0.28b.tgz
   3.378 + # tar xzf rhapsody_0.28b.tgz
   3.379 + # cd rhapsody-0.28b
   3.380 + # ./configure -i /usr/bin -d /usr/share/doc/rhapsody
   3.381 + # make
   3.382 + # strip -v rhapsody
   3.383 +</pre>
   3.384 +<p>
   3.385 +Install the binary and help files in SliTaz. We must adjust permissions on 
   3.386 +these files so that everyone can read:
   3.387 +</p>
   3.388 +<pre> # cp rhapsody $fs/usr/bin
   3.389 + # mkdir $fs/usr/share/doc/rhapsody
   3.390 + # cp -a help $fs/usr/share/doc/rhapsody/help
   3.391 + # chmod 644 $fs/usr/share/doc/rhapsody/help/*
   3.392 +</pre>
   3.393 +<h4>libs</h4>
   3.394 +<p>
   3.395 +Rhapsody uses the following libraries:
   3.396 +</p>
   3.397 +<pre class="script">        libncurses.so.5 =&gt; /lib/libncurses.so.5 (0x40026000)
   3.398 +        libc.so.6 =&gt; /lib/libc.so.6 (0x40066000)
   3.399 +        /lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0x40000000))
   3.400 +</pre>
   3.401 +<h4>Rhapsody use the following libraries:</h4>
   3.402 +<p>
   3.403 +You can customize rhapsody via ~/.rhapsodyrc or use &lt;Ctrl+T&gt;  for options:
   3.404 +</p>
   3.405 +<a name="initramfs-iso"></a>
   3.406 +<h3><font color="#6c0023">Generate the initramfs and an ISO image</font></h3>
   3.407 +<p>
   3.408 +To create a new ISO image, you can use 'mktaziso' in SliTaz tools.  
   3.409 +Or you can create a new initramfs image, copy it to /boot in the root of the cdrom
   3.410 +(rootcd) and finally generate an ISO image with genisoimage:
   3.411 +</p>
   3.412 +<pre> # cd $fs
   3.413 + # find . -print | cpio -o -H newc | gzip -9 &gt; ../rootfs.gz
   3.414 + # cd ..
   3.415 + # cp rootfs.gz rootcd/boot
   3.416 + # genisoimage -R -o slitaz-cooking.iso -b boot/isolinux/isolinux.bin \
   3.417 +   -c boot/isolinux/boot.cat -no-emul-boot -boot-load-size 4 \
   3.418 +   -V "SliTaz" -input-charset iso8859-1 -boot-info-table rootcd
   3.419 +</pre>
   3.420 +<h4>Following chapter</h4>
   3.421 +<p>
   3.422 +The next chapter describes the installation of the
   3.423 +<a href="locale.html">locales</a>
   3.424 +and i18n.
   3.425 +</p>
   3.426 +
   3.427 +
   3.428 +<!-- End of content -->
   3.429 +</div>
   3.430 +
   3.431 +<!-- Footer. -->
   3.432 +<div id="footer">
   3.433 +	<div class="footer-right"></div>
   3.434 +	<a href="#top">Top of the page</a> | 
   3.435 +	<a href="index.html">Table of contents</a>
   3.436 +</div>
   3.437 +
   3.438 +<div id="copy">
   3.439 +    Copyright &copy; 2008 <a href="http://www.slitaz.org/en/">SliTaz</a> -
   3.440 +    <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>;<br />
   3.441 +    Documentation is under
   3.442 +    <a href="http://www.gnu.org/copyleft/fdl.html">GNU Free Documentation License</a>
   3.443 +    and code is <a href="http://validator.w3.org/">valid xHTML 1.0</a>.
   3.444 +</div>
   3.445 +
   3.446 +</body>
   3.447 +</html>
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/pt/doc/scratchbook/base-system.html	Fri Jan 30 18:32:32 2009 +0000
     4.3 @@ -0,0 +1,675 @@
     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 - Base System</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="index.html">Table of contents</a> |
    4.25 +    <a href="base-apps.html">Base apps</a>
    4.26 +</div>
    4.27 +<h1><font color="#3E1220">SliTaz Scratchbook</font></h1>
    4.28 +</div>
    4.29 +
    4.30 +<!-- Content. -->
    4.31 +<div id="content">
    4.32 +<div class="content-right"></div>
    4.33 +
    4.34 +
    4.35 +<h2><font color="#df8f06">Base System</font></h2>
    4.36 +<p>
    4.37 +Build a SliTaz GNU/Linux distro running in RAM and using BusyBox.
    4.38 +</p>
    4.39 +<ul>
    4.40 +    <li><a href="#about">About.</a></li>
    4.41 +    <li><a href="#src">Wget src.</a></li>
    4.42 +    <li><a href="#prepa">Unpack and prepare the Linux kernel.</a></li>
    4.43 +    <li><a href="#rootfs">Creation of the Root System</a>, the root
    4.44 +     file System (rootfs).</li>
    4.45 +    <li><a href="#config">Configure the box.</a></li>
    4.46 +    <li><a href="#initramfs">Generate the initramfs</a>, compressed cpio archive.</li>
    4.47 +    <li><a href="#rootcd">Construction of the root of the cdrom</a> (rootcd), and the 
    4.48 +    configuration files of Syslinux.</li>
    4.49 +    <li><a href="#mkiso">Create an ISO image with genisoimage or mkisofs.</a></li>
    4.50 +    <li><a href="#testiso">Burn or test the ISO with Qemu.</a></li>
    4.51 +</ul>
    4.52 +<a name="about"></a>
    4.53 +<h3><font color="#6c0023">About</font></h3>
    4.54 +<p>
    4.55 +This document describes the construction of the SliTaz base system and why we use a
    4.56 +Linux Kernel, BusyBox and Syslinux to boot the system. SliTaz uses an initramfs 
    4.57 +archive unpacked in RAM by the kernel at boot. We will create a box to hold a 
    4.58 +root of 3 to 4MB and use strip on the libraries and binaries to save space.
    4.59 +</p>
    4.60 +<p>
    4.61 +The scripts and configuration files are created with GNU nano, using the keystroke 
    4.62 +&lt;ctrl+x&gt; to save and exit. But of course you are free to replace with your own text editor.
    4.63 +</p>
    4.64 +<p>
    4.65 +This document is based on a howto found in the archive of BusyBox, which is itself based on 
    4.66 +a paper presented by Erik Anderson in the Embedded Systems Conference in 2001.
    4.67 +</p>
    4.68 +<a name="src"></a>
    4.69 +<h3><font color="#6c0023">Wget src</font></h3>
    4.70 +<p>
    4.71 +Create a src directory for downloading and compiling:
    4.72 +</p>
    4.73 +<pre> # mkdir -p src
    4.74 + # cd src
    4.75 +</pre>
    4.76 +<ul>
    4.77 +    <li>Linux Kernel 2.6.20
    4.78 +    (<a href="http://www.kernel.org/">http://www.kernel.org/</a>).
    4.79 +    <pre># wget ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.20.tar.bz2</pre>
    4.80 +    </li>
    4.81 +    <li>Busybox 1.2.2
    4.82 +    (<a href="http://www.busybox.net/">http://www.busybox.net/</a>).
    4.83 +    <pre># wget http://www.busybox.net/downloads/busybox-1.2.2.tar.bz2</pre>
    4.84 +    </li>
    4.85 +    <li>Syslinux 3.35
    4.86 +    (<a href="http://syslinux.zytor.com/">http://syslinux.zytor.com/</a>).
    4.87 +    <pre># wget ftp://ftp.kernel.org/pub/linux/boot/syslinux/syslinux-3.35.tar.gz</pre>
    4.88 +    </li>
    4.89 +    <li>SliTaz tools 1.1. Download SliTaz tools, unpack, save the file in src/ and that's it:
    4.90 +	<pre> # wget http://download.tuxfamily.org/slitaz/sources/tools/slitaz-tools-1.1.tar.gz
    4.91 + # tar xzf slitaz-tools-1.1.tar.gz</pre>
    4.92 +    </li>
    4.93 +</ul>
    4.94 +<a name="prepa"></a>
    4.95 +<h3><font color="#6c0023">Unpack and prepare the Linux Kernel</font></h3>
    4.96 +<p>
    4.97 +We will begin by compiling a Linux kernel, which may take a little time.
    4.98 +</p>
    4.99 +<h4>Linux Kernel</h4>
   4.100 +<p>
   4.101 +Your kernel must support the intramfs filesystem, otherwise the cdrom will not start. You can 
   4.102 +also install the modules in a directory so as not to touch the host system. The configuration 
   4.103 +of the Linux kernel sources is done by <code>make menuconfig</code> using ncurses or graphically 
   4.104 +with <code>make gconfig</code> or <code>make xconfig</code> using GTK development packages and/or 
   4.105 +QT respectively. You can find in <a href="http://www.slitaz.org/en/doc/cookbook/slitaz-tools.html">SliTaz tools</a>,
   4.106 +Makefiles for the various 2.6.xx kernels.
   4.107 +</p>
   4.108 +<p>
   4.109 +A feature of the 2.6 kernels is that if we make menuconfig, xconfig or config for the first time, 
   4.110 +the setup menu is displayed based on the configuration of our current kernel.
   4.111 +</p>
   4.112 +<p>
   4.113 +The options depend on your needs, you can install module-init-tools to support compressed modules 
   4.114 +or for a minimal install, you can select only the vital options.
   4.115 +</p>
   4.116 +<p>
   4.117 +We start by changing into the sources, <code>make mrproper</code> to put things in order, then we start a 
   4.118 +configuration interface: gconfig, xconfig, menuconfig or oldconfig:
   4.119 +</p>
   4.120 +<pre> # tar xjf linux-2.6.20.tar.bz2
   4.121 + # cd linux-2.6.20
   4.122 + # make mrproper
   4.123 + # cp ../slitaz-tools-1.1/Makefiles/linux-2.6.20-slitaz.config .config
   4.124 + # make oldconfig
   4.125 + (# make menuconfig)
   4.126 + # make bzImage
   4.127 + # make modules
   4.128 + # make INSTALL_MOD_PATH=$PWD/_pkg modules_install
   4.129 + # cd ..
   4.130 +</pre>
   4.131 +<p>
   4.132 +If you want more info on compiling kernels, there are many textbooks. Note that you can install the 
   4.133 +kernel and after rebooting, you can compile your own kernel following the same instructions.
   4.134 +</p>
   4.135 +<a name="rootfs"></a>
   4.136 +<h3><font color="#6c0023">Creation of the root system (rootfs)</font></h3>
   4.137 +<p>
   4.138 +The next step will create a file named 'rootfs' - Root File System, in the working directory SliTaz/:
   4.139 +</p>
   4.140 +<pre> # mkdir ../rootfs
   4.141 +</pre>
   4.142 +<h4>Install BusyBox</h4>
   4.143 +<p>
   4.144 +BusyBox (<a href="http://www.busybox.net/">www.busybox.net</a>) is a single executable offering 
   4.145 +versions of the main tools necessary to use a Linux kernel. It is (mainly) intended to be used 
   4.146 +embedded and can do almost anything. As well as proposing (coreutils) shell commands and a daemons 
   4.147 +system, it also provides a websever and client/server (DHCP, udhcpc).
   4.148 +</p>
   4.149 +<pre> # tar xjf busybox-1.2.2.tar.bz2
   4.150 +</pre>
   4.151 +<p>
   4.152 +Configure and compile, remembering the dumpkmap options, init, etc - you can find help in the Makefile in 
   4.153 +SliTaz Busybox tools. Make install creates a _install directory in the current directory:
   4.154 +</p>
   4.155 +<pre> # cd busybox-1.2.2
   4.156 + # cp ../slitaz-tools-1.1/Makefiles/busybox-1.2.2.config .config
   4.157 + # make oldconfig
   4.158 + (# make menuconfig)
   4.159 + # make
   4.160 + # make install
   4.161 + # chmod 4755 _install/bin/busybox
   4.162 +</pre>
   4.163 +<p>
   4.164 +Copy files compiled by BusyBox in the directory _install to the root file system (rootfs):
   4.165 +</p>
   4.166 +<pre> # cp -a _install/* ../../rootfs
   4.167 +</pre>
   4.168 +<p>
   4.169 +The linuxrc link pointing to /bin/busybox, folders /bin, /lib and /sbin were added to the directory
   4.170 +/rootfs - you can check this. It may be that the link isn't there if you didn't select the option
   4.171 +initrd support in Busybox. We'll delete the linuxrc link and create a link for init that points to 
   4.172 +/bin/busybox:
   4.173 +</p>
   4.174 +<pre> # cd ../../rootfs
   4.175 + # ls -CF
   4.176 + bin/  linuxrc@  sbin/  usr/
   4.177 +
   4.178 + # rm linuxrc
   4.179 + # ln -s bin/busybox init
   4.180 +</pre>
   4.181 +<h4>ldd on BusyBox</h4>
   4.182 +<p>
   4.183 +The ldd command can show any libraries used by a program. Libraries used by Busybox may differ 
   4.184 +depending on the host system. On Debian for example, copying the libraries in /lib/tls. The following 
   4.185 +commands are given using 'v' for verbose mode. To eliminate the symbols of executable binaries
   4.186 +and shared libraries we can utilize strip. Note you may also use the mklibs or uClibc libraries.
   4.187 +</p>
   4.188 +<pre> # mkdir lib
   4.189 +</pre>
   4.190 +<p>
   4.191 +SliTaz or another:
   4.192 +</p>
   4.193 +<pre> # cp /lib/{libcrypt.so.1,libm.so.6,libc.so.6} lib
   4.194 + # cp /lib/ld-linux.so.2 lib
   4.195 +</pre>
   4.196 +<p>
   4.197 +Example on Debian Etch:
   4.198 +</p>
   4.199 +<pre> # cp /lib/tls/{libcrypt.so.1,libm.so.6,libc.so.6} lib
   4.200 + # cp /lib/ld-linux.so.2 lib
   4.201 +</pre>
   4.202 +<p>
   4.203 +Cleanup libraries with strip:
   4.204 +</p>
   4.205 +<pre> # strip -v lib/*
   4.206 +</pre>
   4.207 +<h4>Linux tree and configuration</h4>
   4.208 +<p>
   4.209 +Make some directories for a classic Linux branch SliTaz installation. /dev for devices, /etc, /home, 
   4.210 +/usr, /proc, /root and co. To learn more about the hierarchy of a file system and its contents, 
   4.211 +there is a File System Hierarchy Standard available in various formats at 
   4.212 +<a href="http://www.pathname.com/fhs/">www.pathname.com/fhs/</a>.
   4.213 +</p>
   4.214 +<p>
   4.215 +You are free to create your own directory tree. In traditional Unix systems, /usr usually contains
   4.216 +files from the distribution, /dev contains devices (devices), /etc contains configuration files,
   4.217 +/lib libraries, /home for home users and /var for variable data. Note that we do not create 
   4.218 +/lib, /bin or /sbin - these are created when BusyBox is installed.
   4.219 +</p>
   4.220 +<pre> # mkdir -p dev etc root home proc media mnt sys tmp var
   4.221 + # mkdir -p usr/{lib,local,games,share} \
   4.222 +   var/{cache,lib,lock,log,games,run,spool} \
   4.223 +   media/{cdrom,flash,usbdisk}
   4.224 +</pre>
   4.225 +<p>
   4.226 +Change permissions on the /tmp directory:
   4.227 +</p>
   4.228 +<pre> # chmod 1777 tmp
   4.229 +</pre>
   4.230 +<p>
   4.231 +Setting up glibc - note /etc/ld.so.conf and /etc/rpc are not essential for a micro system:
   4.232 +</p>
   4.233 +<pre> # touch etc/ld.so.conf
   4.234 + # cp /etc/rpc etc
   4.235 +</pre>
   4.236 +<h4>Create the devices in /dev</h4>
   4.237 +<p>
   4.238 +This can be done with the script 'mkdevs.sh' found in BusyBox, or with our script 'mktazdevs.sh' in
   4.239 +SliTaz tools. If you want more details, read the scripts. If you use the BusyBox version, we must
   4.240 +still create the pts directory:
   4.241 +</p>
   4.242 +<pre> # cp ../src/slitaz-tools-1.1/utils/mktazdevs.sh bin
   4.243 + # ./bin/mktazdevs.sh dev
   4.244 +or:
   4.245 + # cp ../src/busybox-1.2.2/examples/bootfloppy/mkdevs.sh bin
   4.246 + # ./bin/mkdevs.sh dev
   4.247 + # mkdir -p dev/{pts,input,shm,net,usb}
   4.248 +</pre>
   4.249 +<p>
   4.250 +Note that we start mdev-s with the rcS script to create devices dynamically at boot.
   4.251 +</p>
   4.252 +<h4>Support for the resolution of hostnames (DNS)</h4>
   4.253 +<p>
   4.254 +Copy the libraries libnss_* of the host system into our SliTaz system. These libraries are used for
   4.255 +name resolution and are cleaned with strip:
   4.256 +</p>
   4.257 +<pre> # cp /lib/{libnss_dns.so.2,libnss_files.so.2} lib
   4.258 + # cp /lib/libresolv.so.2 lib
   4.259 + # strip -v lib/*.so*
   4.260 +</pre>
   4.261 +<a name="config"></a>
   4.262 +<h3><font color="#6c0023">Configuration of your box</font></h3>
   4.263 +<p>
   4.264 +Create the necessary files in /etc. For more info, just look at the contents of the files. 
   4.265 +We start by creating some files relevant to the core operating system.
   4.266 +</p>
   4.267 +<h4>Network</h4>
   4.268 +<p>
   4.269 +Create basic files used to configure the network:
   4.270 +</p>
   4.271 +<pre> # echo "127.0.0.1      localhost" &gt; etc/hosts
   4.272 + # echo "localnet    127.0.0.1" &gt; etc/networks
   4.273 + # echo "slitaz" &gt; etc/hostname
   4.274 + # echo "order hosts,bind" &gt; etc/host.conf
   4.275 + # echo "multi on" &gt;&gt; etc/host.conf
   4.276 +</pre>
   4.277 +<h4>/etc/nsswitch.conf</h4>
   4.278 +<p>
   4.279 +Configuration files used to resolve names:
   4.280 +</p>
   4.281 +<pre> # nano etc/nsswitch.conf
   4.282 +</pre>
   4.283 +<pre class="script"># /etc/nsswitch.conf: GNU Name Service Switch config.
   4.284 +#
   4.285 +
   4.286 +passwd:     files
   4.287 +group:      files
   4.288 +shadow:     files
   4.289 +
   4.290 +hosts:      files dns
   4.291 +networks:   files
   4.292 +
   4.293 +</pre>
   4.294 +<h4>/etc/securetty</h4>
   4.295 +<p>
   4.296 +/etc/securetty lists terminals that can connect to root:
   4.297 +</p>
   4.298 +<pre> # nano etc/securetty
   4.299 +</pre>
   4.300 +<pre class="script"># /etc/securetty: List of terminals on which root is allowed to login.
   4.301 +#
   4.302 +console
   4.303 +
   4.304 +# For people with serial port consoles
   4.305 +ttyS0
   4.306 +
   4.307 +# Standard consoles
   4.308 +tty1
   4.309 +tty2
   4.310 +tty3
   4.311 +tty4
   4.312 +tty5
   4.313 +tty6
   4.314 +tty7
   4.315 +
   4.316 +</pre>
   4.317 +<h4>/etc/shells</h4>
   4.318 +<p>
   4.319 +/etc/shells, a shells list of valid connections. This file is used by the SSH server (Dropbear):
   4.320 +</p>
   4.321 +<pre> # nano etc/shells
   4.322 +</pre>
   4.323 +<pre class="script"># /etc/shells: valid login shells.
   4.324 +/bin/sh
   4.325 +/bin/ash
   4.326 +/bin/hush
   4.327 +
   4.328 +</pre>
   4.329 +<h4>/etc/issue and /etc/motd</h4>
   4.330 +<p>
   4.331 +/etc/issue is displayed at the end of boot and the message of the day is displayed after logging in:
   4.332 +</p>
   4.333 +<pre> # echo "SliTaz GNU/Linux 1.0 Kernel \r \l" &gt; etc/issue
   4.334 + # echo "" &gt;&gt; etc/issue
   4.335 + # nano etc/motd
   4.336 +</pre>
   4.337 +<pre class="script">
   4.338 + (°-  { Get documentation in: /usr/share/doc.
   4.339 + //\    Use: 'less' or 'more' to read files, 'su' to be root. }
   4.340 + v_/_
   4.341 +
   4.342 +SliTaz is distributed in the hope that it will be useful, but
   4.343 +with ABSOLUTELY NO WARRANTY.
   4.344 +
   4.345 +</pre>
   4.346 +<h4>/etc/busybox.conf</h4>
   4.347 +<p>
   4.348 +The configuration file for BusyBox, it can set duties on BusyBox applications. For more information, you can read the
   4.349 +<a href="http://www.slitaz.org/en/doc/handbook/security.html">security</a> page in the Handbook. BusyBox.conf file:
   4.350 +
   4.351 +</p>
   4.352 +<pre> # nano etc/busybox.conf
   4.353 +</pre>
   4.354 +<pre class="script"># /etc/busybox.conf: SliTaz GNU/linux Busybox configuration.
   4.355 +#
   4.356 +
   4.357 +[SUID]
   4.358 +# Allow command to be run by anyone.
   4.359 +su = ssx root.root
   4.360 +passwd = ssx root.root
   4.361 +loadkmap = ssx root.root
   4.362 +mount = ssx root.root
   4.363 +reboot = ssx root.root
   4.364 +halt = ssx root.root
   4.365 +
   4.366 +</pre>
   4.367 +<p>
   4.368 +For added security, change the permissions on the file:
   4.369 +</p>
   4.370 +<pre> # chmod 600 etc/busybox.conf
   4.371 +</pre>
   4.372 +<h4>/etc/inittab</h4>
   4.373 +<p>
   4.374 +Minimal configuration file for init. It helps to have a root console without having to 
   4.375 +go through the login and a console on tty2.
   4.376 +</p>
   4.377 +<pre> # nano etc/inittab
   4.378 +</pre>
   4.379 +<pre class="script"># /etc/inittab: init configuration for SliTaz GNU/Linux.
   4.380 +
   4.381 +::sysinit:/etc/init.d/rcS
   4.382 +::respawn:-/bin/sh
   4.383 +tty2::askfirst:-/bin/sh
   4.384 +::ctrlaltdel:/bin/umount -a -r
   4.385 +::ctrlaltdel:/sbin/reboot
   4.386 +
   4.387 +</pre>
   4.388 +<p>
   4.389 +You will also find a wider example of an inittab file in the archive of BusyBox.
   4.390 +</p>
   4.391 +<h4>/etc/profile</h4>
   4.392 +<p>
   4.393 +This file is read at each login and affects all users. We must use the ./profile 
   4.394 +config file for each individual user:
   4.395 +</p>
   4.396 +<pre> # nano etc/profile
   4.397 +</pre>
   4.398 +<pre class="script"># /etc/profile: system-wide .profile file for the Bourne shells
   4.399 +
   4.400 +PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
   4.401 +LD_LIBRARY_PATH="/usr/lib:/lib"
   4.402 +
   4.403 +if [ "`id -u`" -eq 0 ]; then
   4.404 +  PS1='\e[1m\u@\h:\w\#\e[m '
   4.405 +else
   4.406 +  PS1='\e[1m\u@\h:\w\$\e[m '
   4.407 +fi
   4.408 +
   4.409 +DISPLAY=:0.0
   4.410 +
   4.411 +export PATH LD_LIBRARY_PATH PS1 DISPLAY ignoreeof
   4.412 +umask 022
   4.413 +
   4.414 +</pre>
   4.415 +<h4>Users, groups and passwords</h4>
   4.416 +<p>
   4.417 +Create configuration files of users, groups and passwords in /etc/ {passwd, shadow, group, gshadow}, and adjust permissions:
   4.418 +</p>
   4.419 +<pre> # echo "root:x:0:0:root:/root:/bin/sh" &gt; etc/passwd
   4.420 + # echo "root::13525:0:99999:7:::" &gt; etc/shadow
   4.421 + # echo "root:x:0:" &gt; etc/group
   4.422 + # echo "root:*::" &gt; etc/gshadow
   4.423 + # chmod 640 etc/shadow
   4.424 + # chmod 640 etc/gshadow
   4.425 +</pre>
   4.426 +<p>
   4.427 +You can add other users, like hacker is used by the LiveCD mode. You can also configure a password for the root user 
   4.428 +with the <code>passwd</code> command. To add an existing user to an existing group, you must edit /etc/group and /etc/gshadow because 
   4.429 +the applet <code>adduser</code> provided by BusyBox doesn't offer all of the options provided by the original program.
   4.430 +</p>
   4.431 +<h4>/etc/fstab or /etc/mtab</h4>
   4.432 +<p>
   4.433 +List filesystems to be mounted:
   4.434 +</p>
   4.435 +<pre> # nano etc/fstab
   4.436 +</pre>
   4.437 +<pre class="script"># /etc/fstab: information about static file system.
   4.438 +#
   4.439 +proc            /proc        proc    defaults          0       0
   4.440 +sysfs           /sys         sysfs   defaults          0       0
   4.441 +devpts          /dev/pts     devpts  defaults          0       0
   4.442 +tmpfs           /dev/shm     tmpfs   defaults          0       0
   4.443 +
   4.444 +</pre>
   4.445 +<p>
   4.446 +/etc/mtab is used by other mkfs*, for listing the mounted partitions. It needs /proc because there is a link on /proc/mounts:
   4.447 +</p>
   4.448 +<pre> # chroot . /bin/ash
   4.449 + /# ln -s /proc/mounts /etc/mtab
   4.450 +</pre>
   4.451 +<h4>Keyboard</h4>
   4.452 +<p>
   4.453 +You can create a kmap file specific to your keyboard with the dumpkmap command provided by BusyBox. 
   4.454 +You can find some kmap files in SliTaz tools. To create a fr_CH kmap file:
   4.455 +</p>
   4.456 +<pre> /# mkdir /usr/share/kmap
   4.457 + /# /bin/busybox dumpkmap &gt; /usr/share/kmap/fr_CH.kmap
   4.458 + /# exit
   4.459 +</pre>
   4.460 +<p>
   4.461 +Once this is done, you can automatically load your keyboard with loadkmap in a /etc/init.d/rcS script:
   4.462 +</p>
   4.463 +<h4>/usr/share/doc</h4>
   4.464 +<p>
   4.465 +You can also add various documents, such as a SliTaz user manual, which you can download as a tar.gz from the website:
   4.466 +</p>
   4.467 +<pre> # mkdir -p usr/share/doc
   4.468 +</pre>
   4.469 +<h4>Installing the udhcpc script</h4>
   4.470 +<p>
   4.471 +Udhcpc DHCP client supplied by Busybox is fast and stable, but is developed independently. 
   4.472 +Web site: <a href="http://udhcp.busybox.net/">http://udhcp.busybox.net/</a>. You can use the default 
   4.473 +script found in the archive of BusyBox. This script goes into /usr/share/udhcpc/default.script, 
   4.474 +but this can be changed via the command line. On SliTaz, the client is started at boot by the script 
   4.475 +/etc/init.d/network.sh via the configuration file /etc/network.conf:
   4.476 +</p>
   4.477 +<pre> # mkdir usr/share/udhcpc
   4.478 + # cp ../src/busybox-1.2.2/examples/udhcp/simple.script \
   4.479 +   usr/share/udhcpc/default.script
   4.480 + # chmod +x usr/share/udhcpc/default.script
   4.481 +</pre>
   4.482 +<h4>/etc/init.d/rcS</h4>
   4.483 +<p>
   4.484 +To finish off this draft, you must create the init script /etc/init.d/rcS to mount the filesystems 
   4.485 +and run some commands. For more information, you can look at the
   4.486 +<a href="http://www.slitaz.org/en/doc/cookbook/boot-scripts.html">boot scripts</a> page.
   4.487 +You can change the value of the variable KMAP= for the keyboard:
   4.488 +</p>
   4.489 +<pre> # mkdir etc/init.d
   4.490 + # nano etc/init.d/rcS
   4.491 +</pre>
   4.492 +<pre class="script">#! /bin/sh
   4.493 +# /etc/init.d/rcS: rcS initial script.
   4.494 +#
   4.495 +
   4.496 +KMAP=fr_CH
   4.497 +
   4.498 +echo "Processing /etc/init.d/rcS... "
   4.499 +
   4.500 +/bin/mount proc
   4.501 +/bin/mount -a
   4.502 +/bin/hostname -F /etc/hostname
   4.503 +/sbin/ifconfig lo 127.0.0.1 up
   4.504 +/sbin/loadkmap &lt; /usr/share/kmap/$KMAP.kmap
   4.505 +
   4.506 +
   4.507 +</pre>
   4.508 +<pre> # chmod +x etc/init.d/rcS
   4.509 +</pre>
   4.510 +<h4>Note</h4>
   4.511 +<p>
   4.512 +Note that you can still install the tazpkg package manager (10 kb) that we created,
   4.513 +you will find information to install in the source tarball. You can also install various 
   4.514 +files from SliTaz tools, such as the licence.
   4.515 +</p>
   4.516 +
   4.517 +<a name="initramfs"></a>
   4.518 +<h3><font color="#6c0023">Build an initramfs cpio archive</font></h3>
   4.519 +<p>
   4.520 +The initramfs is a <code>cpio</code> archive generated from the root of the system, 
   4.521 +it is decompressed in RAM by the Linux kernel at boot to create the filesystem (also in RAM). 
   4.522 +To generate an initramfs archive, using the root directory of system files (rootfs), we 
   4.523 +facilitate a search with <code>find</code> and add some pipes <code>|</code>. 
   4.524 +Then we create a cpio archive using <code>gzip</code> which we put in the working directory.
   4.525 +</p>
   4.526 +<p>
   4.527 +The SliTaz initramfs <strong>rootfs.gz</strong> is the root system, but with a <code>.gz</code> 
   4.528 +extension. If you want to change the name, you need to edit the configuration file for 
   4.529 +isolinux: isolinux.cfg or the menu.lst for GRUB.
   4.530 +</p>
   4.531 +<p>
   4.532 +Generation of the initramfs:
   4.533 +</p>
   4.534 +<pre> # find . -print | cpio -o -H newc | gzip -9 &gt; ../rootfs.gz
   4.535 +</pre>
   4.536 +<p>
   4.537 +You should have a file rootfs.gz about 1 to 2MB in the working directory SliTaz/.
   4.538 +</p>
   4.539 +<p>
   4.540 +For a new image, when making changes in rootfs, simply copy the new rootfs.gz archive to rootcd/boot 
   4.541 +and create a new image with <code>genisoimage</code> or <code>mkisofs</code>. For this you can also 
   4.542 +use <strong>mktaziso</strong> within SliTaz tools. This script will check if the directories are present, 
   4.543 +create a new compressed cpio archive and generate a new bootable ISO image.
   4.544 +</p>
   4.545 +<a name="rootcd"></a>
   4.546 +<h3><font color="#6c0023">Make rootcd files</font></h3>
   4.547 +<p>
   4.548 +The following steps will help you create the root of the bootable CD-ROM. We begin by creating the rootcd, 
   4.549 +boot and isolinux directories for the cd-rom files:
   4.550 +</p>
   4.551 +<pre> # cd ..
   4.552 + # mkdir -p rootcd/boot/isolinux
   4.553 +</pre>
   4.554 +<p>
   4.555 +Optionally, you can create some other directories in which to place various data, such as HTML documents or packages.
   4.556 +</p>
   4.557 +<a name="linux"></a>
   4.558 +<h4>Copy the kernel</h4>
   4.559 +<p>
   4.560 +Just copy the kernel previously compiled to rootcd/boot:
   4.561 +</p>
   4.562 +<pre> # cp src/linux-2.6.20/arch/i386/boot/bzImage rootcd/boot
   4.563 +</pre>
   4.564 +<h4>Copy the initramfs into rootcd/boot</h4>
   4.565 +<p>
   4.566 +Copy the rootfs.gz to rootcd/boot. We must not forget to generate a new initramfs archive for any changes 
   4.567 +made to the rootfs (root file system):
   4.568 +</p>
   4.569 +<pre> # cp rootfs.gz rootcd/boot
   4.570 +</pre>
   4.571 +<h4>Install the isolinux bootloader</h4>
   4.572 +<p>
   4.573 +The bootloader isolinux - simply copy the isolinux.bin from the source archive of Syslinux:
   4.574 +</p>
   4.575 +<pre> # cd src
   4.576 + # tar xzf syslinux-3.35.tar.gz
   4.577 + # cp syslinux-3.35/isolinux.bin ../rootcd/boot/isolinux
   4.578 + # cd ..
   4.579 +</pre>
   4.580 +<h4>isolinux.cfg - Configure isolinux</h4>
   4.581 +<p>
   4.582 +Here is an example of an isolinux.cfg file that should work well. You can change it if you wish:
   4.583 +</p>
   4.584 +<pre> # nano rootcd/boot/isolinux/isolinux.cfg
   4.585 +</pre>
   4.586 +<pre class="script">display display.txt
   4.587 +default slitaz
   4.588 +label slitaz
   4.589 +    kernel /boot/bzImage
   4.590 +    append initrd=/boot/rootfs.gz rw root=/dev/null vga=788
   4.591 +implicit 0
   4.592 +prompt 1
   4.593 +timeout 80
   4.594 +
   4.595 +</pre>
   4.596 +<p>
   4.597 +Here are some changes that you might like to make in isolinux.cfg:
   4.598 +</p>
   4.599 +<ul>
   4.600 +    <li>The timeout value is the number of seconds to wait before booting 
   4.601 +	You can make it 0 or delete the line to start instantly, or choose to wait as long as 10s.</li>
   4.602 +    <li>prompt can be set to 0 to disable the 'boot:' prompt.</li>
   4.603 +    <li>You can add more lines to view the contents of several text files when the user presses F1, F2, F3, etc.</li>
   4.604 +</ul>
   4.605 +<h4>display.txt</h4>
   4.606 +<p>
   4.607 +A small welcome note, powered by isolinux, you can modify this file if you wish:
   4.608 +</p>
   4.609 +<pre> # nano rootcd/boot/isolinux/display.txt
   4.610 +</pre>
   4.611 +<pre class="script">/*       _\|/_
   4.612 +         (o o)
   4.613 + +----oOO-{_}-OOo---------------------------------------------------+
   4.614 +     ____  _ _ _____
   4.615 +    / ___|| (_)_   _|_ _ ____
   4.616 +    \___ \| | | | |/ _` |_  /
   4.617 +     ___) | | | | | (_| |/ /
   4.618 +    |____/|_|_| |_|\__,_/___|
   4.619 +
   4.620 + SliTaz GNU/Linux - Temporary Autonomous Zone
   4.621 +
   4.622 +     &lt;ENTER&gt; to boot.
   4.623 +
   4.624 +                                                                   */
   4.625 +</pre>
   4.626 +<a name="mkiso"></a>
   4.627 +<h3><font color="#6c0023">Create an ISO image with genisoimage or mkisofs</font></h3>
   4.628 +<pre> # genisoimage -R -o slitaz-cooking.iso -b boot/isolinux/isolinux.bin \
   4.629 +   -c boot/isolinux/boot.cat -no-emul-boot -boot-load-size 4 \
   4.630 +   -V "SliTaz" -input-charset iso8859-1 -boot-info-table rootcd
   4.631 +</pre>
   4.632 +<p>
   4.633 +For each change in the root of the box, you must create a new ISO image.
   4.634 +</p>
   4.635 +<p>
   4.636 +You can create a small script that will generate a new compressed cpio archive and a new image, 
   4.637 +or use mktaziso within SliTaz tools. Note that you can also use GRUB to boot the box.
   4.638 +</p>
   4.639 +<a name="testiso"></a>
   4.640 +<h3><font color="#6c0023">Burn or test ISO image with Qemu</font></h3>
   4.641 +<p>
   4.642 +You can burn the ISO image with Graveman, k3b or wodim and boot it. Simple burning command using wodim (also valid for cdrecord), with a 2.6.XX. kernel:
   4.643 +</p>
   4.644 +<pre># wodim -v -speed=24 -data slitaz-cooking.iso
   4.645 +</pre>
   4.646 +<h4>Qemu</h4>
   4.647 +<p>
   4.648 +Note that you can test the ISO image with the software emulator Qemu (On Debian # aptitude install qemu). 
   4.649 +To emulate the newly created ISO image, simply type:
   4.650 +</p>
   4.651 +<pre># qemu -cdrom slitaz-cooking.iso
   4.652 +</pre>
   4.653 +<h4>Following chapter</h4>
   4.654 +<p>
   4.655 +The next chapter <a href="base-apps.html">Base applications</a> provides all the instructions to install 
   4.656 +and configure the basic applications and libraries.
   4.657 +</p>
   4.658 +
   4.659 +<!-- End of content -->
   4.660 +</div>
   4.661 +
   4.662 +<!-- Footer. -->
   4.663 +<div id="footer">
   4.664 +	<div class="footer-right"></div>
   4.665 +	<a href="#top">Top of the page</a> | 
   4.666 +	<a href="index.html">Table of contents</a>
   4.667 +</div>
   4.668 +
   4.669 +<div id="copy">
   4.670 +    Copyright &copy; 2008 <a href="http://www.slitaz.org/en/">SliTaz</a> -
   4.671 +    <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>;<br />
   4.672 +    Documentation is under
   4.673 +    <a href="http://www.gnu.org/copyleft/fdl.html">GNU Free Documentation License</a>
   4.674 +    and code is <a href="http://validator.w3.org/">valid xHTML 1.0</a>.
   4.675 +</div>
   4.676 +
   4.677 +</body>
   4.678 +</html>
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/pt/doc/scratchbook/book.css	Fri Jan 30 18:32:32 2009 +0000
     5.3 @@ -0,0 +1,170 @@
     5.4 +/* 
     5.5 +	CSS style for SliTaz GNU/Linux *book.
     5.6 +	Pankso 2007 - www.slitaz.org
     5.7 +*/
     5.8 +
     5.9 +body {
    5.10 +	font: 13px sans-serif, vernada, arial;
    5.11 +	background: #222222;
    5.12 +	margin: 0;
    5.13 +	padding-bottom: 100%;
    5.14 +}
    5.15 +
    5.16 +#header {
    5.17 +	background: #BFB06B url(images/css/header.png) repeat-x top;
    5.18 +	color: black;
    5.19 +	height: 50px;
    5.20 +	border-top: 1px solid black;
    5.21 +	border-bottom: 1px solid black;
    5.22 +}
    5.23 +#quicknav {
    5.24 +	margin-right: 6px;
    5.25 +	text-align: right;
    5.26 +	font-size: 12px;
    5.27 +	}
    5.28 +#quicknav {
    5.29 +	margin-right: 6px;
    5.30 +}
    5.31 +
    5.32 +#quicknav a {
    5.33 +	background: inherit;
    5.34 +	color: #222222;
    5.35 +}
    5.36 +
    5.37 +#quicknav a:hover {
    5.38 +	background: inherit;
    5.39 +	color: #EDEDED;
    5.40 +}
    5.41 +
    5.42 +/*  content. */
    5.43 +
    5.44 +#content {
    5.45 +	background: white url(images/css/content-tl.png) no-repeat top left;
    5.46 +	color: black;
    5.47 +	padding: 20px;
    5.48 +	margin: 30px 50px 0px 50px;
    5.49 +	width: auto;
    5.50 +	text-align: justify;
    5.51 +}
    5.52 +
    5.53 +#content li {
    5.54 +	line-height: 1.5em;
    5.55 +	text-align: left;
    5.56 +}
    5.57 +
    5.58 +/*  Footer. */
    5.59 +
    5.60 +#footer {
    5.61 +	font-size: 11px;
    5.62 +	font-weight: bold;
    5.63 +	background: #eaeaea url(images/css/footer-bl.png) no-repeat bottom left;
    5.64 +	color: black;
    5.65 +	height: 20px;
    5.66 +	padding: 6px 0px 0px 10px;
    5.67 +	margin: 0px 50px 0px 50px;
    5.68 +	width: auto;
    5.69 +	text-align: center ;
    5.70 +}
    5.71 +
    5.72 +#footer a {
    5.73 +	text-decoration: none;
    5.74 +	background: #eaeaea;
    5.75 +	color: #3E1220;
    5.76 +}
    5.77 +
    5.78 +#footer a:hover {
    5.79 +	background: #eaeaea;
    5.80 +	color: #DF8F06;
    5.81 +}
    5.82 +
    5.83 +/* Legal information */
    5.84 +
    5.85 +#copy {
    5.86 +	font-size: 11px ;
    5.87 +	text-align: center ;
    5.88 +	background: transparent;
    5.89 +	color: #a8a8a8;
    5.90 +	padding-top: 20px;
    5.91 +}
    5.92 +
    5.93 +#copy a {
    5.94 +	background: inherit;
    5.95 +	color: #a8a8a8;
    5.96 +}
    5.97 +
    5.98 +#copy a:hover {
    5.99 +	background: inherit;
   5.100 +	color: #EDEDED;
   5.101 +}
   5.102 +
   5.103 +/* Div for round corners. */
   5.104 +
   5.105 +.content-right, .footer-right {
   5.106 +	width: 16px;
   5.107 +	color: white;
   5.108 +	background-color: #333333;
   5.109 +}
   5.110 +.content-right {
   5.111 +	background: url(images/css/content-tr.png) no-repeat top right;
   5.112 +	height: 16px;
   5.113 +	right: 50px;
   5.114 +	top: 82px;
   5.115 +	position: absolute;
   5.116 +}
   5.117 +
   5.118 +.footer-right {
   5.119 +	background: url(images/css/footer-br.png) no-repeat bottom right;
   5.120 +	height: 20px;
   5.121 +	float: right;
   5.122 +}
   5.123 +
   5.124 +/* General HTML entities for  content. */
   5.125 +
   5.126 +h1 {
   5.127 +	margin: 0px 0px 0px 16px;
   5.128 +}
   5.129 +
   5.130 +h2 {
   5.131 +	margin: 12px 0;
   5.132 +	color: #484B7C;
   5.133 +	background: white;
   5.134 +}
   5.135 +
   5.136 +h3 {
   5.137 +	font-weight: bold;
   5.138 +	color: #6c0023;
   5.139 +	background: white;
   5.140 +}
   5.141 +
   5.142 +a {
   5.143 +	text-decoration: underline;
   5.144 +}
   5.145 +a:hover {
   5.146 +	text-decoration: none;
   5.147 +}
   5.148 +
   5.149 +pre {
   5.150 +	padding: 5px;
   5.151 +	color: black;
   5.152 +	background: #e1e0b0;
   5.153 +}
   5.154 +pre.script {
   5.155 +	padding: 10px;
   5.156 +	color: black;
   5.157 +	background: #e8e8e8;
   5.158 +	border: 1px inset #333333;
   5.159 +}
   5.160 +
   5.161 +code {
   5.162 +	font-size: 12px;
   5.163 +	color: #669900;
   5.164 +	background: transparent;
   5.165 +}
   5.166 +
   5.167 +li {
   5.168 +	line-height: 1.4em;
   5.169 +}
   5.170 +
   5.171 +hr {
   5.172 +	border: 0pt none;
   5.173 +}
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/pt/doc/scratchbook/boot-scripts.html	Fri Jan 30 18:32:32 2009 +0000
     6.3 @@ -0,0 +1,207 @@
     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 - Boot Scripts</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 align="right" id="quicknav">
    6.23 +    <a name="top"></a>
    6.24 +    <a href="locale.html">Locale &amp; i18n</a> |
    6.25 +    <a href="index.html">Table of contents</a> |
    6.26 +    <a href="x-window-system.html">X window system</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 +<h2><font color="#df8f06">Boot scripts</font></h2>
    6.36 +<p>
    6.37 +The startup and shutdown scripts with their configuration files.
    6.38 +</p>
    6.39 +
    6.40 +<ul>
    6.41 +  	<li><a href="#intro">SliTaz and startup.</a></li>
    6.42 +	<li><a href="#init.d">/etc/init.d/*</a> - Directory of scripts and daemons.</li>
    6.43 +	<li><a href="#rcS">/etc/init.d/rcS</a> - Primary initialization script.</li>
    6.44 +	<li><a href="#rc-scripts">Specific scripts and daemons</a> - Scripts and
    6.45 +	daemons with a very specific task.</li>
    6.46 +	<li><a href="#inittab">/etc/inittab</a> - Configuration file init.</li>
    6.47 +</ul>
    6.48 +
    6.49 +<a name="intro"></a>
    6.50 +<h3><font color="#6c0023">SliTaz and startup</font></h3>
    6.51 +
    6.52 +<p>
    6.53 +SliTaz does not use a level of execution (runlevel), the
    6.54 +system is initialized via a primary script and its main 
    6.55 +configuration file. This script itself launches some other smaller 
    6.56 +scripts which deal with the internationalization or the
    6.57 +commands placed for the system to start.
    6.58 +</p>
    6.59 +
    6.60 +<a name="init.d"></a>
    6.61 +<h3><font color="#6c0023">/etc/init.d/* - Directory of scripts and daemons</font></h3>
    6.62 +<p>
    6.63 +The directory /etc/init.d contains all of the rc scripts,
    6.64 +scripts finishing with '.sh' are simple shell scripts and
    6.65 +daemons such as 'dropbear' or 'lighttpd' are scripts
    6.66 +that launch a service. The daemon scripts can start, stop or
    6.67 +restart through the command:
    6.68 +</p>
    6.69 +<pre> # /etc/init.d/daemon [start|stop|restart]
    6.70 +</pre>
    6.71 +<p>
    6.72 +On SliTaz you will find a /etc/init.d/README describing the
    6.73 +basic function of rc scripts. Also note that all startup
    6.74 +scripts and daemons can call upon the <code>/etc/init.d/rc.functions</code>
    6.75 +file. This file makes it possible to include various functions
    6.76 +in rc scripts. SliTaz uses a function <code>status</code> to check whether
    6.77 +the previous command has succeeded (0) or not.
    6.78 +</p>
    6.79 +
    6.80 +<a name="rcS"></a>
    6.81 +<h3><font color="#6c0023">/etc/init.d/rcS - Primary initialization script</font></h3>
    6.82 +<p>
    6.83 +The <code>/etc/init.d/rcS</code> script configures all the 
    6.84 +basic services and initializes the base system. It begins by 
    6.85 +mounting the filesystems and starts services like syslogd, klogd,
    6.86 +mdev and cleans up the system and so on. It
    6.87 +uses the configuration file <code>/etc/rcS.conf</code> to locate which daemons
    6.88 +and scripts to launch at startup. You can browse the script
    6.89 +to know which commands are executed:
    6.90 +</p>
    6.91 +<pre> # nano rootfs/etc/init.d/rcS 
    6.92 +</pre>
    6.93 +
    6.94 +
    6.95 +<a name="rc-scripts"></a>
    6.96 +<h3><font color="#6c0023">Specific scripts and daemons</font></h3>
    6.97 +
    6.98 +<h4>bootopts.sh - LiveCD mode options</h4>
    6.99 +<p>
   6.100 +This script is used to configure the LiveCD options passed
   6.101 +at boot time and is readable via the /proc/cmdline file. 
   6.102 +This is the script that allows you to use a USB key or 
   6.103 +external hard disk <code>/home</code>  partition with the option home=usb
   6.104 +or home=sda[1-9] or directly specify the language and 
   6.105 +keyboard parameters.
   6.106 +</p>
   6.107 +
   6.108 +<h4>network.sh - Initializing the network</h4>
   6.109 +<p>
   6.110 +This script searches the network.sh configuration file 
   6.111 +/etc/network.conf for the network interface to use; if one wants to
   6.112 +launch the DHCP client (or not) or if you want to use a fixed 
   6.113 +(static) IP. On SliTaz the /etc/init.d/network.sh 
   6.114 +script configures the network interfaces to start using the 
   6.115 +information contained in /etc/network.conf. If the variable 
   6.116 +$DHCP is equal to yes, then the /etc/init.d/network.sh 
   6.117 +script launches the DHCP client on the $INTERFACE interface.
   6.118 +</p>
   6.119 +
   6.120 +<h4>i18n.sh - Internationalization</h4>
   6.121 +<p>
   6.122 +SliTaz backs up the configuration of the default locale in
   6.123 +/etc/locale.conf which is read by /etc/profile at each 
   6.124 +login. The /etc/locale.conf is generated during boot time
   6.125 +thanks to the /etc/i18n.sh script. This script launches the
   6.126 +'tazlocale' application if /etc/locale.conf doesn't exist. 
   6.127 +We use the same process for the keyboard layout using 'tazkmap' 
   6.128 +and the /etc/kmap.conf configuration file. Both applications 
   6.129 +are installed and located in /sbin and use dialog and the 
   6.130 +ncurses library. The script also checks whether the 
   6.131 +configuration file for the time zone /etc/TZ exists, 
   6.132 +otherwise it creates one relying on the keyboard configuration.
   6.133 +</p>
   6.134 +
   6.135 +<h4>local.sh - Local commands</h4>
   6.136 +<p>
   6.137 +The /etc/init.d/local.sh script allows the system administrator
   6.138 +to add local commands to be executed at boot. Example:
   6.139 +</p>
   6.140 +<pre class="script">#!/bin/sh
   6.141 +# /etc/init.d/local.sh: Local startup commands.
   6.142 +# All commands here will be executed at boot time.
   6.143 +#
   6.144 +. /etc/init.d/rc.functions
   6.145 +
   6.146 +echo "Starting local startup commands... "
   6.147 +
   6.148 +</pre>
   6.149 +
   6.150 +<h4>rc.shutdown</h4>
   6.151 +<p>
   6.152 +This script is invoked by /etc/inittab during system shutdown.
   6.153 +It also stops all daemons via the variable RUN_DAEMONS in 
   6.154 +the primary <code>/etc/rcS.conf</code> configuration file.
   6.155 +</p>
   6.156 +
   6.157 +<a name="inittab"></a>
   6.158 +<h3><font color="#6c0023">/etc/inittab - Configuration file init</font></h3>
   6.159 +<p>
   6.160 +The first file read by the Kernel at boot. It defines the 
   6.161 +initialization script (/etc/init.d/rcS), shells (ttys) and
   6.162 +actions in the event of a reboot or disruption. You will find
   6.163 +a complete example with accompanying notes in <a href="http://www.slitaz.org/en/doc/cookbook/slitaz-tools.html">SliTaz tools</a>:
   6.164 +</p>
   6.165 +<pre class="script"># /etc/inittab: init configuration for SliTaz GNU/Linux.
   6.166 +# Boot-time system configuration/initialization script.
   6.167 +#
   6.168 +::sysinit:/etc/init.d/rcS
   6.169 +
   6.170 +# /sbin/getty respawn shell invocations for selected ttys.
   6.171 +tty1::respawn:/sbin/getty 38400 tty1
   6.172 +tty2::respawn:/sbin/getty 38400 tty2
   6.173 +tty3::respawn:/sbin/getty 38400 tty3
   6.174 +tty4::respawn:/sbin/getty 38400 tty4
   6.175 +tty5::respawn:/sbin/getty 38400 tty5
   6.176 +tty6::respawn:/sbin/getty 38400 tty6
   6.177 +
   6.178 +# Stuff to do when restarting the init 
   6.179 +# process, or before rebooting.
   6.180 +::restart:/etc/init.d/rc.shutdown
   6.181 +::restart:/sbin/init
   6.182 +::ctrlaltdel:/sbin/reboot
   6.183 +::shutdown:/etc/init.d/rc.shutdown
   6.184 +
   6.185 +</pre>
   6.186 +<h4>Following chapter</h4>
   6.187 +<p>
   6.188 +The next chapter continues on with the <a href="x-window-system.html">X window system</a>.
   6.189 +</p>
   6.190 +
   6.191 +<!-- End of content -->
   6.192 +</div>
   6.193 +
   6.194 +<!-- Footer. -->
   6.195 +<div id="footer">
   6.196 +	<div class="footer-right"></div>
   6.197 +	<a href="#top">Top of the page</a> | 
   6.198 +	<a href="index.html">Table of contents</a>
   6.199 +</div>
   6.200 +
   6.201 +<div id="copy">
   6.202 +    Copyright &copy; 2008 <a href="http://www.slitaz.org/en/">SliTaz</a> -
   6.203 +    <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>;<br />
   6.204 +    Documentation is under
   6.205 +    <a href="http://www.gnu.org/copyleft/fdl.html">GNU Free Documentation License</a>
   6.206 +    and code is <a href="http://validator.w3.org/">valid xHTML 1.0</a>.
   6.207 +</div>
   6.208 +
   6.209 +</body>
   6.210 +</html>
     7.1 Binary file pt/doc/scratchbook/favicon.ico has changed
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/pt/doc/scratchbook/gtk-apps.html	Fri Jan 30 18:32:32 2009 +0000
     8.3 @@ -0,0 +1,304 @@
     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 - GTK+ Applications</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 id="quicknav" align="right">
    8.23 +    <a name="top"></a>
    8.24 +    <a href="gtk-libs.html">Gtk-libs</a> |
    8.25 +    <a href="index.html">Table of contents</a>
    8.26 +</div>
    8.27 +<h1><font color="#3e1220">SliTaz Scratchbook</font></h1>
    8.28 +</div>
    8.29 +
    8.30 +<!-- Content. -->
    8.31 +<div id="content">
    8.32 +<div class="content-right"></div>
    8.33 +
    8.34 +
    8.35 +<h2><font color="#df8f06">GTK+ Applications</font></h2>
    8.36 +<p>
    8.37 +Compiliation and installation of applications using GTK+.
    8.38 +</p>
    8.39 +<ul>
    8.40 +    <li><a href="#about">About this chapter.</a> - Description and environmental variable ($fs)</li>
    8.41 +    <li><a href="#leafpad">leafpad-0.8.10</a> - Simple text editor.</li>
    8.42 +    <li><a href="#gitmail">gitmail-0.4</a> -  Ghost In The Mail, mail client.</li>
    8.43 +    <li><a href="#gqview">gqview-2.0.4</a>  - Images Manager.</li>
    8.44 +    <li><a href="#mtpaint">mtpaint-3.11</a>  - Image creation and processing.</li>
    8.45 +    <li><a href="#transmission">Transmission-0.72</a> - Lightweight BitTorrent client.</li>
    8.46 +    <li><a href="#emelfm2">emelfm2-0.3.5</a> - File Manager.</li>
    8.47 +    <li><a href="#geany">geany-0.11</a> - Integrated Development Environment.</li>
    8.48 +    <li><a href="#gftp">gftp-2.0.18</a> - Fast and simple FTP client.</li>
    8.49 +    <li><a href="#xpad">xpad-2.12</a> - Mini note taking application.</li>
    8.50 +</ul>
    8.51 +<a name="about"></a>
    8.52 +<h3><font color="#6c0023">About</font></h3>
    8.53 +<p>
    8.54 +This chapter describes the commands for the compilation and installation of
    8.55 +GTK+ applications distributed by default on the SliTaz LiveCD. The installation 
    8.56 +of GTK+ libraries are described in the
    8.57 +<a href="http://www.slitaz.org/doc/scratchbook/gtk-libs.html">GTK+ libs</a> chapter.
    8.58 +</p>
    8.59 +<h4>Environmental variable ($fs)</h4>
    8.60 +<p>
    8.61 +If you do not specify any path to the rootfs directory, export the environmental variable:
    8.62 +</p>
    8.63 +<pre> # export fs=$PWD/rootfs
    8.64 +</pre>
    8.65 +<p>
    8.66 +To check:
    8.67 +</p>
    8.68 +<pre> # echo $fs
    8.69 +</pre>
    8.70 +<a name="leafpad"></a>
    8.71 +<h3><font color="#6c0023">leafpad-0.8.10 - Simple text editor</font></h3>
    8.72 +<p>
    8.73 +Website: <a href="http://tarot.freeshell.org/leafpad/">http://tarot.freeshell.org/leafpad/</a>
    8.74 +</p>
    8.75 +<pre> # wget http://savannah.nongnu.org/download/leafpad/leafpad-0.8.10.tar.gz
    8.76 + # tar xzf leafpad-0.8.10.tar.gz
    8.77 + # cd leafpad-0.8.10
    8.78 + # ./configure --prefix=/usr
    8.79 + # make
    8.80 + # make DESTDIR=$PWD/_pkg install
    8.81 + # strip _pkg/usr/bin/*
    8.82 +</pre>
    8.83 +<h4>Install in rootfs</h4>
    8.84 +<pre> # cp _pkg/usr/bin/* $fs/usr/bin
    8.85 + # cp _pkg/usr/share/pixmaps/leafpad.png $fs/usr/share/pixmaps
    8.86 + # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
    8.87 +</pre>
    8.88 +<a name="gitmail"></a>
    8.89 +<h3><font color="#6c0023">gitmail-0.4 - Ghost In The Mail, mail client</font></h3>
    8.90 +<p>
    8.91 +Ghost in the mail allows users to quickly and easily send mail via SMTP.
    8.92 +</p>
    8.93 +<p>
    8.94 +Website: <a href="http://gitmail.sourceforge.net/">http://gitmail.sourceforge.net/</a>
    8.95 +</p>
    8.96 +<pre> # wget http://switch.dl.sourceforge.net/sourceforge/gitmail/gitmail-0.4.tar.gz
    8.97 + # tar xzf gitmail-0.4.tar.gz
    8.98 + # cd GhostInTheMail-0.4
    8.99 + # ./configure --prefix=/usr
   8.100 + # make
   8.101 + # make DESTDIR=$PWD/_pkg \
   8.102 +   gitmaildocdir=/usr/share/doc/GhostInTheMail \
   8.103 +   install
   8.104 + # strip _pkg/usr/bin/*
   8.105 +</pre>
   8.106 +<h4>Install in rootfs</h4>
   8.107 +<pre> # cp _pkg/usr/bin/* $fs/usr/bin
   8.108 +</pre>
   8.109 +<a name="gqview"></a>
   8.110 +<h3><font color="#6c0023">gqview-2.0.4 - Images Manager</font></h3>
   8.111 +<p>
   8.112 +Website: <a href="http://gqview.sourceforge.net/">http://gqview.sourceforge.net/</a>
   8.113 +</p>
   8.114 +<pre> # wget http://belnet.dl.sourceforge.net/sourceforge/gqview/gqview-2.0.4.tar.gz
   8.115 + # tar xzf gqview-2.0.4.tar.gz
   8.116 + # cd gqview-2.0.4
   8.117 + # ./configure --prefix=/usr --mandir=/usr/share/man
   8.118 + # make
   8.119 + # make DESTDIR=$PWD/_pkg install
   8.120 + # strip _pkg/usr/bin/*
   8.121 +</pre>
   8.122 +<h4>Install in rootfs</h4>
   8.123 +<pre> # cp _pkg/usr/bin/* $fs/usr/bin
   8.124 + # cp _pkg/usr/share/pixmaps/* $fs/usr/share/pixmaps
   8.125 + # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
   8.126 +</pre>
   8.127 +<a name="mtpaint"></a>
   8.128 +<h3><font color="#6c0023">mtpaint-3.11 - Image creation and processing</font></h3>
   8.129 +<p>
   8.130 +Website: <a href="http://mtpaint.sourceforge.net/">http://mtpaint.sourceforge.net/</a>
   8.131 +</p>
   8.132 +<pre> # wget http://switch.dl.sourceforge.net/sourceforge/mtpaint/mtpaint-3.11.tar.bz2
   8.133 + # tar xjf mtpaint-3.11.tar.bz2
   8.134 + # cd mtpaint-3.11
   8.135 + # ./configure --cpu=i486 --prefix=/usr intl
   8.136 + # make
   8.137 + # strip src/mtpaint
   8.138 +</pre>
   8.139 +<h4>Install in rootfs</h4>
   8.140 +<pre> # cp src/mtpaint $fs/usr/bin
   8.141 + # cp po/fr.mo $fs/usr/share/locale/fr/LC_MESSAGES/mtpaint.mo
   8.142 + # cp src/icons1/icon.xpm $fs/usr/share/pixmaps/mtpaint.xpm
   8.143 +</pre>
   8.144 +<a name="transmission"></a>
   8.145 +<h3><font color="#6c0023">Transmission-0.72 - Lightweight BitTorrent client</font></h3>
   8.146 +<p>
   8.147 +Tranmission BitTorrent client is fast, lightweight and easy to use. The compiled package provides 
   8.148 +the command line client (transmissioncli) and a GTK+ client (transmission-gtk). We install the GTK+ client, 
   8.149 +the command line client is distributed as a separate SliTaz package (*.tazpkg).
   8.150 +</p>
   8.151 +<p>
   8.152 +Website: <a href="http://transmission.m0k.org/">http://transmission.m0k.org/</a>
   8.153 +</p>
   8.154 +<pre> # wget http://download.m0k.org/transmission/files/Transmission-0.72.tar.gz
   8.155 + # tar xzf Transmission-0.72.tar.gz
   8.156 +
   8.157 + La version 0.72 est mal archivée:
   8.158 + # mv "Transmission .72" Transmission-0.72
   8.159 +
   8.160 + # cd Transmission-0.72
   8.161 + # ./configure --prefix=/usr  --disable-openssl
   8.162 + # make
   8.163 + # strip gtk/transmission-gtk
   8.164 + # strip cli/transmissioncli
   8.165 +</pre>
   8.166 +<h4>Install in rootfs</h4>
   8.167 +<pre> # cp gtk/transmission-gtk $fs/usr/bin
   8.168 + # cp gtk/transmission.png $fs/usr/share/pixmaps
   8.169 + # cp gtk/po/fr.mo $fs/usr/share/locale/fr/LC_MESSAGES/transmission-gtk.mo
   8.170 +</pre>
   8.171 +<a name="emelfm2"></a>
   8.172 +<h3><font color="#6c0023">emelfm2-0.3.5 - File Manager</font></h3>
   8.173 +<p>
   8.174 +The emelFM2 application is a file manager providing lots of useful functions, 
   8.175 +such as the mounting of devices, a text viewer, opening a terminal in the current 
   8.176 +directory and so on.
   8.177 +</p>
   8.178 +<p>
   8.179 +Website: <a href="http://emelfm2.net/">http://emelfm2.net/</a>
   8.180 +</p>
   8.181 +<pre> # cd ..
   8.182 + # wget http://emelfm2.net/rel/emelfm2-0.3.5.tar.gz
   8.183 + # tar xzf emelfm2-0.3.5.tar.gz
   8.184 + # cd emelfm2-0.3.5
   8.185 + # make PREFIX=/usr
   8.186 + # make i18n PREFIX=/usr
   8.187 + # make install PREFIX=$PWD/_pkg/usr
   8.188 + # make install_i18n PREFIX=$PWD/_pkg/usr
   8.189 + # strip -v _pkg/usr/bin/*
   8.190 + # strip -v _pkg/usr/lib/emelfm2/plugins/*
   8.191 +</pre>
   8.192 +<h4>Install in rootfs</h4>
   8.193 +<pre> # cp _pkg/usr/bin/* $fs/usr/bin
   8.194 + # cp -a _pkg/usr/lib/* $fs/usr/lib
   8.195 + # cp -a _pkg/usr/share/pixmaps $fs/usr/share
   8.196 + # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
   8.197 +</pre>
   8.198 +<a name="geany"></a>
   8.199 +<h3><font color="#6c0023">geany-0.11 - Integrated Development Environment</font></h3>
   8.200 +<p>
   8.201 +Geany is a simple, fast and light IDE offering colored syntax, tabs, autocompletion, aids to scripts and much more.
   8.202 +</p>
   8.203 +<p>
   8.204 +Website: <a href="http://geany.uvena.de/">http://geany.uvena.de/</a>
   8.205 +</p>
   8.206 +<p>
   8.207 +To compile and run geany on SliTaz, you must have the libstdc++ and libgcc1 libraries, 
   8.208 +both provided by gcc (we recompiled with gcc-4.1.1), but you can copy the libraries from the host system.
   8.209 +</p>
   8.210 +<p>
   8.211 +Note: The force is with you, if you activate it via the option --enable-the-force.
   8.212 +</p>
   8.213 +<pre> # wget http://mesh.dl.sourceforge.net/sourceforge/geany/geany-0.11.tar.gz
   8.214 + # tar xzf geany-0.11.tar.gz
   8.215 + # cd geany-0.11
   8.216 + # ./configure --prefix=/usr --mandir=/usr/share/man \
   8.217 +   --disable-vte --enable-the-force
   8.218 + # make
   8.219 + # make DESTDIR=$PWD/_pkg install
   8.220 + # strip -v _pkg/usr/bin/*
   8.221 +</pre>
   8.222 +<h4>Install in rootfs</h4>
   8.223 +<pre> # cp _pkg/usr/bin/* $fs/usr/bin
   8.224 + # cp -a _pkg/usr/share/geany $fs/usr/share
   8.225 + # cp _pkg/usr/share/pixmaps/geany.png $fs/usr/share/pixmaps
   8.226 + # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
   8.227 +</pre>
   8.228 +<a name="gftp"></a>
   8.229 +<h3><font color="#6c0023">gftp-2.0.18 - Fast and simple FTP client</font></h3>
   8.230 +<p>
   8.231 +The gFTP application is a fast and efficient FTP client with a GTK+ graphical interface. 
   8.232 +Note that we compile without support for a text interface and ssl support. Get, untar, 
   8.233 +configure, compile and install.
   8.234 +</p>
   8.235 +<p>
   8.236 +Website: <a href="http://www.gftp.org/">http://www.gftp.org/</a>
   8.237 +</p>
   8.238 +<pre> # wget http://www.gftp.org/gftp-2.0.18.tar.gz
   8.239 + # tar xzf gftp-2.0.18.tar.gz
   8.240 + # cd gftp-2.0.18
   8.241 + # ./configure --prefix=/usr --mandir=/usr/share/man \
   8.242 +   --disable-ssl --disable-textport \
   8.243 +   --build=i486-pc-linux-gnu --host=i486-pc-linux-gnu
   8.244 + # make
   8.245 + # make DESTDIR=$PWD/_pkg install
   8.246 + # strip _pkg/usr/bin/*
   8.247 +</pre>
   8.248 +<h4>Install in rootfs</h4>
   8.249 +<p>
   8.250 +SliTaz provides only the GTK+ client on the CD. Note that <code>gftp</code> is just a small 
   8.251 +script that detects the environment (console or X) and launches the right interface:
   8.252 +</p>
   8.253 +<pre> # cp _pkg/usr/bin/gftp $fs/usr/bin
   8.254 + # cp _pkg/usr/bin/gftp-gtk $fs/usr/bin
   8.255 + # cp -a _pkg/usr/share/gftp $fs/usr/share
   8.256 + # cp -a _pkg/usr/share/pixmaps $fs/usr/share
   8.257 + # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
   8.258 +</pre>
   8.259 +<p>
   8.260 +To save a little space and avoid duplication, you can delete 'COPYING' (17 KB) 
   8.261 +included in /usr/share/gftp. The GNU licence is already present in /usr/share/licence, 
   8.262 +if you want to create a symbolic link.
   8.263 +</p>
   8.264 +<a name="xpad"></a>
   8.265 +<h3><font color="#6c0023">xpad-2.12 - Mini note taking application</font></h3>
   8.266 +<p>
   8.267 +The Xpad application can quickly take notes via various customizable (GTK+) windows.
   8.268 +</p>
   8.269 +<p>
   8.270 +Website: <a href="http://xpad.sourceforge.net/">http://xpad.sourceforge.net/</a>
   8.271 +</p>
   8.272 +<pre> # wget http://surfnet.dl.sourceforge.net/sourceforge/xpad/xpad-2.12.tar.bz2
   8.273 + # tar xjf xpad-2.12.tar.bz2
   8.274 + # cd xpad-2.12
   8.275 + # ./configure --prefix=/usr --mandir=/usr/share/man \
   8.276 +   --build=i486-pc-linux-gnu --host=i486-pc-linux-gnu
   8.277 + # make
   8.278 + # make DESTDIR=$PWD/_pkg install
   8.279 + # strip _pkg/usr/bin/*
   8.280 +</pre>
   8.281 +<h4>Install in rootfs</h4>
   8.282 +<pre> # cp _pkg/usr/bin/xpad $fs/usr/bin
   8.283 + # cp -a _pkg/usr/share/pixmaps $fs/usr/share
   8.284 + # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
   8.285 +</pre>
   8.286 +
   8.287 +
   8.288 +<!-- End of content -->
   8.289 +</div>
   8.290 +
   8.291 +<!-- Footer. -->
   8.292 +<div id="footer">
   8.293 +	<div class="footer-right"></div>
   8.294 +	<a href="#top">Top of the page</a> | 
   8.295 +	<a href="index.html">Table of contents</a>
   8.296 +</div>
   8.297 +
   8.298 +<div id="copy">
   8.299 +    Copyright &copy; 2008 <a href="http://www.slitaz.org/en/">SliTaz</a> -
   8.300 +    <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>;<br />
   8.301 +    Documentation is under
   8.302 +    <a href="http://www.gnu.org/copyleft/fdl.html">GNU Free Documentation License</a>
   8.303 +    and code is <a href="http://validator.w3.org/">valid xHTML 1.0</a>.
   8.304 +</div>
   8.305 +
   8.306 +</body>
   8.307 +</html>
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/pt/doc/scratchbook/gtk-libs.html	Fri Jan 30 18:32:32 2009 +0000
     9.3 @@ -0,0 +1,251 @@
     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 - GTK+ Libraries</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="x-window-system.html">X window system</a> |
    9.25 +	<a href="index.html">Table of contents</a> |
    9.26 +	<a href="gtk-apps.html">GTK+ apps</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">GTK+ Libraries</font></h2>
    9.37 +<p>
    9.38 +Compilation and installation of GTK+ packages and libraries.
    9.39 +</p>
    9.40 +<ul>
    9.41 +	<li><a href="#about">About this chapter.</a> - Description and environmental variable ($fs)</li>
    9.42 +	<li><a href="#cairo">cairo-1.2.6</a> - 2D graphics library.</li>
    9.43 +	<li><a href="#glib">glib-2.12.4</a> - C routines.</li>
    9.44 +	<li><a href="#pango">pango-1.14.8</a> - Library for layout and rendering of text.</li>
    9.45 +	<li><a href="#atk">atk-1.12.4</a> - Accessibility toolkit.</li>
    9.46 +	<li><a href="#gtk">gtk-2.8.20</a> - The GIMP Toolkit.</li>
    9.47 +	<li><a href="#initramfs-iso">Generate the initramfs and an ISO image.</a></li>
    9.48 +</ul>
    9.49 +<a name="about"></a>
    9.50 +<h3><font color="#6c0023">About</font></h3>
    9.51 +<p>
    9.52 +This chapter describes the installation and configuration of GTK libraries 
    9.53 +on SliTaz used by lots of free software. Note that you can simply compile and 
    9.54 +create a SliTaz package that you can install on demand with tazpkg.
    9.55 +</p>
    9.56 +<p>
    9.57 +The compilation of GTK applications can take quite some time and you must meet many dependencies. 
    9.58 +You will find a guide in English: 
    9.59 +<a href="http://developer.gnome.org/doc/API/2.0/gtk/gtk-building.html">gtk-building.html</a> on developer.gnome.org. 
    9.60 +This document sets out the need to compile things in order: Glib, Pango, ATK and GTK+, etc. 
    9.61 +Before commencing you must verify that the dependencies are properly installed on your host system. 
    9.62 +Glib, Pango, ATK and GTK+ form a group of packages and are distributed by the team of GTK developers.
    9.63 +</p>
    9.64 +<h4>Environmental variable ($fs)</h4>
    9.65 +<p>
    9.66 +If you do not specify any path to the rootfs directory, export the environmental variable:
    9.67 +</p>
    9.68 +<pre> # export fs=$PWD/rootfs
    9.69 +</pre>
    9.70 +<p>
    9.71 +To check:
    9.72 +</p>
    9.73 +<pre> # echo $fs
    9.74 +</pre>
    9.75 +<a name="cairo"></a>
    9.76 +<h3><font color="#6c0023">cairo-1.2.6 - 2D graphics library</font></h3>
    9.77 +<p>
    9.78 +We begin with libcairo (<a href="http://www.cairographics.org/">http://www.cairographics.org/</a>) 
    9.79 +used to compile pango:
    9.80 +</p>
    9.81 +<pre> # cd src
    9.82 + # wget http://cairographics.org/releases/cairo-1.2.6.tar.gz
    9.83 + # tar xzf cairo-1.2.6.tar.gz
    9.84 + # cd cairo-1.2.6
    9.85 + # ./configure --prefix=/usr --mandir=/usr/share/man \
    9.86 +   --with-html-dir=/usr/share/doc
    9.87 + # make
    9.88 + # make DESTDIR=$PWD/_pkg install
    9.89 + # strip -v _pkg/usr/lib/*.so*
    9.90 +</pre>
    9.91 +<h4>Install in rootfs</h4>
    9.92 +<pre> # cp -av _pkg/usr/lib/*.so* $fs/usr/lib
    9.93 +</pre>
    9.94 +<a name="glib"></a>
    9.95 +<h3><font color="#6c0023">glib-2.12.4 - C routines</font></h3>
    9.96 +<pre> # cd ..
    9.97 + # wget ftp://ftp.gtk.org/pub/glib/2.12/glib-2.12.4.tar.bz2
    9.98 + # tar xjf glib-2.12.4.tar.bz2
    9.99 + # cd glib-2.12.4
   9.100 + # ./configure --prefix=/usr --sysconfdir=/etc \
   9.101 +   --mandir=/usr/share/man --with-html-dir=/usr/share/doc
   9.102 + # make
   9.103 + # make DESTDIR=$PWD/_pkg install
   9.104 + # strip -v _pkg/usr/bin/*
   9.105 + # strip -v _pkg/usr/lib/*.so*
   9.106 +</pre>
   9.107 +<h4>Install in rootfs</h4>
   9.108 +<p>
   9.109 +Option: the utilities glib-genmarshal and gobject-query need the /lib/tls/librt.so.1:
   9.110 +</p>
   9.111 +<pre> # cp -a _pkg/usr/lib/*.so* $fs/usr/lib
   9.112 + # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
   9.113 + 
   9.114 + The binaries and options:
   9.115 + # cp -a _pkg/usr/bin/* $fs/usr/bin
   9.116 +</pre>
   9.117 +<a name="pango"></a>
   9.118 +<h3><font color="#6c0023">pango-1.14.8 - Library for layout and rendering of text</font></h3>
   9.119 +<pre> # cd ..
   9.120 + # wget ftp://ftp.gtk.org/pub/pango/1.14/pango-1.14.8.tar.bz2
   9.121 + # tar xjf pango-1.14.8.tar.bz2
   9.122 + # cd pango-1.14.8
   9.123 + # ./configure --prefix=/usr --sysconfdir=/etc \
   9.124 +   --mandir=/usr/share/man --with-html-dir=/usr/share/doc
   9.125 + # make
   9.126 + # make DESTDIR=$PWD/_pkg install
   9.127 + # strip -v _pkg/usr/bin/*
   9.128 + # strip -v _pkg/usr/lib/*.so*
   9.129 + # strip -v _pkg/usr/lib/pango/1.5.0/modules/*
   9.130 +</pre>
   9.131 +<h4>Install in rootfs</h4>
   9.132 +<pre> # cp -a _pkg/usr/bin/* $fs/usr/bin
   9.133 + # cp -a _pkg/usr/lib/*.so* $fs/usr/lib
   9.134 + # cp -a _pkg/usr/lib/pango $fs/usr/lib
   9.135 + # rm -rf $fs/usr/lib/pango/1.5.0/modules/*.la
   9.136 + # cp -a _pkg/etc $fs
   9.137 +</pre>
   9.138 +<p>
   9.139 +Create /etc/pango.modules via chroot in the rootfs (pango-querymodules uses librt.so.1):
   9.140 +</p>
   9.141 +<pre> # chroot $fs /bin/ash
   9.142 + /# pango-querymodules &gt; /etc/pango/pango.modules
   9.143 + # exit
   9.144 +</pre>
   9.145 +<a name="atk"></a>
   9.146 +<h3><font color="#6c0023">atk-1.12.4 - Accessibility toolkit</font></h3>
   9.147 +<pre> # cd ..
   9.148 + # wget http://ftp.gnome.org/pub/gnome/sources/atk/1.12/atk-1.12.4.tar.bz2
   9.149 + # tar xjf atk-1.12.4.tar.bz2
   9.150 + # cd atk-1.12.4
   9.151 + # ./configure --prefix=/usr --mandir=/usr/share/man \
   9.152 +   --with-html-dir=/usr/share/doc
   9.153 + # make
   9.154 + # make DESTDIR=$PWD/_pkg install
   9.155 + # strip -v _pkg/usr/lib/*.so*
   9.156 +</pre>
   9.157 +<h4>Install in rootfs</h4>
   9.158 +<pre> # cp -a _pkg/usr/lib/*.so* $fs/usr/lib
   9.159 + # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
   9.160 +</pre>
   9.161 +<a name="gtk"></a>
   9.162 +<h3><font color="#6c0023">gtk+-2.8.20 -  The GIMP Toolkit</font></h3>
   9.163 +<pre> # cd ..
   9.164 + # wget ftp://ftp.gtk.org/pub/gtk/v2.8/gtk+-2.8.20.tar.bz2
   9.165 + # tar xjf gtk+-2.8.20.tar.bz2
   9.166 + # cd gtk+-2.8.20
   9.167 + # ./configure --prefix=/usr --sysconfdir=/etc \
   9.168 +   --mandir=/usr/share/man --with-html-dir=/usr/share/doc
   9.169 + # make
   9.170 + # make DESTDIR=$PWD/_pkg install
   9.171 + # strip -v _pkg/usr/bin/*
   9.172 + # strip -v _pkg/usr/lib/*.so*
   9.173 + # strip -v --strip-unneeded \
   9.174 +   _pkg/usr/lib/gtk-2.0/2.4.0/*/*
   9.175 +</pre>
   9.176 +<h4>Install in rootfs</h4>
   9.177 +<pre> # cp -a _pkg/usr/lib/*.so* $fs/usr/lib
   9.178 + # mkdir $fs/usr/lib/gtk-2.0
   9.179 + # cp -a _pkg/usr/lib/gtk-2.0/2.4.0 $fs/usr/lib/gtk-2.0
   9.180 + # rm -rf $fs/usr/lib/gtk-2.0/2.4.0/*/*.la
   9.181 + 
   9.182 + Locale and themes:
   9.183 + # cp -a _pkg/usr/share/locale/fr $fs/usr/share/locale
   9.184 + # cp -a _pkg/usr/share/themes $fs/usr/share
   9.185 + 
   9.186 + The applications:
   9.187 + # cp  _pkg/usr/bin/gtk-query-immodules-2.0 $fs/usr/bin
   9.188 + # cp  _pkg/usr/bin/gtk-update-icon-cache $fs/usr/bin
   9.189 + # cp  _pkg/usr/bin/gdk-pixbuf-csource $fs/usr/bin
   9.190 + # cp  _pkg/usr/bin/gdk-pixbuf-query-loaders $fs/usr/bin
   9.191 + ...
   9.192 + 
   9.193 + For the gtk-demo application:
   9.194 + # cp -a _pkg/usr/bin/gtk-demo $fs/usr/bin
   9.195 + # cp -a _pkg/usr/share/gtk-2.0 $fs/usr/share
   9.196 +</pre>
   9.197 +<p>
   9.198 +Create files /etc/gtk-2.0/gtk.immodules and gdk-pixbuf.loaders via a chroot in the rootfs:
   9.199 +</p>
   9.200 +<pre> # chroot $fs /bin/ash
   9.201 + /# mkdir /etc/gtk-2.0
   9.202 + /# gtk-query-immodules-2.0 &gt; /etc/gtk-2.0/gtk.immodules
   9.203 + /# gdk-pixbuf-query-loaders &gt; /etc/gtk-2.0/gdk-pixbuf.loaders
   9.204 + # exit
   9.205 +</pre>
   9.206 +<p>
   9.207 +At this stage you can test GTK+ with the 'gtk-demo' application by creating an ISO and using qemu. 
   9.208 +You can also compile a small GTK application such as LeafPad and test! The compiliation and installation 
   9.209 +of GTK+ applications distributed by default with SliTaz are described in the next chapter
   9.210 +<a href="http://www.slitaz.org/doc/scratchbook/gtk-apps.html">GTK apps</a>.
   9.211 +</p>
   9.212 +<a name="initramfs-iso"></a>
   9.213 +<h3><font color="#6c0023">Generate the initramfs and an ISO image</font></h3>
   9.214 +<p>
   9.215 +To create a new ISO image, you can use 'mktaziso' in 
   9.216 +<a href="http://www.slitaz.org/en/doc/cookbook/slitaz-tools.html">SliTaz tools</a> .  
   9.217 +Or you can create a new initramfs image, copy it to /boot in the root of the cdrom
   9.218 +(rootcd) and finally generate an ISO image with genisoimage:
   9.219 +</p>
   9.220 +<pre> # cd $fs
   9.221 + # find . -print | cpio -o -H newc | gzip -9 &gt; ../rootfs.gz
   9.222 + # cd ..
   9.223 + # cp rootfs.gz rootcd/boot
   9.224 + # genisoimage -R -o slitaz-cooking.iso -b boot/isolinux/isolinux.bin \
   9.225 +   -c boot/isolinux/boot.cat -no-emul-boot -boot-load-size 4 \
   9.226 +   -V "SliTaz" -boot-info-table rootcd 
   9.227 +</pre>
   9.228 +<h4>Following chapter</h4>
   9.229 +<p>
   9.230 +After the libraries, the
   9.231 +<a href="gtk-apps.html">GTK+ applications</a>.
   9.232 +</p>
   9.233 +
   9.234 +
   9.235 +<!-- End of content -->
   9.236 +</div>
   9.237 +
   9.238 +<!-- Footer. -->
   9.239 +<div id="footer">
   9.240 +	<div class="footer-right"></div>
   9.241 +	<a href="#top">Top of the page</a> | 
   9.242 +	<a href="index.html">Table of contents</a>
   9.243 +</div>
   9.244 +
   9.245 +<div id="copy">
   9.246 +    Copyright &copy; 2008 <a href="http://www.slitaz.org/en/">SliTaz</a> -
   9.247 +    <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>;<br />
   9.248 +    Documentation is under
   9.249 +    <a href="http://www.gnu.org/copyleft/fdl.html">GNU Free Documentation License</a>
   9.250 +    and code is <a href="http://validator.w3.org/">valid xHTML 1.0</a>.
   9.251 +</div>
   9.252 +
   9.253 +</body>
   9.254 +</html>
    10.1 Binary file pt/doc/scratchbook/images/css/content-tl.png has changed
    11.1 Binary file pt/doc/scratchbook/images/css/content-tr.png has changed
    12.1 Binary file pt/doc/scratchbook/images/css/footer-bl.png has changed
    13.1 Binary file pt/doc/scratchbook/images/css/footer-br.png has changed
    14.1 Binary file pt/doc/scratchbook/images/css/header.png has changed
    15.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.2 +++ b/pt/doc/scratchbook/index.html	Fri Jan 30 18:32:32 2009 +0000
    15.3 @@ -0,0 +1,165 @@
    15.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    15.5 +    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    15.6 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    15.7 +<head>
    15.8 +    <title>SliTaz Scratchbook</title>
    15.9 +    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
   15.10 +    <meta name="description" content="" />
   15.11 +    <meta name="expires" content="never" />
   15.12 +    <meta name="modified" content="2008-11-22 17:00:00" />
   15.13 +    <meta name="publisher" content="www.slitaz.org" />
   15.14 +    <meta name="author" content="Christophe Lincoln"/>
   15.15 +    <link rel="shortcut icon" href="favicon.ico" />
   15.16 +    <link rel="stylesheet" type="text/css" href="book.css" />
   15.17 +</head>
   15.18 +<body bgcolor="#ffffff">
   15.19 +
   15.20 +<!-- Header and quick navigation -->
   15.21 +<div id="header">
   15.22 +<div align="right" id="quicknav">
   15.23 +    <a name="top"></a>
   15.24 +    <a href="../index.html">SliTaz doc</a>
   15.25 +</div>
   15.26 +<h1><font color="#3E1220">SliTaz Scratchbook</font></h1>
   15.27 +</div>
   15.28 +
   15.29 +<!-- Content. -->
   15.30 +<div id="content">
   15.31 +<div class="content-right"></div>
   15.32 +
   15.33 +
   15.34 +<h2><font color="#df8f06">Scratchbook</font></h2>
   15.35 +<p>
   15.36 +Index of documents, step by step construction of a mini GNU/LINUX
   15.37 +LiveCD and installation instructions.
   15.38 +</p>
   15.39 +<h3><font color="#6c0023">Table of contents</font></h3>
   15.40 +<h4>LiveCD</h4>
   15.41 +<ul>
   15.42 +	<li><a href="#intro">Introduction.</a></li>
   15.43 +	<li><a href="#org">Organize a working directory.</a></li>
   15.44 +	<li><a href="base-system.html">Construction of the base SliTaz system.</a></li>
   15.45 +	<li><a href="base-apps.html">Base applications.</a></li>
   15.46 +	<li><a href="base-ncurses.html">Ncurses libraries and applications.</a></li>
   15.47 +	<li><a href="locale.html">Install and configure Locale &amp; i18n.</a></li>
   15.48 +	<li><a href="boot-scripts.html">Boot scripts.</a></li>
   15.49 +	<li><a href="x-window-system.html">X window system.</a></li>
   15.50 +	<li><a href="gtk-libs.html">GTK+ packages and libraries.</a></li>
   15.51 +	<li><a href="gtk-apps.html">GTK+ applications.</a></li>
   15.52 +	<li><a href="xorg.html">Xorg.</a></li>
   15.53 +</ul>
   15.54 +
   15.55 +<a name="intro"></a>
   15.56 +<h3><font color="#6c0023">Introduction</font></h3>
   15.57 +<p>
   15.58 +The scratchbook allows you to track the creation of the first public 
   15.59 +release of SliTaz and make a trip to the heart of GNU/LINUX. You'll
   15.60 +be able to customize your new system or create your own autonomous
   15.61 +distro running in system memory (RAM) that's fully installable on
   15.62 +a hard drive or USB key. Once started you'll be able to remove the
   15.63 +CD-ROM and still have SliTaz working. SliTaz can also be used as an
   15.64 +environment in which we can chroot or use the cdrom for multitasking. 
   15.65 +The only prerequisite is a host distribution in which you can store
   15.66 +libraries, use a compiler and development tools, etc. The host
   15.67 +system can be a chrooted development environment, a minimal
   15.68 +distro, SliTaz installed on a hard drive or a 'general' distro such
   15.69 +as Debian, Slackware, Fedora, Gentoo, Mandriva, Arch, etc. Note
   15.70 +that nothing is installed in the host system by our commands.
   15.71 +</p>
   15.72 +<p>
   15.73 +SliTaz uses the 'Swiss Army Knife' BusyBox as the basis of the system and 
   15.74 +the Linux Kernel, it runs embedded using a small memory footprint and 
   15.75 +provides many files. BusyBox is our main source of information 
   15.76 +and it's a utility of the Debian project which we use and cherish.
   15.77 +</p>
   15.78 +<p>
   15.79 +SliTaz uses the Syslinux bootloader and an archived initramfs 
   15.80 +compressed with cpio. This archive is then decompressed in memory
   15.81 +at boot by the kernel into a system of no fixed size, retaining
   15.82 +control over init. At the time of compilation or copying of 
   15.83 +applications, we use strip to clean the repositoiries. The system commands
   15.84 +genisoimage or mkisofs are used to create the iso images. To
   15.85 +finish, you can test the iso image with Qemu or engrave the 
   15.86 +generated iso on to a rewritable cdrom.
   15.87 +</p>
   15.88 +<a name="org"></a>
   15.89 +<h3><font color="#6c0023">Organize a working directory</font></h3>
   15.90 +<p>
   15.91 +To create SliTaz, we need a working directory and several subdirectories
   15.92 +Whether you have a chrooted environment for developing or a host
   15.93 +system, we advise to use a directory named distro/ in which to 
   15.94 +work. The distro/ directory can be a simple folder or a partition,
   15.95 +but you are obviously free to put all of this elsewhere.
   15.96 +</p>
   15.97 +<h4>distro/</h4>
   15.98 +<p>Contents of a working directory:
   15.99 +</p>
  15.100 +<ul>
  15.101 +	<li>rootfs/ --&gt; The root filesystem - this is the root system, designed 
  15.102 +	to operate in RAM, it is used to generate the initramfs image.</li>
  15.103 +	<li>rootfs.gz --&gt; The initramfs image of our system - a cpio 
  15.104 +	archive compressed with gzip.</li>
  15.105 +	<li>rootcd/ --&gt; The rootcd. This is the root of the cdrom files.</li>
  15.106 +	<li>src/ --&gt; The sources, Kernel, Syslinux, Busybox, Dropbear,
  15.107 +	etc (it can also be a symbolic link).</li>
  15.108 +</ul>
  15.109 +<p>
  15.110 +Thereafter, the initramfs and bootable ISO image (slitaz-cooking.iso)
  15.111 +will be created in the root directory of our work named SliTaz/.
  15.112 +</p>
  15.113 +<h4>Option: rootfs.ext2 - using a virtual hard drive</h4>
  15.114 +<p>
  15.115 +Option: rootfs.ext2 (root filesystem in ext2) is a virtual hard disk
  15.116 +formatted with ext2 and mounted on a (rootfs) loop. A device loop allows
  15.117 +a file to be used as a standard device (hard drive, floppy, etc) to build
  15.118 +a filesystem inside. This file can be any number of megabytes, we propose
  15.119 +20,480, which corresponds to 20MB:
  15.120 +</p>
  15.121 +<pre> # dd if=/dev/zero of=rootfs.ext2 bs=1k count=20480
  15.122 +</pre>
  15.123 +<p>
  15.124 +Create a ext2 filesystem named rootfs.ext2, the option -F formats the
  15.125 +file. Note that the -m 0 option doesn't allocate any space for the user
  15.126 +root - by default it occupies approximately 5% and the -t option defines
  15.127 +the type of filesystem to be used, such as ext2 or ext3:
  15.128 +</p>
  15.129 +<pre> # mkfs -t ext2 -F -m 0 rootfs.ext2
  15.130 +</pre>
  15.131 +<p>
  15.132 +We can now assemble rootfs.ext2 with a loop, thanks to the -o loop option
  15.133 +provided by the mount utility in the rootfs/ directory. You can check if 
  15.134 +the assembly went well with the <code>df-h</code> command:
  15.135 +</p>
  15.136 +<pre> # mkdir rootfs
  15.137 + # mount -o loop rootfs.ext2 rootfs
  15.138 + # df -h
  15.139 +</pre>
  15.140 +<p>
  15.141 +At the end of the session, you can dismount the volume with umount:
  15.142 +</p>
  15.143 +<pre> # umount rootfs
  15.144 +</pre>
  15.145 +<p>
  15.146 +Now we can proceed to the construction of the <a href="base-system.html">base SliTaz system</a>.
  15.147 +</p>
  15.148 +
  15.149 +<!-- End of content -->
  15.150 +</div>
  15.151 +
  15.152 +<!-- Footer. -->
  15.153 +<div id="footer">
  15.154 +	<div class="footer-right"></div>
  15.155 +	<a href="#top">Top of the page</a> | 
  15.156 +	<a href="index.html">Table of contents</a>
  15.157 +</div>
  15.158 +
  15.159 +<div id="copy">
  15.160 +    Copyright &copy; 2008 <a href="http://www.slitaz.org/en/">SliTaz</a> -
  15.161 +    <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>;<br />
  15.162 +    Documentation is under
  15.163 +    <a href="http://www.gnu.org/copyleft/fdl.html">GNU Free Documentation License</a>
  15.164 +    and code is <a href="http://validator.w3.org/">valid xHTML 1.0</a>.
  15.165 +</div>
  15.166 +
  15.167 +</body>
  15.168 +</html>
    16.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.2 +++ b/pt/doc/scratchbook/locale.html	Fri Jan 30 18:32:32 2009 +0000
    16.3 @@ -0,0 +1,162 @@
    16.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    16.5 +    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    16.6 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    16.7 +<head>
    16.8 +    <title>SliTaz Scratchbook - Locale &amp; i18n</title>
    16.9 +    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
   16.10 +    <meta name="description" content="" />
   16.11 +    <meta name="expires" content="never" />
   16.12 +    <meta name="modified" content="2008-11-22 17:00:00" />
   16.13 +    <meta name="publisher" content="www.slitaz.org" />
   16.14 +    <meta name="author" content="Christophe Lincoln"/>
   16.15 +    <link rel="shortcut icon" href="favicon.ico" />
   16.16 +    <link rel="stylesheet" type="text/css" href="book.css" />
   16.17 +</head>
   16.18 +<body bgcolor="#ffffff">
   16.19 +
   16.20 +<!-- Header and quick navigation -->
   16.21 +<div id="header">
   16.22 +<div align="right" id="quicknav">
   16.23 +    <a name="top"></a>
   16.24 +    <a href="base-ncurses.html">Base ncurses</a> |
   16.25 +    <a href="index.html">Table of contents</a> |
   16.26 +    <a href="boot-scripts.html">Boot scripts</a>
   16.27 +</div>
   16.28 +<h1><font color="#3E1220">SliTaz Scratchbook</font></h1>
   16.29 +</div>
   16.30 +
   16.31 +<!-- Content. -->
   16.32 +<div id="content">
   16.33 +<div class="content-right"></div>
   16.34 +
   16.35 +
   16.36 +<h2><font color="#df8f06">Locale &amp; i18n</font></h2>
   16.37 +<p>
   16.38 +Installation and configuration of locales.
   16.39 +</p>
   16.40 +<ul>
   16.41 +	<li><a href="#install">Locale installation.</a></li>
   16.42 +	<li><a href="#config">Config and use of locale on SliTaz.</a></li>
   16.43 +</ul>
   16.44 +<a name="install"></a>
   16.45 +<h3><font color="#6c0023">Locale installation</font></h3>
   16.46 +<p>
   16.47 +This chapter describes the installation of locales in SliTaz GNU/Linux from a SliTaz GNU/Linux host system. 
   16.48 +The installation of locales contained in the X server are described in the chapter 
   16.49 +<a href="x-window-system.html">X window system</a>. The various files copied in this chapter come from the 
   16.50 +compiliation package glibc-2.3.6 forming part of the <em>toolchain</em>.
   16.51 +</p>
   16.52 +<h4>Various file directories</h4>
   16.53 +<p>
   16.54 +We begin by creating the directories that contain libraries and files relevant to the different locales. 
   16.55 +The directory LC_MESSAGES contains the files for the translated messages (.mo), if they exist:
   16.56 +</p>
   16.57 +<pre> # mkdir -p rootfs/usr/share/{i18n,locale}
   16.58 + # mkdir -p rootfs/usr/lib/{locale,gconv}
   16.59 + # mkdir -p rootfs/usr/share/i18n/{charmaps,locales}
   16.60 + # mkdir -p rootfs/usr/share/locale/fr/LC_MESSAGES
   16.61 +</pre>
   16.62 +<p>
   16.63 +Copy the localization files for French, Swiss-French and Swiss-German in /usr/share/i18n/locales:
   16.64 +</p>
   16.65 +<pre> # cp -a /usr/share/i18n/locales/{de_CH,fr_CH,fr_FR,i18n,iso14651_t1} \
   16.66 +   rootfs/usr/share/i18n/locales
   16.67 +</pre>
   16.68 +<p>   
   16.69 +Copy the translit_* files in /usr/share/i18n/locales:
   16.70 +</p>
   16.71 +<pre> # cp -a /usr/share/i18n/locales/{translit_circle,translit_cjk_compat} \
   16.72 +   rootfs/usr/share/i18n/locales
   16.73 + # cp -a /usr/share/i18n/locales/{translit_combining,translit_compat} \
   16.74 +   rootfs/usr/share/i18n/locales   
   16.75 + # cp -a /usr/share/i18n/locales/{translit_font,translit_fraction} \
   16.76 +   rootfs/usr/share/i18n/locales
   16.77 + # cp -a /usr/share/i18n/locales/{translit_narrow,translit_neutral} \
   16.78 +   rootfs/usr/share/i18n/locales
   16.79 + # cp -a /usr/share/i18n/locales/{translit_small,translit_wide} \
   16.80 +   rootfs/usr/share/i18n/locales
   16.81 +</pre>
   16.82 +<p>
   16.83 +Copy the charmaps files in /usr/share/i18n/charmaps:
   16.84 +</p>
   16.85 +<pre> # cp -a /usr/share/i18n/charmaps/ANSI_X3.* rootfs/usr/share/i18n/charmaps
   16.86 + # cp -a /usr/share/i18n/charmaps/{ISO-8859-1.gz,ISO-8859-2.gz,ISO-8859-15.gz} \
   16.87 +   rootfs/usr/share/i18n/charmaps
   16.88 +</pre>
   16.89 +<p>
   16.90 +Copy the gconv libraries in /usr/lib/gconv to rootfs of SliTaz:
   16.91 +</p>
   16.92 +<pre> # cp /usr/lib/gconv/{ANSI_X3.110.so,gconv-modules,UNICODE.so} \
   16.93 +   rootfs/usr/lib/gconv
   16.94 + # cp /usr/lib/gconv/{ISO8859-1.so,ISO8859-2.so,ISO8859-15.so} \
   16.95 +   rootfs/usr/lib/gconv
   16.96 + # strip -v rootfs/usr/lib/gconv/*.so
   16.97 +</pre>
   16.98 +<p>
   16.99 +Copy the locale utility:
  16.100 +</p>
  16.101 +<pre> # cp /usr/bin/locale rootfs/usr/bin
  16.102 +</pre>
  16.103 +<p>
  16.104 +It's necessary that the file /usr/lib/locale/locale-archive is generated, 
  16.105 +for that we use the localedef utility while chrooted in SliTaz:
  16.106 +</p>
  16.107 +<pre> # cp /usr/bin/localedef rootfs/usr/bin
  16.108 + # chroot rootfs /bin/ash
  16.109 +</pre>
  16.110 +<p>
  16.111 +Use of <code>localedef</code> for French-speaking Switzerland and France:
  16.112 +</p>
  16.113 +<pre> /# localedef -i fr_CH -f ISO-8859-1 fr_CH
  16.114 + /# localedef -i fr_FR -f ISO-8859-1 fr_FR
  16.115 + /# exit
  16.116 +</pre>
  16.117 +<p>
  16.118 +You can delete the <code>localedef</code> binary to gain some space:
  16.119 +</p>
  16.120 +<pre> # rm rootfs/usr/bin/localedef
  16.121 +</pre>
  16.122 +<a name="config"></a>
  16.123 +<h3><font color="#6c0023">Config and use of locale</font></h3>
  16.124 +<p>
  16.125 +To use a language in a session, you can create a script launched at boot, or 
  16.126 +add 2 lines to the ~/.profile specific to each user with:
  16.127 +</p>
  16.128 +<pre class="script">
  16.129 +export LANG=fr_CH
  16.130 +export LC_ALL=fr_CH
  16.131 +
  16.132 +</pre>
  16.133 +<p>
  16.134 +Voil&agrave;, the French language should now function If you installed retawq or nano, you can check the 
  16.135 +performance of locales by copying the .mo files in the sources of Retawq or Nano to /usr/share/locale/fr/LC_MESSAGES.
  16.136 +</p>
  16.137 +<h4>Following chapter</h4>
  16.138 +<p>
  16.139 +SliTaz uses the /etc/init.d/i18n.sh script and the /etc/locale.conf configuration file to 
  16.140 +manage the system locale. This is detailed in the next chapter <a href="boot-scripts.html">Boot scripts</a>. 
  16.141 +On a working system, just modify /etc/locale.conf with a text editor or launch 'tazlocale' 
  16.142 +to change the default system locale Or to specify the language as a boot option: <code>lang=xx</code>.
  16.143 +</p>
  16.144 +
  16.145 +
  16.146 +<!-- End of content -->
  16.147 +</div>
  16.148 +
  16.149 +<!-- Footer. -->
  16.150 +<div id="footer">
  16.151 +	<div class="footer-right"></div>
  16.152 +	<a href="#top">Top of the page</a> | 
  16.153 +	<a href="index.html">Table of contents</a>
  16.154 +</div>
  16.155 +
  16.156 +<div id="copy">
  16.157 +    Copyright &copy; 2008 <a href="http://www.slitaz.org/en/">SliTaz</a> -
  16.158 +    <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>;<br />
  16.159 +    Documentation is under
  16.160 +    <a href="http://www.gnu.org/copyleft/fdl.html">GNU Free Documentation License</a>
  16.161 +    and code is <a href="http://validator.w3.org/">valid xHTML 1.0</a>.
  16.162 +</div>
  16.163 +
  16.164 +</body>
  16.165 +</html>
    17.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.2 +++ b/pt/doc/scratchbook/template.html	Fri Jan 30 18:32:32 2009 +0000
    17.3 @@ -0,0 +1,55 @@
    17.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    17.5 +    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    17.6 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    17.7 +<head>
    17.8 +    <title>SliTaz Scratchbook - Template</title>
    17.9 +    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
   17.10 +    <meta name="description" content="" />
   17.11 +    <meta name="expires" content="never" />
   17.12 +    <meta name="modified" content="2008-11-22 17:00:00" />
   17.13 +    <meta name="publisher" content="www.slitaz.org" />
   17.14 +    <meta name="author" content="Christophe Lincoln"/>
   17.15 +    <link rel="shortcut icon" href="favicon.ico" />
   17.16 +    <link rel="stylesheet" type="text/css" href="book.css" />
   17.17 +</head>
   17.18 +<body bgcolor="#ffffff">
   17.19 +
   17.20 +<!-- Header and quick navigation -->
   17.21 +<div id="header">
   17.22 +<div align="right" id="quicknav">
   17.23 +    <a name="top"></a>
   17.24 +    <a href="http://www.slitaz.org/en/">www.slitaz.org/en</a>
   17.25 +</div>
   17.26 +<h1><font color="#3E1220">SliTaz Scratchbook</font></h1>
   17.27 +</div>
   17.28 +
   17.29 +<!-- Content. -->
   17.30 +<div id="content">
   17.31 +<div class="content-right"></div>
   17.32 +
   17.33 +
   17.34 +<p>
   17.35 +CONTENT
   17.36 +</p>
   17.37 +
   17.38 +
   17.39 +<!-- End of content -->
   17.40 +</div>
   17.41 +
   17.42 +<!-- Footer. -->
   17.43 +<div id="footer">
   17.44 +	<div class="footer-right"></div>
   17.45 +	<a href="#top">Top of the page</a> | 
   17.46 +	<a href="index.html">Table of contents</a>
   17.47 +</div>
   17.48 +
   17.49 +<div id="copy">
   17.50 +    Copyright &copy; 2008 <a href="http://www.slitaz.org/en/">SliTaz</a> -
   17.51 +    <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>;<br />
   17.52 +    Documentation is under
   17.53 +    <a href="http://www.gnu.org/copyleft/fdl.html">GNU Free Documentation License</a>
   17.54 +    and code is <a href="http://validator.w3.org/">valid xHTML 1.0</a>.
   17.55 +</div>
   17.56 +
   17.57 +</body>
   17.58 +</html>
    18.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.2 +++ b/pt/doc/scratchbook/x-window-system.html	Fri Jan 30 18:32:32 2009 +0000
    18.3 @@ -0,0 +1,470 @@
    18.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    18.5 +    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    18.6 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    18.7 +<head>
    18.8 +    <title>SliTaz Scratchbook - X Window System</title>
    18.9 +    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
   18.10 +    <meta name="description" content="" />
   18.11 +    <meta name="expires" content="never" />
   18.12 +    <meta name="modified" content="2008-11-22 17:00:00" />
   18.13 +    <meta name="publisher" content="www.slitaz.org" />
   18.14 +    <meta name="author" content="Christophe Lincoln"/>
   18.15 +    <link rel="shortcut icon" href="favicon.ico" />
   18.16 +    <link rel="stylesheet" type="text/css" href="book.css" />
   18.17 +</head>
   18.18 +<body bgcolor="#ffffff">
   18.19 +
   18.20 +<!-- Header and quick navigation -->
   18.21 +<div id="header">
   18.22 +<div id="quicknav" align="right">
   18.23 +	<a name="top"></a>
   18.24 +	<a href="boot-scripts.html">Boot scripts</a> |
   18.25 +	<a href="index.html">Table of contents</a> |
   18.26 +	<a href="gtk-libs.html">GTK+ libs</a>
   18.27 +</div>
   18.28 +<h1><font color="#3e1220">SliTaz Scratchbook</font></h1>
   18.29 +</div>
   18.30 +
   18.31 +<!-- Content. -->
   18.32 +<div id="content">
   18.33 +<div class="content-right"></div>
   18.34 +
   18.35 +
   18.36 +<h2><font color="#df8f06">X window system</font></h2>
   18.37 +<p>
   18.38 +Installation and basic configuration of the X window system.
   18.39 +</p>
   18.40 +<ul>
   18.41 +    <li><a href="#about">About this chapter</a> - Description and environmental
   18.42 +    variable ($fs)</li>
   18.43 +    <li><a href="#expat">expat-2.0.0</a> - XML parser library.</li>
   18.44 +    <li><a href="#freetype">freetype-2.3.1</a> - System font libraries.</li>
   18.45 +    <li><a href="#fontconfig">fontconfig 2.4.2</a> - Font management tools.</li>
   18.46 +    <li><a href="#xserver">Xserver</a> - Graphical server Xvesa of Xfree86
   18.47 +    4.6.0 and Xorg libraries.</li>
   18.48 +    <li><a href="#xterm">xterm-223</a> - Terminal emulator.</li>
   18.49 +    <li><a href="#libpng">libpng-1.2.18</a> - Libraries that manipulate PNG images.</li>
   18.50 +    <li><a href="#jwm">jwm-2.0</a> - Window manager.</li>
   18.51 +    <li><a href="#jpeg">jpeg-6b</a> - Libraries that manipulate JPEG images.</li>
   18.52 +    <li><a href="#tiff">tiff-3.8.2</a> - TIFF libraries and utilities.</li>
   18.53 +    <li><a href="#links">links-2.1pre29</a> - Graphical and text web browser.</li>
   18.54 +    <li><a href="#initramfs-iso">Generate the initramfs and an ISO image.</a></li>
   18.55 +</ul>
   18.56 +<a name="about"></a>
   18.57 +<h3><font color="#6c0023">About</font></h3>
   18.58 +<p>
   18.59 +This chapter describes the installation and configuration of the X window system on SliTaz. We will 
   18.60 +install libraries for expat, XML, fonts, a graphical server (Xvesa), a terminal emulator (xterm), 
   18.61 +various small tools and a window manager (JWM). We'll also install the JPEG libraries and Links web browser.
   18.62 +</p>
   18.63 +<h4>Environmental variable ($fs)</h4>
   18.64 +<p>
   18.65 +If you do not specify any path to the rootfs directory, export the environmental variable:
   18.66 +</p>
   18.67 +<pre> # export fs=$PWD/rootfs
   18.68 +</pre>
   18.69 +<p>
   18.70 +To check:
   18.71 +</p>
   18.72 +<pre> # echo $fs
   18.73 +</pre>
   18.74 +<a name="expat"></a>
   18.75 +<h3><font color="#6c0023">expat-2.0.0 - XML parser library</font></h3>
   18.76 +<p>
   18.77 +Expat (<a href="http://expat.sourceforge.net/">http://expat.sourceforge.net/</a>)
   18.78 +contains the XML parsing libraries:
   18.79 +</p>
   18.80 +<pre> # cd ..
   18.81 + # wget http://switch.dl.sourceforge.net/sourceforge/expat/expat-2.0.0.tar.gz
   18.82 + # tar xzf expat-2.0.0.tar.gz
   18.83 + # cd expat-2.0.0
   18.84 + # ./configure --sysconfdir=/etc --prefix=/usr \
   18.85 +   --mandir=/usr/share/man
   18.86 + # make
   18.87 + # make DESTDIR=$PWD/_pkg install
   18.88 + # strip -v _pkg/usr/lib/*
   18.89 + # strip -v _pkg/usr/bin/*
   18.90 +</pre>
   18.91 +<p>
   18.92 +Thereafter, we will install 'xterm' which needs libexpat.so.0, simply create a symbolic link and voil&agrave;. 
   18.93 +Then you can install the 'xmlwf' application and libraries in the rootfs:
   18.94 +</p>
   18.95 +<pre> # cd _pkg/usr/lib
   18.96 + # ln -s libexpat.so.1.5.0 libexpat.so.0
   18.97 + # cp -a *.so* $fs/usr/lib
   18.98 + # cd ..
   18.99 + # cp -a bin/* $fs/usr/bin
  18.100 + # cd ../..
  18.101 +</pre>
  18.102 +<h4>libs</h4>
  18.103 +Libraries used by xmlwf:
  18.104 +<pre class="script">        libexpat.so.1 =&gt; /usr/lib/libexpat.so.1 (0x40021000)
  18.105 +        libc.so.6 =&gt; /lib/tls/libc.so.6 (0x40041000)
  18.106 +        /lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0x40000000)
  18.107 +</pre>
  18.108 +<a name="freetype"></a>
  18.109 +<h3><font color="#6c0023">freetype-2.3.1 - System font libraries</font></h3>
  18.110 +<p>
  18.111 +The package freetype (<a href="http://www.freetype.org/">http://www.freetype.org/</a>) 
  18.112 +contains libraries used by X for configuring the system fonts:
  18.113 +</p>
  18.114 +<pre> # cd ..
  18.115 + # wget http://download.savannah.gnu.org/releases/freetype/freetype-2.3.1.tar.bz2
  18.116 + # tar xjf freetype-2.3.1.tar.bz2
  18.117 + # cd freetype-2.3.1
  18.118 + # ./configure --sysconfdir=/etc --prefix=/usr \
  18.119 +   --mandir=/usr/share/man
  18.120 + # make
  18.121 + # make DESTDIR=$PWD/_pkg install
  18.122 + # strip -vs _pkg/usr/lib/*
  18.123 + # cp -a _pkg/usr/bin/* $fs/usr/bin
  18.124 + # cp -a _pkg/usr/lib/*.so* $fs/usr/lib
  18.125 +</pre>
  18.126 +<a name="fontconfig"></a>
  18.127 +<h3><font color="#6c0023">fontconfig-2.4.2 - Manage system fonts</font></h3>
  18.128 +<p>
  18.129 +The fontconfig package (<a href="http://www.fontconfig.org/wiki/">www.fontconfig.org/wiki/</a>) 
  18.130 +provides the libfontconfig library used by many programs under X. Note XFree86 also provides these 
  18.131 +utilities. We chose the original package because it works better with JWM:
  18.132 +</p>
  18.133 +<pre> # cd ..
  18.134 + # wget http://fontconfig.org/release/fontconfig-2.4.2.tar.gz
  18.135 + # tar xzf fontconfig-2.4.2.tar.gz
  18.136 + # cd fontconfig-2.4.2
  18.137 + # ./configure --sysconfdir=/etc --prefix=/usr \
  18.138 +   --mandir=/usr/share/man --localstatedir=/var
  18.139 + # make
  18.140 + # make DESTDIR=$PWD/_pkg install
  18.141 + # strip -v _pkg/usr/bin/*
  18.142 + # strip -v _pkg/usr/lib/*
  18.143 + # cp -a _pkg/usr/bin/* $fs/usr/bin
  18.144 + # cp -a _pkg/usr/lib/*.so* $fs/usr/lib
  18.145 + # cp -a _pkg/etc $fs
  18.146 + # cp -a _pkg/var $fs
  18.147 +</pre>
  18.148 +<h4>libs</h4>
  18.149 +<p>
  18.150 +A 'ldd' on fc-cache gives the libraries below. You can also use libfreetype of XFree86:
  18.151 +</p>
  18.152 +<pre class="script">        libfreetype.so.6 =&gt; /usr/lib/libfreetype.so.6 (0xb7f12000)
  18.153 +        libz.so.1 =&gt; /usr/lib/libz.so.1 (0xb7eff000)
  18.154 +        libexpat.so.1 =&gt; /usr/lib/libexpat.so.1 (0xb7edf000)
  18.155 +        libfontconfig.so.1 =&gt; /usr/lib/libfontconfig.so.1 (0xb7eb0000)
  18.156 +        libc.so.6 =&gt; /lib/tls/libc.so.6 (0xb7d7b000)
  18.157 +        /lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0xb7f8c000)
  18.158 +</pre>
  18.159 +<a name="xserver"></a>
  18.160 +<h3><font color="#6c0023">Xserver - Graphical Xvesa server of Xfree86</font></h3>
  18.161 +<p>
  18.162 +We will use the binary versions of Xvesa server (<a href="http://www.xfree86.org/">www.xfree86.org/</a>) 
  18.163 +and fonts distributed by Xfree86.org. We could also copy Xorg libraries from the host system that would 
  18.164 +be used for compiling X applications. Xvesa works well like this and simplifies things. You can also rebuild
  18.165 +<a href="xorg.html">Xorg packages</a> on your development system.
  18.166 +</p>
  18.167 +<h4>Xtinyx server - Xvesa</h4>
  18.168 +<p>
  18.169 +The Xvesa server is very light and uses tiny libraries; it is contained in the Xtinyx.tgz archive. 
  18.170 +Download and install in /usr/bin of SliTaz rootfs:
  18.171 +</p>
  18.172 +<pre> # cd ..
  18.173 + # mkdir -p XFree86-4.6.0 &amp;&amp; cd XFree86-4.6.0
  18.174 + # wget http://ftp.xfree86.org/pub/XFree86/4.6.0/binaries/Linux-ix86-glibc23/Xtinyx.tgz
  18.175 + # tar xzf Xtinyx.tgz
  18.176 + # cp bin/Xvesa $fs/usr/bin
  18.177 + # strip $fs/usr/bin/Xvesa
  18.178 + # chmod 4711 $fs/usr/bin/Xvesa
  18.179 +</pre>
  18.180 +<h4>libs for Xvesa</h4>
  18.181 +<pre class="script">        libz.so.1 =&gt; /usr/lib/libz.so.1 (0xb7ed6000)
  18.182 +        libm.so.6 =&gt; /lib/tls/libm.so.6 (0xb7eb1000)
  18.183 +        libc.so.6 =&gt; /lib/tls/libc.so.6 (0xb7d7e000)
  18.184 +        /lib/ld-linux.so.2 (0xb7ef8000)
  18.185 +</pre>
  18.186 +<h4>rgb.txt - RGB colors in X</h4>
  18.187 +<p>
  18.188 +The colors configuration file used by the X server is called: <code>rgb.txt</code>; we suggest 
  18.189 +that you copy it to the host system. The library libX11.so will seek the configuration files in 
  18.190 +/usr/share/X11, and the Xvesa server in /usr/X11R6/lib/X11; we create a link in /usr/share/X11 to enable this:
  18.191 +</p>
  18.192 +<pre> # mkdir -p $fs/usr/share/X11
  18.193 + # cp /usr/share/X11/rgb.txt $fs/usr/share/X11
  18.194 + # chroot $fs /bin/ash
  18.195 + /# mkdir -p /usr/X11R6/lib/X11/
  18.196 + /# ln -s /usr/share/X11/rgb.txt /usr/X11R6/lib/X11/rgb.txt
  18.197 + /# exit
  18.198 +</pre>
  18.199 +<h4>Xfnts - Fonts</h4>
  18.200 +<p>
  18.201 +To operate the server, we need the basic fonts; you can download them from Xfree86.org and then compile 
  18.202 +packages from Xorg, or copy them from your host system. The system fonts can be put into different folders 
  18.203 +and the cache updated with <code>lc-cache</code>. Attention, fonts take pride of place and you can only install 
  18.204 +the minimum. /usr/share/fonts contains the TrueType fonts such as bitstream-vera:
  18.205 +</p>
  18.206 +<pre> # wget http://ftp.xfree86.org/pub/XFree86/4.6.0/binaries/Linux-ix86-glibc23/Xfnts.tgz
  18.207 + # tar xzf Xfnts.tgz
  18.208 + # mkdir -p $fs/usr/X11R6/lib/X11/fonts
  18.209 + # mkdir -p $fs/usr/share/fonts/truetype
  18.210 +
  18.211 + Copy the fonts...
  18.212 + (# cp -a lib/X11/fonts/* $fs/usr/X11R6/lib/X11/fonts)
  18.213 + (# cp -a /usr/share/fonts/truetype/* $fs/usr/share/fonts/truetype
  18.214 +</pre>
  18.215 +<p>
  18.216 +Then regenerate the fonts.dir file, you must run mkfontdir on the directory in question:
  18.217 +</p>
  18.218 +<pre> # mkfontdir $fs/usr/X11R6/lib/X11/fonts/75dpi
  18.219 +</pre>
  18.220 +<p>
  18.221 +Fontconfig configuration files can be found in /etc/fonts provided by the fontconfig package. 
  18.222 +Now you can run 'fc-cache' to update the cache, and 'fc-list' for a list of fonts. You do this 
  18.223 +by chrooting into the rootfs:
  18.224 +</p>
  18.225 +<pre> # chroot $fs /bin/ash
  18.226 + # fc-cache -v
  18.227 + # fc-list
  18.228 + # exit
  18.229 +</pre>
  18.230 +<h4>Xlib locale - Localization files</h4>
  18.231 +<p>
  18.232 +On SliTaz, we installed 4 locales: C, iso8859-1, iso8859-15 and iso 8859-2 from the 
  18.233 +<a href="xorg.html">compilation of Xorg</a>. 
  18.234 +You can copy the files from the host system or use the files distributed by XFree86. 
  18.235 +Sample copy of all the locales from the host system:
  18.236 +</p>
  18.237 +<pre> # mkdir -p $fs/usr/share/X11/locale
  18.238 + # cp -a /usr/share/X11/locale/* $fs/usr/share/X11/locale
  18.239 +</pre>
  18.240 +<h4>Using X</h4>
  18.241 +<p>
  18.242 +Note that you can already use Xvesa as a X terminal if you have a machine on the network accepting XDMCP connections. 
  18.243 +For this, you can start the server with the <code>-query</code> option. For example:
  18.244 +</p>
  18.245 +<pre> # Xvesa -ac -shadow -screen 1024x768x24 -query 192.168.0.2
  18.246 +</pre>
  18.247 +<a name="xterm"></a>
  18.248 +<h3><font color="#6c0023">xterm - Terminal Emulator</font></h3>
  18.249 +<p>
  18.250 +The xterm package (<a href="http://invisible-island.net/xterm/">invisible-island.net/xterm/</a>) 
  18.251 +provides a terminal emulator for X:
  18.252 +</p>
  18.253 +<pre> # wget ftp://invisible-island.net/xterm/xterm-223.tgz
  18.254 + # tar xzf xterm-223.tgz
  18.255 + # cd xterm-223
  18.256 + # ./configure --prefix=/usr --sysconfdir=/etc \
  18.257 +   --mandir=/usr/share/man --localstatedir=/var \
  18.258 +   --with-app-defaults=/usr/share/X11/app-defaults \
  18.259 +   --build=i486-pc-linux-gnu --host=i486-pc-linux-gnu
  18.260 + # make
  18.261 + # make DESTDIR=$PWD/_pkg install
  18.262 + # strip _pkg/usr/bin/*
  18.263 + # cp _pkg/usr/bin/* $fs/usr/bin
  18.264 + # cp -a _pkg/usr/share/X11/* $fs/usr/share/X11
  18.265 +</pre>
  18.266 +<h4>libs</h4>
  18.267 +<p>
  18.268 +A ldd on XTerm, we copy (and strip) the missing libraries from the host system:
  18.269 +</p>
  18.270 +<pre class="script">    libXft.so.2 =&gt; /usr/lib/libXft.so.2 (0xb7f09000)
  18.271 +    libXrender.so.1 =&gt; /usr/lib/libXrender.so.1 (0xb7f00000)
  18.272 +    libfontconfig.so.1 =&gt; /usr/lib/libfontconfig.so.1 (0xb7ed5000)
  18.273 +    libfreetype.so.6 =&gt; /usr/lib/libfreetype.so.6 (0xb7e68000)
  18.274 +    libz.so.1 =&gt; /usr/lib/libz.so.1 (0xb7e54000)
  18.275 +    libX11.so.6 =&gt; /usr/lib/libX11.so.6 (0xb7d68000)
  18.276 +    libXaw.so.7 =&gt; /usr/lib/libXaw.so.7 (0xb7d0f000)
  18.277 +    libXmu.so.6 =&gt; /usr/lib/libXmu.so.6 (0xb7cfa000)
  18.278 +    libXext.so.6 =&gt; /usr/lib/libXext.so.6 (0xb7cec000)
  18.279 +    libXt.so.6 =&gt; /usr/lib/libXt.so.6 (0xb7c9e000)
  18.280 +    libSM.so.6 =&gt; /usr/lib/libSM.so.6 (0xb7c96000)
  18.281 +    libICE.so.6 =&gt; /usr/lib/libICE.so.6 (0xb7c7f000)
  18.282 +    libncurses.so.5 =&gt; /lib/libncurses.so.5 (0xb7c3c000)
  18.283 +    libc.so.6 =&gt; /lib/libc.so.6 (0xb7b2c000)
  18.284 +    libexpat.so.1 =&gt; /usr/lib/libexpat.so.1 (0xb7b0b000)
  18.285 +    libXau.so.6 =&gt; /usr/lib/libXau.so.6 (0xb7b08000)
  18.286 +    libXdmcp.so.6 =&gt; /usr/lib/libXdmcp.so.6 (0xb7b03000)
  18.287 +    libdl.so.2 =&gt; /lib/libdl.so.2 (0xb7aff000)
  18.288 +    libXpm.so.4 =&gt; /usr/lib/libXpm.so.4 (0xb7aee000)
  18.289 +</pre>
  18.290 +<a name="libpng"></a>
  18.291 +<h3><font color="#6c0023">libpng-1.2.18 - PNG Libraries</font></h3>
  18.292 +<p>
  18.293 +PNG libraries (<a href="http://libpng.org/pub/png/libpng.html">http://libpng.org/pub/png/libpng.html</a>) 
  18.294 +are used to manipulate and format PNG images:
  18.295 +</p>
  18.296 +<pre> # wget http://puzzle.dl.sourceforge.net/sourceforge/libpng/libpng-1.2.18.tar.bz2
  18.297 + # tar xjf libpng-1.2.18.tar.bz2
  18.298 + # cd libpng-1.2.18
  18.299 + # ./configure --enable-shared --prefix=/usr \
  18.300 +   --mandir=/usr/share/man
  18.301 + # make
  18.302 + # make DESTDIR=$PWD/_pkg install
  18.303 + # strip _pkg/usr/lib/*.so*
  18.304 + # cp -a _pkg/usr/lib/libpng12.so* $fs/usr/lib
  18.305 + # cp -a _pkg/usr/bin/libpng12* $fs/usr/bin
  18.306 +</pre>
  18.307 +<a name="jwm"></a>
  18.308 +<h3><font color="#6c0023">jwm-2.0 - Window manager</font></h3>
  18.309 +<p>
  18.310 +Joe's Window Manager (<a href="http://www.joewing.net/programs/jwm/">http://www.joewing.net/programs/jwm/</a>) 
  18.311 +is an ultra light and friendly window manager. This is the default SliTaz window manager. The main configuration 
  18.312 +file: /etc/jwm/system.jwnrc includes the style and config menu:
  18.313 +</p>
  18.314 +<pre> # cd ..
  18.315 + # wget http://www.joewing.net/programs/jwm/releases/jwm-2.0.tar.bz2
  18.316 + # tar xjf jwm-2.0.tar.bz2
  18.317 + # cd jwm-2.0
  18.318 + # ./configure --prefix=/usr --mandir=/usr/share/man \
  18.319 +   --sysconfdir=/etc/jwm --disable-xinerama
  18.320 + # make
  18.321 + # strip src/jwm
  18.322 + # cp src/jwm $fs/usr/bin
  18.323 + # mkdir $fs/etc/jwm
  18.324 + # cp example.jwmrc $fs/etc/jwm/system.jwmrc
  18.325 +</pre>
  18.326 +<h4>libs</h4>
  18.327 +<p>
  18.328 +Ldd libraries that we have provided:
  18.329 +</p>
  18.330 +<pre class="script">    libX11.so.6 =&gt; /usr/lib/libX11.so.6 (0xb7e35000)
  18.331 +    libpng12.so.0 =&gt; /usr/lib/libpng12.so.0 (0xb7e12000)
  18.332 +    libXft.so.2 =&gt; /usr/lib/libXft.so.2 (0xb7e00000)
  18.333 +    libXrender.so.1 =&gt; /usr/lib/libXrender.so.1 (0xb7df7000)
  18.334 +    libfontconfig.so.1 =&gt; /usr/lib/libfontconfig.so.1 (0xb7dcc000)
  18.335 +    libfreetype.so.6 =&gt; /usr/lib/libfreetype.so.6 (0xb7d5f000)
  18.336 +    libz.so.1 =&gt; /usr/lib/libz.so.1 (0xb7d4a000)
  18.337 +    libXpm.so.4 =&gt; /usr/lib/libXpm.so.4 (0xb7d3a000)
  18.338 +    libXext.so.6 =&gt; /usr/lib/libXext.so.6 (0xb7d2c000)
  18.339 +    libc.so.6 =&gt; /lib/libc.so.6 (0xb7c1c000)
  18.340 +    libXau.so.6 =&gt; /usr/lib/libXau.so.6 (0xb7c19000)
  18.341 +    libXdmcp.so.6 =&gt; /usr/lib/libXdmcp.so.6 (0xb7c14000)
  18.342 +    libdl.so.2 =&gt; /lib/libdl.so.2 (0xb7c0f000)
  18.343 +    libm.so.6 =&gt; /lib/libm.so.6 (0xb7bea000)
  18.344 +    libexpat.so.1 =&gt; /usr/lib/libexpat.so.1 (0xb7bc9000)
  18.345 +</pre>
  18.346 +<p>
  18.347 +You can start the X server and JWM with the command below or create a script in 
  18.348 +/usr/bin/startx with the content:
  18.349 +</p>
  18.350 +<pre>Xvesa -ac -shadow -screen 1024x768x24 &amp; exec jwm
  18.351 +</pre>
  18.352 +<h4>On SliTaz</h4>
  18.353 +<p>
  18.354 +SliTaz uses the ~/.Xsession file to start a graphical session. The 'startx' command checks 
  18.355 +whether the file exists or it runs 'tazx' to configure the X system. The user guide on X 
  18.356 +window is located in: /usr/share/doc/slitaz/user-guide/x-window.html or is on the website:
  18.357 +</p>
  18.358 +<p>
  18.359 +We chose to use the Tango icons theme <a href="http://tango.freedesktop.org/">http://tango.freedesktop.org/</a>, 
  18.360 +that aren't compiled. We only use the minimum: images in 16 x 16 format that we put in /usr/share/icons.
  18.361 +</p>
  18.362 +<p>
  18.363 +To test JWM with a cooking ISO:
  18.364 +</p>
  18.365 +<pre> # Xvesa -ac -shadow -screen 800x600x24 &amp; exec jwm
  18.366 +</pre>
  18.367 +<a name="jpeg"></a>
  18.368 +<h3><font color="#6c0023">jpeg-6b - JPEG Libraries</font></h3>
  18.369 +<p>
  18.370 +Libraries handling JPEG images, and some small utilities:
  18.371 +</p>
  18.372 +<pre> # wget http://www.ijg.org/files/jpegsrc.v6b.tar.gz
  18.373 + # tar xzf jpegsrc.v6b.tar.gz
  18.374 + # cd jpeg-6b
  18.375 + # ./configure --enable-shared --prefix=/usr \
  18.376 +   --mandir=/usr/share/man
  18.377 + # make
  18.378 + # strip .libs/*
  18.379 + # cp -a .libs/*.so* $fs/usr/lib
  18.380 + # cp .libs/{cjpeg,djpeg,jpegtran} $fs/usr/bin
  18.381 +</pre>
  18.382 +<a name="tiff"></a>
  18.383 +<h3><font color="#6c0023">tiff-3.8.2 - TIFF Libraries and Utilities</font></h3>
  18.384 +<p>
  18.385 +Libraries handling TIFF images and some small optional utilities:
  18.386 +</p>
  18.387 +<pre> # wget ftp://ftp.remotesensing.org/pub/libtiff/tiff-3.8.2.tar.gz
  18.388 + # tar xzf tiff-3.8.2.tar.gz
  18.389 + # cd tiff-3.8.2
  18.390 + # ./configure  --prefix=/usr --mandir=/usr/share/man
  18.391 + # make
  18.392 + # make DESTDIR=$PWD/_pkg install
  18.393 + # strip _pkg/usr/bin/*
  18.394 + # strip _pkg/usr/lib/*.so*
  18.395 + # cp -a _pkg/usr/lib/*.so* $fs/usr/lib
  18.396 +</pre>
  18.397 +<p>
  18.398 +You can install the utilities you want.
  18.399 +</p>
  18.400 +<a name="links"></a>
  18.401 +<h3><font color="#6c0023">links-2.1pre29 - Graphical and text mode web browser</font></h3>
  18.402 +<p>
  18.403 +Links (<a href="http://links.twibright.com/">links.twibright.com</a>) is a web browser offering 
  18.404 +graphical and text modes. It is translated into multiple languages, including French:
  18.405 +</p>
  18.406 +<pre> # cd ..
  18.407 + # wget http://links.twibright.com/download/links-2.1pre28.tar.gz
  18.408 + # tar xzf links-2.1pre28.tar.gz
  18.409 + # cd links-2.1pre28
  18.410 + # ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man \
  18.411 +   --without-directfb --without-ssl --enable-graphics --enable-javascript
  18.412 + # make
  18.413 + # make DESTDIR=$PWD/_pkg install
  18.414 + # strip -v _pkg/usr/bin/*
  18.415 + # cp -v _pkg/usr/bin/* $fs/usr/bin
  18.416 +</pre>
  18.417 +<h4>libs</h4>
  18.418 +<pre class="script">    libtiff.so.3 =&gt; /usr/lib/libtiff.so.3
  18.419 +    libjpeg.so.62 =&gt; /usr/lib/libjpeg.so.62 (0xb7ede000)
  18.420 +    libpng12.so.0 =&gt; /usr/lib/libpng12.so.0 (0xb7eba000)
  18.421 +    libz.so.1 =&gt; /usr/lib/libz.so.1 (0xb7ea7000)
  18.422 +    libX11.so.6 =&gt; /usr/lib/libX11.so.6 (0xb7dbb000)
  18.423 +    libdl.so.2 =&gt; /lib/tls/libdl.so.2 (0xb7db7000)
  18.424 +    libpcre.so.0 =&gt; /usr/lib/libpcre.so.0 (0xb7d96000)
  18.425 +    libm.so.6 =&gt; /lib/tls/libm.so.6 (0xb7d70000)
  18.426 +    libc.so.6 =&gt; /lib/tls/libc.so.6 (0xb7c3e000)
  18.427 +    libXau.so.6 =&gt; /usr/lib/libXau.so.6 (0xb7c3b000)
  18.428 +    libXdmcp.so.6 =&gt; /usr/lib/libXdmcp.so.6 (0xb7c36000)
  18.429 +    /lib/ld-linux.so.2 (0xb7f5d000)
  18.430 +</pre>
  18.431 +<a name="initramfs-iso"></a>
  18.432 +<h3><font color="#6c0023">Generate the initramfs and an ISO image</font></h3>
  18.433 +<p>
  18.434 +To create a new ISO image, you can use 'mktaziso' in 
  18.435 +<a href="http://www.slitaz.org/en/doc/cookbook/slitaz-tools.html">SliTaz tools</a> .  
  18.436 +Or you can create a new initramfs image, copy it to /boot in the root of the cdrom
  18.437 +(rootcd) and finally generate an ISO image with genisoimage:
  18.438 +</p>
  18.439 +<pre> # cd $fs
  18.440 + # find . -print | cpio -o -H newc | gzip -9 &gt; ../rootfs.gz
  18.441 + # cd ..
  18.442 + # cp rootfs.gz rootcd/boot
  18.443 + # genisoimage -R -o slitaz-cooking.iso -b boot/isolinux/isolinux.bin \
  18.444 +   -c boot/isolinux/boot.cat -no-emul-boot -boot-load-size 4 \
  18.445 +   -V "SliTaz" -boot-info-table rootcd
  18.446 +</pre>
  18.447 +<h4>Following chapter</h4>
  18.448 +<p>
  18.449 +The next chapter <a href="gtk-libs.html">GTK+ libs</a> 
  18.450 +describes the installation of GTK libraries.
  18.451 +</p>
  18.452 +
  18.453 +
  18.454 +<!-- End of content -->
  18.455 +</div>
  18.456 +
  18.457 +<!-- Footer. -->
  18.458 +<div id="footer">
  18.459 +	<div class="footer-right"></div>
  18.460 +	<a href="#top">Top of the page</a> | 
  18.461 +	<a href="index.html">Table of contents</a>
  18.462 +</div>
  18.463 +
  18.464 +<div id="copy">
  18.465 +    Copyright &copy; 2008 <a href="http://www.slitaz.org/en/">SliTaz</a> -
  18.466 +    <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>;<br />
  18.467 +    Documentation is under
  18.468 +    <a href="http://www.gnu.org/copyleft/fdl.html">GNU Free Documentation License</a>
  18.469 +    and code is <a href="http://validator.w3.org/">valid xHTML 1.0</a>.
  18.470 +</div>
  18.471 +
  18.472 +</body>
  18.473 +</html>
    19.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    19.2 +++ b/pt/doc/scratchbook/xorg.html	Fri Jan 30 18:32:32 2009 +0000
    19.3 @@ -0,0 +1,144 @@
    19.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    19.5 +    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    19.6 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    19.7 +<head>
    19.8 +    <title>SliTaz Scratchbook - Xorg</title>
    19.9 +    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
   19.10 +    <meta name="description" content="" />
   19.11 +    <meta name="expires" content="never" />
   19.12 +    <meta name="modified" content="2008-11-22 17:00:00" />
   19.13 +    <meta name="publisher" content="www.slitaz.org" />
   19.14 +    <meta name="author" content="Christophe Lincoln"/>
   19.15 +    <link rel="shortcut icon" href="favicon.ico" />
   19.16 +    <link rel="stylesheet" type="text/css" href="book.css" />
   19.17 +</head>
   19.18 +<body bgcolor="#ffffff">
   19.19 +
   19.20 +<!-- Header and quick navigation -->
   19.21 +<div id="header">
   19.22 +<div id="quicknav" align="right">
   19.23 +    <a name="top"></a>
   19.24 +    <a href="index.html">Table of contents</a>
   19.25 +</div>
   19.26 +<h1><font color="#3e1220">SliTaz Scratchbook</font></h1>
   19.27 +</div>
   19.28 +
   19.29 +<!-- Content. -->
   19.30 +<div id="content">
   19.31 +<div class="content-right"></div>
   19.32 +
   19.33 +
   19.34 +<h2><font color="#df8f06">How-to Xorg - Modular graphical server</font></h2>
   19.35 +<ul>
   19.36 +    <li><a href="#woking">Build Xorg automatically with Tazwok.</a></li>
   19.37 +    <li><a href="#get">Download Xorg using wget.</a></li>
   19.38 +    <li><a href="#make">Compile Xorg by hand.</a></li>
   19.39 +</ul>
   19.40 +<p>
   19.41 +Note SliTaz uses the Xvesa server provided by XFree86 and Xorg libraries, this page describes 
   19.42 +the compilation of Xorg libraries used by SliTaz. This document is primarily aimed at 
   19.43 +develpers and contributors to the project, but it may be useful to all those seeking to rebuild 
   19.44 +Xorg and Xlib libraries from source generating a minimum of dependencies.
   19.45 +</p>
   19.46 +
   19.47 +<a name="woking"></a>
   19.48 +<h3>Build Xorg automatically with Tazwok</h3>
   19.49 +<p>
   19.50 +On SliTaz, if you have Tazwok installed, you can rebuild Xorg with a few commands. 
   19.51 +The wok contains a package called <code>xorg</code> and another named <code>xorg-dev</code>, 
   19.52 +they can compile/cook all the packages used by Xorg on SliTaz. To compile, you must have 
   19.53 +most of the development packages installed; if this is not the case:
   19.54 +</p>
   19.55 +<pre> # tazpkg get-install slitaz-dev-pkgs
   19.56 +</pre>
   19.57 +<p>
   19.58 +Then you can start to cook (if everything is ready, wok and development packages, etc), 
   19.59 +starting with the protos' (xproto, etc):
   19.60 +</p>
   19.61 +<pre> # tazwok cook xorg-dev-proto
   19.62 + # tazwok cook xorg
   19.63 + # tazwok cook xorg-dev
   19.64 +</pre>
   19.65 +
   19.66 +<a name="get"></a>
   19.67 +<h3>Download Xorg (7.2) using wget</h3>
   19.68 +<p>
   19.69 +Xorg is distributed in the form of modules, which is handy because you can only install what you want, 
   19.70 +but it takes a lot of downloads. To help, we have created a small script that downloads the minimum 
   19.71 +required for SliTaz; you can find the script <code>getXorg.sh</code> in 
   19.72 +<a href="http://www.slitaz.org/en/doc/cookbook/slitaz-tools.html">SliTaz tools (1.1)</a>.
   19.73 +This script is no longer updated, developers use the 
   19.74 +<a href="http://www.slitaz.org/en/doc/cookbook/wok-tools.html">wok and tools</a>. 
   19.75 +To use the script, it must be placed in the directory where you want to download Xorg:
   19.76 +</p>
   19.77 +<pre> # cd ..
   19.78 + # mkdir Xorg &amp;&amp; cd Xorg
   19.79 + # cp slitaz-tools-1.1/utils/getXorg-7.2.sh .
   19.80 + # ./getXorg-7.2.sh
   19.81 +</pre>
   19.82 +<a name="make"></a>
   19.83 +<h3>Compile Xorg by hand</h3>
   19.84 +<p>
   19.85 +Compiling Xorg can take a long time, there are many packages. To commence you need to 
   19.86 +compile the downloaded proto packages, you can use the command <code>make DESTDIR=$PWD/_pkg install</code> to 
   19.87 +install the package in a given directory. Example:
   19.88 +</p>
   19.89 +<pre> # cd proto
   19.90 + # tar xzf xproto-X11R7.2-7.0.10.tar.gz
   19.91 + # cd xproto-X11R7.2-7.0.10
   19.92 + # ./configure --prefix=/usr --sysconfdir=/etc \
   19.93 +   --mandir=/usr/share/man --localstatedir=/var \
   19.94 +   --build=i486-pc-linux-gnu --host=i486-pc-linux-gnu
   19.95 +  # make
   19.96 +  # make install
   19.97 +</pre>
   19.98 +<p>
   19.99 +Compile libraries by taking again the options used by proto. Example using the proper package to 
  19.100 +compile xtrans, remember to run <code>ldconfig</code> if you install the package on the development machine:
  19.101 +</p>
  19.102 +<pre> # cd .. &amp;&amp; cd lib
  19.103 + # tar xzf xtrans-X11R7.2-1.0.3.tar.gz
  19.104 + # cd xtrans-X11R7.2-1.0.3
  19.105 + # ./configure --prefix=/usr --sysconfdir=/etc \
  19.106 +   --mandir=/usr/share/man --localstatedir=/var \
  19.107 +   --build=i486-pc-linux-gnu --host=i486-pc-linux-gnu
  19.108 + # make
  19.109 + # make install
  19.110 + # ldconfig
  19.111 +</pre>
  19.112 +<p>
  19.113 +Once all the packaged libraries are compiled, you can begin to compile X applications such as the 
  19.114 +graphical terminal Xterm. Note: SliTaz uses the RGB package containing the /usr/share/X11/rgt.text 
  19.115 +file for defining colors. Example using the <code>xsetroot</code> application that permits 
  19.116 +you to change the background color of the screen (modify $VERSION for the version that you want downloaded):
  19.117 +</p>
  19.118 +<pre> # cd .. &amp;&amp; cd app
  19.119 + # tar xzf xsetroot-$VERSION.tar.gz
  19.120 + # cd xsetroot-$VERSION
  19.121 + # ./configure --prefix=/usr --sysconfdir=/etc \
  19.122 +   --mandir=/usr/share/man --localstatedir=/var \
  19.123 +   --build=i486-pc-linux-gnu --host=i486-pc-linux-gnu
  19.124 + # make &amp;&amp; make install
  19.125 +</pre>
  19.126 +
  19.127 +
  19.128 +<!-- End of content -->
  19.129 +</div>
  19.130 +
  19.131 +<!-- Footer. -->
  19.132 +<div id="footer">
  19.133 +	<div class="footer-right"></div>
  19.134 +	<a href="#top">Top of the page</a> | 
  19.135 +	<a href="index.html">Table of contents</a>
  19.136 +</div>
  19.137 +
  19.138 +<div id="copy">
  19.139 +    Copyright &copy; 2008 <a href="http://www.slitaz.org/en/">SliTaz</a> -
  19.140 +    <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>;<br />
  19.141 +    Documentation is under
  19.142 +    <a href="http://www.gnu.org/copyleft/fdl.html">GNU Free Documentation License</a>
  19.143 +    and code is <a href="http://validator.w3.org/">valid xHTML 1.0</a>.
  19.144 +</div>
  19.145 +
  19.146 +</body>
  19.147 +</html>