website view en/doc/handbook/x-window.html @ rev 131

en: Update Hdbk E17 (new page?) + typo
author Paul Issott <paul@slitaz.org>
date Sun Aug 03 10:04:21 2008 +0000 (2008-08-03)
parents 7b25ef27623c
children 60f719570806
line source
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <title>SliTaz Handbook (en) - X Window System</title>
6 <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
7 <meta name="description" content="slitaz English handbook X server window manager jwm openbox e17 slim login" />
8 <meta name="expires" content="never" />
9 <meta name="modified" content="2008-07-18 07:00:00" />
10 <meta name="publisher" content="www.slitaz.org" />
11 <meta name="author" content="Christophe Lincoln, Paul Issot" />
12 <link rel="shortcut icon" href="favicon.ico" />
13 <link rel="stylesheet" type="text/css" href="book.css" />
14 </head>
15 <body bgcolor="#ffffff">
17 <!-- Header and quick navigation -->
18 <div id="header">
19 <div id="quicknav" align="right">
20 <a name="top"></a>
21 <a href="gen-livecd.html">Generate a LiveCD flavor</a> |
22 <a href="index.html">Table of contents</a>
23 </div>
24 <h1><font color="#3e1220">SliTaz Handbook (en)</font></h1>
25 </div>
27 <!-- Content. -->
28 <div id="content">
29 <div class="content-right"></div>
31 <h2><font color="#df8f06">X Window System</font></h2>
33 <ul>
34 <li><a href="#X11">X Window System.</a></li>
35 <li><a href="#slim">Slim</a> - Simple Login Manager.</li>
36 <li><a href="#xorg">Xorg</a> - X server.</li>
37 <li><a href="#jwm">JWM</a> - Window Manager.</li>
38 <li><a href="#enlightenment">Enlightenment (e17).</a> - Desktop
39 environment.</li>
40 <li><a href="#openbox">Openbox</a> - Window Manager.</li>
41 <li><a href="#fonts">Fonts</a> - System Fonts.</li>
42 </ul>
44 <a name="X11"></a>
45 <h3>X11 - X Window System</h3>
46 <p>
47 The X Window System or X11 provides a window manager running on
48 top of a X server. SliTaz by default uses the lightweight X server called
49 <code>Xvesa</code> from the Xorg project (<a href="http://www.x.org/">www.x.org</a>).
50 Xvesa can be started with the Slim login manager or directly from a Linux console
51 with the command <code>startx</code>, but for this you must first disable the
52 Login Manager. To reconfigure your X session you can use <code>tazx</code>
53 as root or as the current user if you start X from the command line.
54 </p>
56 <a name="slim"></a>
57 <h3>Slim - Simple Login Manager</h3>
58 <p>
59 Slim is a lightweight session manager that is very easy to configure and is
60 customizable using system themes. The configuration file is found in
61 <code>/etc/slim.conf</code>. It defines window managers available via the
62 <code>F1</code> key, the default user or theme, and the X window system parameters.
63 Slim offers special user commands like <code>console</code> to help manage
64 the session.
65 </p>
66 <p>
67 In LiveCD mode you can disable Slim with the boot option <code>screen=text</code>.
68 On an installed system you can remove the package or delete slim from the
69 <code>RUN_DAEMONS</code> variable in <code>/etc/rcS.conf</code>.
70 </p>
71 <p>
72 More details and themes can be found on the
73 <a href="http://slim.berlios.de/">website</a>
74 </p>
75 <h4>Default user</h4>
76 <p>
77 Slim offers a way to pre-load a user login name, by default hacker is configured
78 for convenience. You can change this by editing the Slim configuration file
79 <code>/etc/slim.conf</code> and modifying the line <code>default_user</code> or just
80 leave the line blank to avoid pre-loading a user name. Example:
81 </p>
82 <pre class="script">default_user hacker
83 </pre>
85 <a name="xorg"></a>
86 <h3>Xorg</h3>
87 <p>
88 By default, SliTaz provides the graphical mini-server Xvesa. Xorg server is available
89 in the packages on the mirror. Xorg is a very comprehensive server, but uses a lot more
90 resources than Xvesa. If your resolution is supported by the mini-server and you're happy
91 with the refresh rate, then there's no reason to use Xorg.
92 </p>
93 <p>
94 There is no GUI configuration which means having to use the command line in console mode. The installation
95 and configuration of the server is relatively simple and you can always go back and reuse Xvesa at any time.
96 Xorg is distributed in modular form, which means that you'll need to install the server, a few configuration
97 files and the right driver for your graphics card. However the <code>xorg-server</code> package has all
98 the correct dependancies to work directly with the <code>vesa</code> driver. Minimal install:
99 </p>
100 <pre> # tazpkg get-install xorg-server
101 </pre>
102 <p>
103 Once installed, you can go directly to the configuration or you can install the correct driver for your card
104 (if you know it). Example using the Nvidia driver and listing all available drivers:
105 </p>
106 <pre> # tazpkg get-install xorg-xf86-video-nv
107 List:
108 # tazpkg search xorg-xf86-video
109 </pre>
110 <h4>Automatic configuration of the server</h4>
112 <p>To configure the Xorg server you have two options: <code>Xorg -configure</code>
113 or the script <code>xorgconfig</code>. It is recommended that you start by using Xorg with
114 the <code>-configure</code> option. The automatic configuration of Xorg must be done in console
115 mode without an X-server running; this is achieved by closing all applications and windows and hitting
116 the <code>alt-ctrl-del</code> buttons. You should now be in console mode. Now you need to run Xorg with the
117 <code>-configure</code> option and copy the newly generated file to <code>/etc/X11</code>:
118 </p>
119 <pre> # Xorg -configure
120 # cp /root/xorg.conf.new /etc/X11/xorg.conf
121 </pre>
122 <p>
123 Finally you then change the configuration of Slim to use Xorg instead of Xvesa and restart the window manager.
124 </p>
125 <h4>Using Xorg with Slim</h4>
126 <p>
127 In the Slim configuration file (<code>/etc/slim.conf</code>), we need to comment out
128 (<code>#</code>) the lines pertaining to Xvesa and change Xorg to the <code>default_xserver</code>:
129 </p>
130 <pre class="script">default_xserver /usr/bin/Xorg
131 #default_xserver /usr/bin/Xvesa
132 #xserver_arguments -ac -shadow dpms +extension Composite -screen 1024x768x24
133 </pre>
134 <p>
135 Now we can start Slim to return us to an X server session.
136 Slim works likes a daemon, it can be stopped or started from the console:
137 </p>
138 <pre> # /etc/init.d/slim start
139 </pre>
140 <h4>xorg.conf - Configuration file</h4>
141 <p>
142 Xorg uses the configuration file <code>/etc/X11/xorg.conf</code>. This file can be
143 automatically generated and edited with your favorite text editor. It is divided into
144 several sections, including the specification of paths, modules to be loaded, default screen,
145 mouse, keyboard, etc. This document provides only a few examples, it is advisable to run
146 <code>xorgconfig</code> once to generate a complete file to use as an example.
148 </p>
149 <p>
150 Keyboard (en):
151 </p>
152 <pre class="script">Section "InputDevice"
153 Identifier "Keyboard0"
154 Driver "kbd"
155 Option "XkbRules" "xorg"
156 Option "XkbModel" "pc105"
157 Option "XkbLayout" "en"
158 Option "XkbVariant" "en"
159 EndSection
160 </pre>
161 <p>
162 Mice with auto detection protocol:
163 </p>
164 <pre class="script">Section "InputDevice"
165 Identifier "Mouse0"
166 Driver "mouse"
167 Option "Protocol" "auto"
168 Option "Device" "/dev/input/mice"
169 Option "ZAxisMapping" "4 5 6 7"
170 EndSection
171 </pre>
172 <p>
173 Composite extensions:
174 </p>
175 <pre class="script">Section "Extensions"
176 Option "Composite" "1"
177 EndSection
178 </pre>
180 <a name="jwm"></a>
181 <h3>JWM - Window manager</h3>
182 <p>
183 JWM (Joe's Window Manger) is a lightweight Window Manager, easy to use, fast,
184 stable and insanely configurable. The menu and theme can all be changed from a
185 single configuration file found in your home directory: <code>~/.jwmrc</code>,
186 the file uses XML syntax and the code is nicely colored if you use Geany to
187 edit it. To add an entry in the menu you can use the following example:
188 </p>
189 <pre class="script"> &lt;Program icon="kino.png" label="Kino (Video Editor)"&gt;kino&lt;/Program&gt;
190 </pre>
191 <p>
192 The <a href="http://www.joewing.net/programs/jwm/config.shtml">JWM Web site</a>
193 has got more information on how to configure the application to your needs
194 and preferences.
195 </p>
197 <a name="enlightenment"></a>
198 <h3>Enlightenment (e17)</h3>
199 <p>
200 Enlightenment aka e17 is a lightweight and fast desktop environment that can be
201 configured graphically. To install e17:
202 </p>
203 <pre> # tazpkg get-install enlightenment
204 </pre>
205 <p>
206 Logout your current X session, type <code>F1</code> at Slim login and choose
207 <code>e17</code> to start Enlightenment.
208 </p>
209 <h4>Menu and desktop icons</h4>
210 <p>
211 Enlightenment is compliant to the Freedesktop standards.
212 Applications are sorted by category and icons automatically appear
213 if a desktop file is supplied. The (<code>.desktop</code>) system files are
214 contained in the <code>/usr/share/applications</code> directory or hidden home
215 <code>~/.local/share/applications</code> directory. These files
216 have a simple syntax and are editable from the panel or with
217 a simple text editor. The file menus displaying categories
218 in the Enlightenment menu are found in the <code>slitaz-menus</code>
219 package:
220 </p>
221 <pre>
222 # tazpkg get-install slitaz-menus
223 </pre>
224 <h4>An icon on the desktop</h4>
225 <p>
226 To have an icon on the desktop launching applications, you can
227 create by hand a <code>.desktop</code> file in your local directory
228 <code>~/Desktop</code>. Desktop files placed in this directory are automatically
229 recognized by Enlightenment. A single .desktop file can
230 contain eight lines with respectively:- the name (<code>Name</code>), generic
231 name, comment, the command to execute (<code>Exec</code>), icon, type
232 and Freedesktop categories. Example of a .desktop file for Xterm icon:
233 </p>
234 <pre class="script">
235 [Desktop Entry]
236 Name=XTerm
237 GenericName=Terminal
238 Comment=Run commands in a shell
239 Exec=xterm -bg black -fg white -cr orange -sb -bd violet -rightbar
240 Icon=/usr/share/icons/Tango/jwm/utilities-terminal.png
241 Type=Application
242 Categories=Utility;Terminal;
243 </pre>
244 <p>
245 Additional themes can be found on the <a href="http://www1.get-e.org/Themes/E17/">website</a>
246 </p>
248 <a name="openbox"></a>
249 <h3>Openbox</h3>
250 <p>
251 Openbox is a lightweight window manager that can be configured using the obconf
252 utility. To install openbox:
253 </p>
254 <pre> # tazpkg get-install openbox
255 # tazpkg get-install obconf
256 </pre>
257 <p>
258 Logout your current X session, type <code>F1</code> at Slim login and choose
259 <code>openbox</code> to start Openbox. To make Openbox your default Window
260 Manager just type: <code>tazx openbox</code>.
261 </p>
262 <p>
263 Note: you can also use the configuration file <code>menu.xml</code> found
264 in <code>/etc/xdg/openbox</code> to edit menu items. Here's an example using
265 Htop:
266 </p>
267 <pre class="script">&lt;item label="Htop"&gt;
268 &lt;action name="Execute"&gt;&lt;command&gt;xterm -e htop&lt;/command&gt;&lt;/action&gt;
269 &lt;/item&gt;
270 </pre>
271 <p>
272 More information can be found on the
273 <a href="http://icculus.org/openbox/index.php/Help:Menus">openbox</a> site.
274 </p>
276 <a name="fonts"></a>
277 <h3>Fonts</h3>
278 <p>
279 The management of Fonts (<em>fonts</em>) is powered by the package Fontconfig.
280 This package provides tools to add, list and manipulate fonts. The <em>fonts</em>
281 can be installed in user space or at the system level, this means that each user can use his/her own
282 fonts or the adminstrator (<em>root</em>) can install fonts available to all users of the system.
283 If you use USB media associated with SliTaz <a href="http://www.slitaz.org/en/doc/handbook/livecd.html">LiveCD</a>,
284 you can easily install fonts and retain them the next time you use the cdrom.
285 </p>
286 <h4>Installing <em>fonts</em></h4>
287 <p>
288 At the system level fonts are installed in the directory:
289 <code>/usr/share/fonts</code>, core SliTaz provides TTF Vera fonts,
290 they take up little space and are rendered correctly. In user space, fonts are found in the hidden
291 directory: <code>.fonts</code>. This directory should be at the root of user space.
292 To create a home directory to accomodate new fonts, you can use the graphical window manager emelFM2,
293 Clex or use the command line:
294 </p>
295 <pre> $ mkdir ~/.fonts
296 </pre>
297 <p>
298 Once you have installed the fonts you need to run the <code>fc-cache</code> tool to generate
299 configuration files, this ensures that your <em>fonts</em> are available for use in applications:
300 </p>
301 <pre> $ fc-cache
302 </pre>
304 <!-- End of content -->
305 </div>
307 <!-- Footer. -->
308 <div id="footer">
309 <div class="footer-right"></div>
310 <a href="#top">Top of the page</a> |
311 <a href="index.html">Table of contents</a>
312 </div>
314 <div id="copy">
315 Copyright © 2008 <a href="http://www.slitaz.org/en/">SliTaz</a> -
316 <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>;<br />
317 Documentation is under
318 <a href="http://www.gnu.org/copyleft/fdl.html">GNU Free Documentation License</a>
319 and code is <a href="http://validator.w3.org/">valid xHTML 1.0</a>.
320 </div>
322 </body>
323 </html>