Online Book Reader

Home Category

Running Linux, 5th Edition - Matthias Kalle Dalheimer [326]

By Root 1408 0
cases it is necessary to change the horizontal or vertical size of the display after starting up X in order for the image to be centered and of the appropriate size. Another option is to use the program xvidtune (see the manual page for how to use it), which can help you to get all the numbers for the Modeline, lets you try your changes, and even allows you to undo them if you did something wrong.

Also, X.org has the so-called VESA monitor timings built in, so you might get along without a Modes section altogether. The VESA timings are standard values for the Modeline that work on most display hardware, at the expense of not using the individual hardware to its fullest potential.

Note that the name argument to Modeline (in this case "800× 600") is an arbitrary string; the convention is to name the mode after the resolution, but name can be anything that describes the mode to you.

For each Modeline used, the server checks that the specifications for the mode fall within the range of values specified with HorizSync and VertRefresh. If they do not, the server will complain when you attempt to start up X (more on this later).

You shouldn't insert monitor timing values or Modeline values for monitors other than the model you own. If you attempt to drive the monitor at a frequency for which it was not designed, you can damage or even destroy it.

The next section is Screen, which specifies the monitor/video card combination to use for a particular server:

Section "Screen"

DefaultDepth 24

SubSection "Display"

Depth 15

Modes "800 × 600"

EndSubSection

SubSection "Display"

Depth 16

Modes "1400 × 1050"

EndSubSection

SubSection "Display"

Depth 24

Modes "1400 × 1050" "1280 × 1024" "1280 × 960" "1152 × 864" "1024 × 768"

"800 × 600" "640 × 480"

EndSubSection

SubSection "Display"

Depth 32

Modes "800 × 600"

EndSubSection

SubSection "Display"

Depth 8

Modes "800 × 600"

EndSubSection

Device "Device[0]"

Identifier "Screen[0]"

Monitor "Monitor[0]"

EndSection

This section ties together device, screen, and monitor definitions and lists the color depths to use with the video modes.

Finally, the ServerLayout section wraps things up by defining one actual configuration that consists of one or more Screen sections and one or more InputDevice sections. If you have a so-called multihead system (a system with more than one graphics board and one monitor attached to each, or one of those fancy multihead graphics boards to which you can connect multiple monitors), this section also specifies their relative layout. Here is an example:

Section "ServerLayout"

Identifier "Layout[all]"

InputDevice "Keyboard[0]" "CoreKeyboard"

InputDevice "Mouse[1]" "CorePointer"

InputDevice "Mouse[3]" "SendCoreEvents"

Option "Clone" "off"

Option "Xinerama" "off"

Screen "Screen[0]"

EndSection

Other sections also exist, but these are entirely optional and are not needed to get your X server up and running .

Running X

With your xorg.conf file configured, you're ready to fire up the X server and give it a spin. First, be sure that /usr/X11R6/bin is on your path.

The command to start up X is:

startx

This is a frontend to xinit (in case you're used to using xinit on other Unix systems). You can still use xinit, which gives you precise control about what exactly is started but requires you to start all necessary programs manually.

This command starts the X server and runs the commands found in the file .xinitrc in your home directory. .xinitrc is just a shell script containing X clients to run. If this file does not exist, the system default /usr/X11R6/lib/X11/xinit/xinitrc will be used. You can change the initial display when starting up the X Window System by providing a different .xinitrc in your home directory.

Running into Trouble

Often, something will not be quite right when you initially fire up the X server. This is almost always caused by a problem in your xconf.org file. Usually, the monitor timing values are off or the video card dot clocks are set incorrectly. If your display seems to roll or the edges

Return Main Page Previous Page Next Page

®Online Book Reader