slitaz-doc-wiki-data view pages/en/handbook/xwindow.txt @ rev 7

Add pages/en folder.
author Christopher Rogers <slaxemulator@gmail.com>
date Sat Feb 26 12:17:18 2011 +0000 (2011-02-26)
parents
children
line source
1 ====== X Window System ======
3 ===== X11 - X Window System =====
5 The X Window System or X11 provides a window manager running on top of a X server.
7 SliTaz 2.0 by default uses the lightweight X server called Xvesa from the Xorg project (www.x.org).
9 Slitaz 3.0 by default uses the Xorg server, there is however a Xvesa flavor.
11 The X server 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.
13 ===== Tazx - SliTaz X configuration tool =====
15 Tazx is the configuration tool to manage your X window sessions on a SliTaz box. Simply select a resolution and press OK. You can also select a (Xorg) session by selecting a video driver best suited to your hardware. After you first run 'startx', the configuration is saved in the executable files //~/.xsession// and //~/.xinitrc//. These files are then used to start a X session with either 'startx' or via the Slim login manager and can be easily altered with a text editor. Tazx can also be used to change your default window manager. Example:
17 <code> tazx jwm
18 </code>
20 ===== Slim - Simple Login Manager =====
22 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.
24 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//.
26 More details and themes can be found on the website
28 === Default user ===
30 Slim offers a way to pre-load a user login name, by default tux 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:
32 <file> default_user tux </file>
34 ===== Xorg =====
36 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.
38 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 dependencies to work directly with the vesa driver. Minimal install:
40 <code> # tazpkg get-install xorg-server </code>
42 Once installed, you can go directly to the configuration or you can install the correct driver for your card (provided you know it). Example using the Nvidia driver and listing all available drivers:
43 <code>
44 # tazpkg get-install xorg-xf86-video-nv
45 List:
46 # tazpkg search xorg-xf86-video
47 </code>
49 === Automatic configuration of the server ===
51 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//:
53 <code> # Xorg -configure
54 # cp /root/xorg.conf.new /etc/X11/xorg.conf
55 </code>
57 Finally you then change the configuration of Slim to use Xorg instead of Xvesa and restart the window manager.
59 === Using Xorg with Slim ===
61 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:
63 <file>
64 default_xserver /usr/bin/Xorg
65 #default_xserver /usr/bin/Xvesa
66 #xserver_arguments -ac -shadow dpms +extension Composite -screen 1024x768x24
67 </file>
69 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:
72 <code> # /etc/init.d/slim start </code>
74 === xorg.conf - Configuration file ===
76 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.
78 Keyboard (en):
80 <file>
81 Section "InputDevice"
82 Identifier "Keyboard0"
83 Driver "kbd"
84 Option "XkbRules" "xorg"
85 Option "XkbModel" "pc105"
86 Option "XkbLayout" "en"
87 Option "XkbVariant" "en"
88 EndSection
89 </file>
91 Mice with auto detection protocol:
92 <file>
93 Section "InputDevice"
94 Identifier "Mouse0"
95 Driver "mouse"
96 Option "Protocol" "auto"
97 Option "Device" "/dev/input/mice"
98 Option "ZAxisMapping" "4 5 6 7"
99 EndSection
100 </file>
102 Composite extensions:
104 <file>
105 Section "Extensions"
106 Option "Composite" "1"
107 EndSection
108 </file>
110 ===== Use Xvesa as X terminal =====
112 You can use Xvesa as X terminal, if you have a machine on the network that accepts Xdmcp connections. To enable this, you can start the server with the option -query followed by the machine name or IP address. Example of machine 192.168.0.2 on a local network:
114 <code> $ Xvesa -ac -shadow -screen 1024x768x24 -query 192.168.0.2 </code>
116 The use of a graphical remote server can be of great use, although reponse times of applications depend greatly on Internet speed and the remote machine's power. This technique works very well within a local area network (LAN) and allows you to control applications installed on the remote machine directly from the screen of the local machine from which you work. Note that the distant remote machine may have multiple accounts in use simultaneously and/or direct access.
118 ===== Fonts =====
120 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 system adminstrator (root) can install fonts available to all users of the system. If you use USB media associated with the SliTaz LiveCD, you can easily install fonts and retain them for the next time you use the cdrom.
122 === Installing fonts ===
124 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. At the root of user space ~/, fonts are found in the hidden directory: .fonts. To create a home directory to accomodate new fonts, you can use the graphical window manager emelFM2, Clex or the command line:
126 <code> $ mkdir ~/.fonts </code>
128 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:
130 <code> $ fc-cache </code>