-->
Previous | Table of Contents | Next |
The Screen section connects a monitor with a graphics card. Your XF86Config file may have multiple Devices and Monitors defined. It is the Screen section that connects the two.
A complicated Screen section can look something like:
Section "Screen" Driver "accel" Device "Actix GE32+ 2MB" Monitor "NEC MultiSync XE17" Subsection "Display" Depth 8 Modes "1024x768" "800x600" "640x480" ViewPort 0 0 Virtual 1024 768 EndSubsection Subsection "Display" Depth 16 Modes "640x480" "800x600" ViewPort 0 0 Virtual 800 600 EndSubsection Subsection "Display" Depth 32 Modes "640x400" ViewPort 0 0 Virtual 640 400 EndSubsection EndSection
Note that the Screen section uses the monitor and device identifiers we entered earlier. This is essential to connect the screen to the proper monitor and card.
The Driver tells what kind of X server youre using; the choices are Accel, SVGA, VGA16, VGA2, or Mono. In almost all cases, youll use SVGA for Super VGA cards (and the XF86_SVGA X server) or Accel for any accelerated chipset and X server, such as the XF86_S3 server we mentioned in the last chapter.
Each Display subsection covers the modes available at a particular depth. (A depth of eight specifies eight planes for color, or 256 maximum colors.) The Modes used refer back to the Modelines for the monitor that we defined earlier.
The Virtual line allows you to define a virtual screen that is larger than the number of pixels supported by your monitor. The X server will automatically scroll the display when the mouse hits the end. If you like this effect (we dont), then set the Virtual resolution to something larger than your monitor allows, such as:
Virtual 1152 900
This virtual setting creates a traditional Sun Microsystems resolution. This is useful if you need to run older programs that were designed with Sun systems in mind and want to grab more than the default 1024-by-768 screen area available on most PCs.
The ViewPort line tells where the X server should start up. For example, a ViewPort of 0,0 tells X that when it starts up, it should display position 0,0 in the upper-left-hand corner (which is what youd expect on X). If youd rather start in the middle (an unlikely option), you can change this.
WARNING: The fvwm window manager supports a different kind of virtual screen. Dont mix the two types of virtual screen or youll likely have trouble.
Now that weve gone over the contents of the XF86Config file, we can run the xf86config program, or, if youd prefer, fill in the file by hand. We recommend using xf86config and then checking the XF86Config file it builds by hand. The xf86config program isnt flawless and needs careful supervision.
When you run xf86config, you should not be in the /usr/X11R6/ lib/X11 directory. Instead, put an XF86Config file in a directory in your user account and try copying it later to /usr/X11R6/lib/X11.
As the program starts up, it will start asking a lot of questions. The xf86config program will prompt you for a lot of the values necessary for the XF86Config file, such as type of mouse, your desires for the keyboard, and monitor frequencies. When youre done, xf86config will write out the data into a file named XF86Config in the current directory. (This is why you dont want to be in /usr/lib/X11, which is a symbolic link to /usr/X11R6/lib/X11, when you run this program.)
Once the xf86config program finishes, you should carefully examine the XF86Config file it generates. This file will still be incomplete, because you havent probed for the clocks yet. Edit the XF86Config file. If it looks OK, then, as the root user, copy the file to /usr/X11R6/lib/X11, but be sure to back up any existing XF86Config file first.
Now youre ready to try X in probeonly mode.
Previous | Table of Contents | Next |