Accueil

Configuration de X Window

Par Serge.

Configurer X window

Ce document est sous licence Licence pour Documents Libres de la guilde des doctorants.

Sommaire

XFree ou X.org

Suivant la version de Slackware que vous utilisez, vous utilisez soit Xfree soit X.org. La plupart des distributions majeures sont passées à X.org parce que Xfree pose des problèmes de licence. La Slackware, dans sa version 10, est passé elle aussi à X.org. Il n'y a quasiement aucune différence pour la configuration de ce dernier, juste les noms des outils et des fichiers qui changent, j'indique à chaque fois les deux fichiers possibles donc.

L'utilitaire xf86config ou xorgconfig

Cet utilitaire vous permet depuis une console texte de configurer votre serveur X Window ou X.org. Je vous conseille d'utiliser cet utilitaire en tant qu'utilisateur normal (et non en root). Pour cela, en tant qu'utilisateur, il suffit d'entrer la commande xorgconfig ou xf86config en ligne de commande. Vous devez voir apparaître quelque chose du genre:

This program will create a basic XF86Config file, based on menu selections you
make.

The XF86Config file usually resides in /usr/X11R6/etc/X11 or /etc/X11. A sample
XF86Config file is supplied with XFree86; it is configured for a standard
VGA card and monitor with 640x480 resolution. This program will ask for a
pathname when it is ready to write the file.

You can either take the sample XF86Config as a base and edit it for your
configuration, or let this program produce a base XF86Config file for your
configuration and fine-tune it.

Before continuing with this program, make sure you know what video card
you have, and preferably also the chipset it uses and the amount of video
memory on your video card. SuperProbe may be able to help with this.

Press enter to continue, or ctrl-c to abort.

Ce message est juste un message d'information à propos de l'utilitaire et vous invite à presser la touche Entrée afin de continuer. Notez qu'en cas d'erreur vous pouvez à tout moment appuyer sur la combinaison de touche CTRL C afin de quitter l'utilitaire xf86config.

Détaillons maintenant chaque étape de cet utilitaire.

Configuration de la souris

First specify a mouse protocol type. Choose one from the following list:

1. Auto
2. SysMouse
3. MouseSystems
4. PS/2
5. Microsoft
6. Busmouse
7. IMPS/2
8. ExplorerPS/2
9. GlidePointPS/2
10. MouseManPlusPS/2
11. NetMousePS/2
12. NetScrollPS/2
13. ThinkingMousePS/2
14. AceCad

The recommended protocol is Auto. If you have a very old mouse
or don't want OS support or auto detection, and you have a two-button
or three-button serial mouse, it is most likely of type Microsoft.

Enter a protocol number:

Dans cette partie vous devez choisir votre type de souris. Je vous conseille:

If your mouse has only two buttons, it is recommended that you enable
Emulate3Buttons.

Please answer the following question with either 'y' or 'n'.
Do you want to enable Emulate3Buttons?

Répondez par y seulement si votre souris ne possède que deux boutons et ne possède pas de roulette, cela permet d'émuler le 3éme bouton (click de roulette la plupart du temps) en appuyant simultanément sur les deux boutons.

Now give the full device name that the mouse is connected to, for example
/dev/tty00. Just pressing enter will use the default, /dev/mouse.

Mouse device: 

Validez simplement en appuyant sur Entrée, le choix par défaut est le bon.

Configuration du clavier

Please select one of the following keyboard types that is the better
description of your keyboard. If nothing really matches,
choose 1 (Generic 101-key PC)

1 Generic 101-key PC
2 Generic 102-key (Intl) PC
3 Generic 104-key PC
4 Generic 105-key (Intl) PC
5 Dell 101-key PC
6 Everex STEPnote
7 Keytronic FlexPro
8 Microsoft Natural
9 Northgate OmniKey 101
10 Winbook Model XP5
11 Japanese 106-key
12 PC-98xx Series
13 Brazilian ABNT2
14 Acer AirKey V
15 ACPI Standard
16 Advance Scorpius KI

Enter a number to choose the keyboard.

Press enter for the next page

Faites défiler la liste des claviers avec la touche Entrée afin de trouver la marque et le modèle du clavier que vous possédez. Si vous ne trouvez pas le modèle de votre clavier, vous pouvez alors choisir 4 Generic 105-key PC.

1 U.S. English
2 U.S. English w/ ISO9995-3
3 U.S. English w/ deadkeys
4 Albanian
5 Arabic
6 Armenian
7 Azerbaijani
8 Belarusian
9 Belgian
10 Bengali
11 Bosnian
12 Brazilian
13 Bulgarian
14 Burmese
15 Canadian
16 French Canadian
17 Croatian
18 Czech

Enter a number to choose the country.
Press enter for the next page

Faites défiler la liste de pays avec la touche Entrée afin de trouver votre pays. Les français choisiront 25 French.

Please enter a variant name for 'fr' layout. Or just press enter
for default variant

Validez simplement par Entrée.

Please answer the following question with either 'y' or 'n'.
Do you want to select additional XKB options (group switcher,
group indicator, etc.)?

Répondez simplement par n.

Configuration de l'écran

Now we want to set the specifications of the monitor. The two critical
parameters are the vertical refresh rate, which is the rate at which the
the whole screen is refreshed, and most importantly the horizontal sync rate,
which is the rate at which scanlines are displayed.

The valid range for horizontal sync and vertical sync should be documented
in the manual of your monitor. If in doubt, check the monitor database
/usr/X11R6/lib/X11/doc/Monitors to see if your monitor is there.

Press enter to continue, or ctrl-c to abort.

Ce message est juste à titre informatif, pour vous prévenir qu'il faut bien faire attention aux fréquences que vous allez choisir pour votre écran. Validez ce message par Entrée.

You must indicate the horizontal sync range of your monitor. You can either
select one of the predefined ranges below that correspond to industry-
standard monitor types, or give a specific range.

It is VERY IMPORTANT that you do not specify a monitor type with a horizontal
sync range that is beyond the capabilities of your monitor. If in doubt,
choose a conservative setting.

hsync in kHz; monitor type with characteristic modes
1 31.5; Standard VGA, 640x480 @ 60 Hz
2 31.5 - 35.1; Super VGA, 800x600 @ 56 Hz
3 31.5, 35.5; 8514 Compatible, 1024x768 @ 87 Hz interlaced (no 800x600)
4 31.5, 35.15, 35.5; Super VGA, 1024x768 @ 87 Hz interlaced, 800x600 @ 56 Hz
5 31.5 - 37.9; Extended Super VGA, 800x600 @ 60 Hz, 640x480 @ 72 Hz
6 31.5 - 48.5; Non-Interlaced SVGA, 1024x768 @ 60 Hz, 800x600 @ 72 Hz
7 31.5 - 57.0; High Frequency SVGA, 1024x768 @ 70 Hz
8 31.5 - 64.3; Monitor that can do 1280x1024 @ 60 Hz
9 31.5 - 79.0; Monitor that can do 1280x1024 @ 74 Hz
10 31.5 - 82.0; Monitor that can do 1280x1024 @ 76 Hz
11 Enter your own horizontal sync range

Enter your choice (1-11):

Pour choisir les bonnes fréquences horizontales, l'idéal est de consulter le manuel de votre écran et de trouver, et sa résolution maximale et à quelle fréquence maximum il travaille à cette résolution, puis de choisir dans la liste ce qui se rapproche le plus.

Attention: Si la fréquence exacte de votre écran ne se trouve pas dans la liste, choisissez toujours une fréquence inférieure.

Si vous n'avez pas le manuel de votre écran, ou que vous ne trouvez aucunes informations sur Internet à propos de votre écran, je vous conseille alors:

Attention: Ces choix fonctionnent dans la plus grande majorité des cas, mais vous n'aurez sûrement pas ni la meilleure fréquence de rafraîchissement, ni la meilleure résolution pour votre confort de lecture. De plus je ne pourrai être tenu responsable d'une quelconque dégradation de votre écran en cas d'utilisation de fréquence impropre à son utilisation. Mais rassurez vous, les écrans sont, depuis quelques années, protégés contre les fréquences inadaptées.

You must indicate the vertical sync range of your monitor. You can either
select one of the predefined ranges below that correspond to industry-
standard monitor types, or give a specific range. For interlaced modes,
the number that counts is the high one (e.g. 87 Hz rather than 43 Hz).

1 50-70
2 50-90
3 50-100
4 40-150
5 Enter your own vertical sync range

Enter your choice:

La aussi, il est préférable de consulter le manuel de votre écran afin de trouver la bonne plage de fréquence verticale. Les mêmes remarques que pour les fréquences horizontales s'appliquent là aussi. En cas de doutes:

You must now enter a few identification/description strings, namely an
identifier, a vendor name, and a model name. Just pressing enter will fill
in default names.

The strings are free-form, spaces are allowed.
Enter an identifier for your monitor definition:

Vous donnez ici un nom à votre écran (choix totalement libre), les espaces sont autorisés.

Configuration de votre carte video

Now we must configure video card specific settings. At this point you can
choose to make a selection out of a database of video card definitions.
Because there can be variation in Ramdacs and clock generators even
between cards of the same model, it is not sensible to blindly copy
the settings (e.g. a Device section). For this reason, after you make a
selection, you will still be asked about the components of the card, with
the settings from the chosen database entry presented as a strong hint.

The database entries include information about the chipset, what driver to
run, the Ramdac and ClockChip, and comments that will be included in the
Device section. However, a lot of definitions only hint about what driver
to run (based on the chipset the card uses) and are untested.

If you can't find your card in the database, there's nothing to worry about.
You should only choose a database entry that is exactly the same model as
your card; choosing one that looks similar is just a bad idea (e.g. a
GemStone Snail 64 may be as different from a GemStone Snail 64+ in terms of
hardware as can be).

Do you want to look at the card database?

Encore un message informatif, passez ce message en répondant par y.

0 * Generic VESA compatible -
1 * Generic VGA compatible -
2 * Unsupported VGA compatible -
3 ** 3DLabs, TI (generic) [glint] -
4 ** 3Dfx (generic) [tdfx] -
5 ** ATI (generic) [ati] -
6 ** ATI Radeon (generic) [radeon] -
7 ** ATI Rage 128 based (generic) [r128] -
8 ** Alliance Pro Motion (generic) [apm] -
9 ** Ark Logic (generic) [ark] -
10 ** Chips and Technologies (generic) [chips] -
11 ** Cirrus Logic (generic) [cirrus] -
12 ** Cyrix MediaGX (generic) [cyrix] -
13 ** DEC TGA (generic) [tga] -
14 ** Intel i740 (generic) [i740] -
15 ** Intel i810 (generic) [i810] -
16 ** Linux framebuffer (generic) [fbdev] -
17 ** Matrox Graphics (generic) [mga] -

Enter a number to choose the corresponding card definition.
Press enter for the next page, q to continue configuration.

On vous propose une liste de cartes vidéo que vous faites défiler avec la touche Entrée afin d'utiliser le bon pilote pour votre carte vidéo. Si votre modèle de carte ne se trouve pas dans la liste, choisissez alors dans la liste le chipset (avec la mention (generic)) qui correspond au chipset utilisé sur votre carte vidéo. Si vous ne savez vraiment pas quoi choisir, voir plus bas dans cet article comment trouver le bon pilote pour votre carte vidéo dans la partie "Configuration avancée".

Now you must give information about your video card. This will be used for
the "Device" section of your video card in XF86Config.

It is probably a good idea to use the same approximate amount as that detected
by the server you intend to use. If you encounter problems that are due to the
used server not supporting the amount memory you have, specify the maximum
amount supported by the server.

How much video memory do you have on your video card:

1 256K
2 512K
3 1024K
4 2048K
5 4096K
6 8192K
7 16384K
8 32768K
9 65536K
10 131072K
11 262144K
12 Other

Choisissez ici la quantité de mémoire vidéo que possède votre carte vidéo.

You must now enter a few identification/description strings, namely an
identifier, a vendor name, and a model name. Just pressing enter will fill
in default names (possibly from a card definition).

Your card definition is ** NVIDIA (generic) [nv].

The strings are free-form, spaces are allowed.
Enter an identifier for your video card definition:

Comme précédemment pour l'écran, vous choisissez ici un nom totalement libre pour votre carte vidéo, les espaces sont autorisés.

For each depth, a list of modes (resolutions) is defined. The default
resolution that the server will start-up with will be the first listed
mode that can be supported by the monitor and card.
Currently it is set to:

"1280x1024" "1024x768" "800x600" "640x480" for 8-bit
"1280x1024" "1024x768" "800x600" "640x480" for 16-bit
"1280x1024" "1024x768" "800x600" "640x480" for 24-bit

Modes that cannot be supported due to monitor or clock constraints will
be automatically skipped by the server.

1 Change the modes for 8-bit (256 colors)
2 Change the modes for 16-bit (32K/64K colors)
3 Change the modes for 24-bit (24-bit color)
4 The modes are OK, continue.

Enter your choice:

On demande ici de confirmer les différentes résolutions que supporte votre carte vidéo suivant le nombre de couleurs affichées. Si vous avez choisi dans le menu précédent la bonne taille de mémoire vidéo, il n'y a aucune raison de changer quoi que ce soit. Validez en répondant 4.

Please specify which color depth you want to use by default:

1 1 bit (monochrome)
2 4 bits (16 colors)
3 8 bits (256 colors)
4 16 bits (65536 colors)
5 24 bits (16 million colors)

Enter a number to choose the default depth.

Ici vous choisissez quel mode de couleur vous souhaitez par défaut. Pour une utilisation optimale, choisissez toujours le mode le plus élevé ( 5 dans notre exemple) .

Sauvegarde de la configuration

I am going to write the XF86Config file now. Make sure you don't accidently
overwrite a previously configured one.

Do you want it written to the current directory as 'XF86Config'?

Validez par y pour sauvegarder la configuration dans le répertoire actuel. Il nous reste maintenant à déplacer ce fichier dans le bon répertoire pour que notre nouvelle configuration soit utilisée. Pour cela, passez en root (taper su puis le mot de passe de root) et déplacez le fichier de configuration fraîchement créé dans le répertoire /etc/X11: Pour Xfree: mv ./XF86Config /etc/X11 Pour X.org:mv ./xorg.conf /etc/X11 Revenez en simple utilisateur (tapez exit) et testez votre configuration X en démarrant le serveur X: startx

Configuration avancée

Dans cette partie nous allons voir comment améliorer certains aspects de la configuration, ou vous dépanner dans certain cas.

Faire fonctionner la roulette de la souris

Vous avez une belle souris à roulette mais malheureusement celle-ci n'a aucun effet sous X. Pas de problème, en tant que root éditez avec un éditeur de texte le fichier /etc/X11/XF86Config ou /etc/X11/xorg.conf et repérez les lignes suivantes:

Section "InputDevice"

# Identifier and driver

    Identifier      "Mouse1"
    Driver      "mouse"
    Option "Protocol"      "IMPS/2"
    Option "Device"      "/dev/mouse"

et vous ajoutez juste en dessous cette ligne:

    Option "ZAxisMapping"      "4 5"

Relancez le serveur X si celui-ci était déjà lancé, et maintenant votre roulette doit être opérationnelle!

Déterminer son pilote de carte vidéo et affiner la configuration

Si vous ne savez pas quel pilote vidéo vous devez utiliser pour votre carte vidéo, ou que vous vous êtes trompé, le plus simple est d'essayer une auto- détection de celui-ci. En tant que root, lancez la commande: XFree86 -configure ou X -configure Le système va vous renvoyer quelque chose comme:

Your XF86Config file is /root/XF86Config.new

To test the server, run 'XFree86 -xf86config /root/XF86Config.new'

Editez alors le fichier /root/XF86Config.new et comparer la partie Section "Module" avec votre fichier /etc/X11/XF86Config et ajoutez dans ce dernier les modules manquants. De même pour le pilote de votre carte vidéo, comparez la ligne Driver de la partie Section "Device" du fichier /root/XF86Config.new avec celle du fichier /etc/X11/XF86Config et corriger ce dernier s'il diffère.

Dans le cas ou vous utilisez X.org, les fichiers s'apellent xorg.conf.new et /etc/X11/xorg.conf.

Thèmes : #administration #articles #serge #xfree86 #xwindow

Sauf indication contraire, ce document est placé sous licence CC-BY-SA 3.0.