These classnotes are depreciated. As of 2005, I no longer teach the classes. Notes will remain online for legacy purposes

UNIX02/XFree86 Configuration

Classnotes | UNIX02 | RecentChanges | Preferences

XFree86 actually includes several different configuration files. However, modern Linux/UNIX OSes and modern XFree86 implimentations are really quite intelligent and you will likely only ever touch two files:

/etc/X11/XFree86 or /etc/X11/XFree86-4

The main XFree86 config file is layed out by regions known as 'Section's. The basic structure of a given Section is similar to the following:
 Section "SomeSection"
     Option    Value
     Option    Value
     ... etc ...
 EndSection

Some of the essential sections are as follows:

 Section "Module"
        Load  "ddc"  # ddc probing of monitor
        Load  "GLcore"
        Load  "dbe"
        Load  "dri"
        Load  "extmod"
        Load  "glx"
        Load  "bitmap" # bitmap-fonts
        Load  "speedo"
        Load  "type1"
        Load  "freetype"
        Load  "record"
 EndSection?

 Section "InputDevice?"
        Identifier  "Keyboard0"
        Driver      "keyboard"
        Option      "CoreKeyboard?"
        Option "XkbRules?" "xfree86"
        Option "XkbModel?" "pc104"
        Option "XkbLayout?" "us"
 EndSection?

 Section "InputDevice?"
        Identifier      "USB Mouse"
        Driver          "mouse"
        Option          "Device"                "/dev/input/mice"
        Option          "SendCoreEvents?"        "true"
        Option          "Protocol"              "IMPS/2"
        Option          "ZAxisMapping?"          "4 5"
        Option          "Buttons"               "5"
 EndSection?

 Section "Screen"
        Identifier "Screen0"
        Device     "Card0"
        Monitor    "Monitor0"
        DefaultColorDepth? 16
        SubSection? "Display"
                Depth     1
                Modes "1152x864" "1024x768" "800x600" "640x480"
        EndSubSection?
        SubSection? "Display"
                Depth     4
                Modes "1152x864" "1024x768" "800x600" "640x480"
        EndSubSection?
        SubSection? "Display"
                Depth     8
                Modes "1152x864" "1024x768" "800x600" "640x480"
        EndSubSection?
        SubSection? "Display"
                Depth     15
                Modes "1152x864" "1024x768" "800x600" "640x480"
        EndSubSection?
        SubSection? "Display"
                Depth     16
                Modes "1152x864" "1024x768" "800x600" "640x480"
        EndSubSection?
        SubSection? "Display"
                Depth     24
                Modes "1152x864" "1024x768" "800x600" "640x480"
        EndSubSection?
        SubSection? "Display"
                Depth     32
                Modes "1152x864" "1024x768" "800x600" "640x480"
        EndSubSection?
 EndSection?

 Section "DRI"
        Mode 0666
 EndSection?

/etc/X11/XftConfig

XFree86 4.2 introduced stronger support for fonts. This is the configuration file for it. It consists of many rules which are beyond the scope of this class, however, the most important section is the 'dir' listings at the beginning that tell XFree86 where to find it's fonts:

 dir "/usr/X11R6/lib/X11/fonts/Type1?"
 dir "/usr/share/fonts/ttf/western"
 dir "/usr/share/fonts/ttf/decoratives"
 dir "/usr/share/fonts/truetype/openoffice"
 dir "/usr/X11R6/lib/X11/fonts/defoma/CID"
 dir "/usr/X11R6/lib/X11/fonts/defoma/TrueType?"
 dir "/usr/share/fonts/extra_ttf"
 dir "/usr/share/fonts/truetype"

XFree86 4.3, which has been released recently, introduced a new and easier to configure font sub-system. It will not be covered here, but it should be noted that this that we cover here may be irrelevent in a few years.


Classnotes | UNIX02 | RecentChanges | Preferences
This page is read-only | View other revisions
Last edited May 10, 2003 1:34 am (diff)
Search:
(C) Copyright 2003 Samuel Hart
Creative Commons License
This work is licensed under a Creative Commons License.