Contents
The X Window System (X11) is the de facto standard for graphical user interfaces in UNIX. X is network-based, enabling applications started on one host to be displayed on another host connected over any kind of network (LAN or Internet). This chapter describes the setup and optimization of the X Window System environment, and provides background information about the use of fonts in openSUSE®.
By default, the X Window System is configured with the SaX2 interface, described in Section “Setting Up Graphics Card and Monitor” (Chapter 2, Setting Up Hardware Components with YaST, ↑Start-Up). Alternatively it can be configured manually by editing the its configuration files.
![]() | Faulty X Configurations can Damage Your Hardware |
|---|---|
Be very careful when configuring your X Window System. Never start the X Window System until the configuration is finished. A misconfigured system can cause irreparable damage to your hardware (this applies especially to fixed-frequency monitors). The creators of this book and openSUSE cannot be held responsible for any resulting damage. This information has been carefully researched, but this does not guarantee that all methods presented here are correct and cannot damage your hardware. | |
The command sax2
creates the /etc/X11/xorg.conf file. This is the primary
configuration file of the X Window System. Find
all the settings here concerning your graphics card, mouse, and monitor.
The following sections describe the structure of the configuration file
/etc/X11/xorg.conf. It consists of several sections,
each one dealing with a certain aspect of the configuration. Each section
starts with the keyword Section <designation>
and ends with EndSection. The following convention
applies to all sections:
Section "designation" entry 1 entry 2 entry n EndSection
The section types available are listed in Table 8.1, “Sections in /etc/X11/xorg.conf”.
Table 8.1. Sections in /etc/X11/xorg.conf
Monitor, Device, and
Screen are explained in more detail.
Further information about the other sections can be found in
the manual pages of X.Org and
xorg.conf.
There can be several different Monitor
and Device sections in
xorg.conf. Even multiple
Screen sections are possible.
The ServerLayout
section determines which of these sections is used.
The screen section combines a monitor with a device section and determines the resolution and color depth to use. A screen section might resemble Example 8.1, “Screen Section of the File /etc/X11/xorg.conf”.
Example 8.1. Screen Section of the File /etc/X11/xorg.conf
Section "Screen"DefaultDepth 16
SubSection "Display"
Depth 16
Modes "1152x864" "1024x768" "800x600"
Virtual 1152x864
EndSubSection SubSection "Display" Depth 24 Modes "1280x1024" EndSubSection SubSection "Display" Depth 32 Modes "640x480" EndSubSection SubSection "Display" Depth 8 Modes "1280x1024" EndSubSection Device "Device[0]" Identifier "Screen[0]"
Monitor "Monitor[0]" EndSection
A device section describes a specific graphics card. You can have as many
device entries in xorg.conf as you like, provided
their names are differentiated using the keyword
Identifier. If you have more than
one graphics card installed, the sections are simply numbered in
order. The first one is called Device[0], the second
one Device[1], and so on. The following
file shows an excerpt from the Device
section of a computer with a Matrox Millennium PCI graphics card (as
configured by SaX2):
Section "Device" BoardName "MGA2064W" BusID "0:19:0"Driver "mga"
Identifier "Device[0]" VendorName "Matrox" Option "sw_cursor" EndSection
The behavior of the X server or of the driver can also be influenced through
additional options. An example of this is the option
sw_cursor, which is set in the device section. This
deactivates the hardware mouse cursor and depicts the mouse cursor using
software. Depending on the driver module, there are various options
available, which can be found in the description files of the driver modules
in the directory
/usr/share/doc/.
Generally valid options can also be found in the manual pages
(man package_name
xorg.conf,
man X.Org, and
man 4 chips).
If the graphics card has multiple video connectors, it is possible to configure the different devices of this single card as one single view. Use SaX2 to set up your graphics interface this way.
Like the Device sections, the
Monitor and Modes sections
describe one monitor each. The configuration file
/etc/X11/xorg.conf can contain as many
Monitor sections as desired. Each
Monitor section references a
Modes section with the line
UseModes if available. If no
Modes section is available for the
Monitor section, the X server calculates
appropriate values from the general synchronization values. The server layout
section specifies which Monitor section is
relevant.
Monitor definitions should only be set by experienced users. The
modelines are an important part of the
Monitor sections.
Modelines set horizontal and vertical timings for the respective
resolution. The monitor properties, especially
the allowed frequencies, are stored in the Monitor
section.
![]() | Warning |
|---|---|
Unless you have in-depth knowledge of monitor and graphics card functions, do not change the modelines, because this could severely damage your monitor. | |
Those who try to develop their own monitor descriptions should be
very familiar with the documentation in
/usr/share/X11/doc.
Manual specification of modelines is rarely required today. If you are using a modern multisync monitor, the allowed frequencies and optimal resolutions can, as a rule, be read directly from the monitor by the X server via DDC, as described in the SaX2 configuration section. If this is not possible for some reason, use one of the VESA modes included in the X server. This will work with almost all graphics card and monitor combinations.