X Window System

X11 - X Window System

The X Window System or X11 provides a window manager running on top of a X server. SliTaz by default uses the lightweight X server called Xvesa from the Xorg project (www.x.org). Xvesa can be started with the Slim login manager or directly from a Linux console with the command startx, but for this you must first disable the Login Manager. To reconfigure your X session you can use tazx as root or as the current user if you start X from the command line.

Slim - Simple Login Manager

Slim is a lightweight session manager that is very easy to configure and is customizable using system themes. The configuration file is found in /etc/slim.conf. It defines window managers available via the F1 key, the default user or theme, and the X window system parameters. Slim offers special user commands like console to help manage the session.

In LiveCD mode you can disable Slim with the boot option screen=text. On an installed system you can remove the package or delete slim from the RUN_DAEMONS variable in /etc/rcS.conf.

More details and themes can be found on the website

Default user

Slim offers a way to pre-load a user login name, by default hacker is configured for convenience. You can change this by editing the Slim configuration file /etc/slim.conf and modifying the line default_user or just leave the line blank to avoid pre-loading a user name. Example:

default_user        hacker

Xorg

By default, SliTaz provides the graphical mini-server Xvesa. Xorg server is available in the packages on the mirror. Xorg is a very comprehensive server, but uses a lot more resources than Xvesa. If your resolution is supported by the mini-server and you're happy with the refresh rate, then there's no reason to use Xorg.

There is no GUI configuration which means having to use the command line in console mode. The installation and configuration of the server is relatively simple and you can always go back and reuse Xvesa at any time. Xorg is distributed in modular form, which means that you'll need to install the server, a few configuration files and the right driver for your graphics card. However the xorg-server package has all the correct dependancies to work directly with the vesa driver. Minimal install:

 # tazpkg get-install xorg-server

Once installed, you can go directly to the configuration or you can install the correct driver for your card (if you know it). Example using the Nvidia driver and listing all available drivers:

 # tazpkg get-install xorg-xf86-video-nv
 List:
 # tazpkg search xorg-xf86-video

Automatic configuration of the server

To configure the Xorg server you have two options: Xorg -configure or the script xorgconfig. It is recommended that you start by using Xorg with the -configure option. The automatic configuration of Xorg must be done in console mode without an X-server running; this is achieved by closing all applications and windows and hitting the alt-ctrl-del buttons. You should now be in console mode. Now you need to run Xorg with the -configure option and copy the newly generated file to /etc/X11:

 # Xorg -configure
 # cp /root/xorg.conf.new /etc/X11/xorg.conf

Finally you then change the configuration of Slim to use Xorg instead of Xvesa and restart the window manager.

Using Xorg with Slim

In the Slim configuration file (/etc/slim.conf), we need to comment out (#) the lines pertaining to Xvesa and change Xorg to the default_xserver:

default_xserver     /usr/bin/Xorg
#default_xserver     /usr/bin/Xvesa
#xserver_arguments   -ac -shadow dpms +extension Composite -screen 1024x768x24

Now we can start Slim to return us to an X server session. Slim works likes a daemon, it can be stopped or started from the console:

 # /etc/init.d/slim start

xorg.conf - Configuration file

Xorg uses the configuration file /etc/X11/xorg.conf. This file can be automatically generated and edited with your favorite text editor. It is divided into several sections, including the specification of paths, modules to be loaded, default screen, mouse, keyboard, etc. This document provides only a few examples, it is advisable to run xorgconfig once to generate a complete file to use as an example.

Keyboard (en):

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
	Option      "XkbRules"	"xorg"
	Option      "XkbModel"	"pc105"
	Option      "XkbLayout"	"en"
	Option      "XkbVariant"	"en"
EndSection

Mice with auto detection protocol:

Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "auto"
	Option	    "Device" "/dev/input/mice"
	Option	    "ZAxisMapping" "4 5 6 7"
EndSection

Composite extensions:

Section "Extensions"
	Option      "Composite" "1"
EndSection

JWM - Window manager

JWM (Joe's Window Manger) is a lightweight Window Manager, easy to use, fast, stable and insanely configurable. The menu and theme can all be changed from a single configuration file found in your home directory: ~/.jwmrc, the file uses XML syntax and the code is nicely colored if you use Geany to edit it. To add an entry in the menu you can use the following example:

 <Program icon="kino.png" label="Kino (Video Editor)">kino</Program>

The JWM Web site has got more information on how to configure the application to your needs and preferences.

Enlightenment (e17)

Enlightenment aka e17 is a lightweight and fast desktop environment that can be configured graphically. To install e17:

 # tazpkg get-install enlightenment

Logout your current X session, type F1 at Slim login and choose e17 to start Enlightenment.

Additional themes can be found on the website

Openbox

Openbox is a lightweight window manager that can be configured using the obconf utility. To install openbox:

 # tazpkg get-install openbox
 # tazpkg get-install obconf

Logout your current X session, type F1 at Slim login and choose openbox to start Openbox. To make Openbox your default Window Manager just type: tazx openbox.

Note: you can also use the configuration file menu.xml found in /etc/xdg/openbox to edit menu items. Here's an example using Htop:

<item label="Htop">
  <action name="Execute"><command>xterm -e htop</command></action>
</item>

More information can be found on the openbox site.

Fonts

The management of Fonts (fonts) is powered by the package Fontconfig. This package provides tools to add, list and manipulate fonts. The fonts can be installed in user space or at the system level, this means that each user can use his/her own fonts or the adminstrator (root) can install fonts available to all users of the system. If you use USB media associated with SliTaz LiveCD, you can easily install fonts and retain them the next time you use the cdrom.

Installing fonts

At the system level fonts are installed in the directory: /usr/share/fonts, core SliTaz provides TTF Vera fonts, they take up little space and are rendered correctly. In user space, fonts are found in the hidden directory: .fonts. This directory should be at the root of user space. To create a home directory to accomodate new fonts, you can use the graphical window manager emelFM2, Clex or use the command line:

 $ mkdir ~/.fonts

Once you have installed the fonts you need to run the fc-cache tool to generate configuration files, this ensures that your fonts are available for use in applications:

 $ fc-cache
Copyright © 2008 SliTaz - GNU General Public License;
Documentation is under GNU Free Documentation License and code is valid xHTML 1.0.