The X Server Configuration File xorgconf

This section examines the /etc/X11/xorg.conf file in detail. If you haven't configured the X server in some time, the directives in xorg.conf are similar to previous /etc/X11/ XF86Config files on older Linux distributions. In either case, xorg.conf is organized into stanzas. The directives in this file reflect just one configuration; you may see more or fewer directives in your version of xorg.conf. In some cases, settings that are automatically detected and/or are defaults may not appear in the configuration file.

In the comments is a note for how you can reconfigure the xorg.conf file from the command line, using the dpkg-reconfigure xserver-xorg command described earlier in this chapter. Older versions of the xorg.conf configuration file had a ServerLayout stanza at the start of the file. That stanza is now listed at the end of the file.

Two standard input devices are a keyboard and a mouse. That's reflected in the first two stanzas, entitled InputDevice. The first configures a keyboard as a regular US keyboard with 105 keys. The second configures a mouse. The Emulate3Buttons option, when active, configures the X server to activate middle mouse button functionality when you click the left and right mouse buttons simultaneously.

Section "InputDevice"

Identifier "GenericKeyboard" Driver "kbd"

Option "XkbRules" "xorg"

Option "XkbModel" "pc10 5"

Option "XkbLayout" "us"

EndSection

Section "InputDevice"

Identifier "ConfiguredMouse" Driver "vmmouse"

Option "CorePointer"

Option "Device" "/dev/input/mice"

EndSection

The following section specifies the video card Device. Note how it also identifies the hardware location through the Busid, the vmware Driver, as well as the standard Screen 0, which configures the GUI on the first available virtual terminal after the command line terminals, normally virtual terminal 7.

Section "Device"

Identifier "Configured Video Device"

Boardname "VMware virtual video card"

Busid "PCI:0:15:0"

Driver "vmware"

Screen 0 EndSection

The next stanza specifies the display Monitor. Note how it also identifies the display parameters, as well as the limits on the horizontal scan (Horizsync) and vertical refresh

(Vertrefresh) rates. This section reflects a conservative configuration, when uncertain about the true capabilities of a flat panel or laptop monitor.

Section "Monitor"

Identifier "Configured Monitor" Vendorname "Generic LCD Display" Modelname "LCD Panel 1024x768" Horizsync 31.5 - 48.0 Vertrefresh 56.0 - 65.0 EndSection

The Screen stanza collects information from the Monitor and graphics card (Device) stanzas. It is often coupled with a color depth (Defaultdepth) and available display Modes.

Section "Screen"

Identifier "Default Screen"

Monitor "Configured Monitor"

Device "Configured Video Device"

Defaultdepth 24 SubSection "Display" Depth 24 Virtual 1024 768

Modes "[email protected]" "[email protected]"

EndSubSection EndSection

The ServerLayout section identifies the "Default Screen" just described in the Screen stanza. It can also be used for other screen configurations, such as second monitors.

Section "ServerLayout"

Identifier "Default Layout"

Screen "Default Screen"

EndSection

Stanzas that may or may not be included include Module and ServerFlags. A Module stanza would include driver modules loaded when the X server is started. ServerFlags would be associated with global options.

0 0

Post a comment