-->

Previous | Table of Contents | Next

Page 179

The Keyboard Section

You should specify the ServerNumlock option. This is an easy way to specify your keyboard for XFree86. Otherwise, only those keyboard modifications needed for international keyboard support have to be set manually. In a typical XF86Config file, this section looks like the one shown in Listing 10.2.

Listing 10.2. Keyboard selection.


#

# Keyboard and various keyboard-related parameters

#

Section "Keyboard"

  AutoRepeat 500 5

  ServerNumLock

#  Xleds      1 2 3

#  DontZap

#

# To set the LeftAlt to Meta, RightAlt key to ModeShift,

# RightCtl key to Compose, and ScrollLock key to ModeLock:

#

#  LeftAlt     Meta

#  RightCtl    Compose

#  ScrollLock  ModeLock



# EndSection

The Pointer Section

The pointer section keyword is the name for the protocol the mouse uses. The available protocol names are listed in the XF86Config man page.

The Logitech serial mouse uses several keywords. The MouseMan uses the MouseMan keyword. The more recent Logitech serial mouse uses the Microsoft keyword. The older Logitech serial mouse uses the Logitech keyword.

Any mouse connected to the PS/2 port uses the PS/2 keyword even if it is in fact a serial mouse.

TIP
If you are not sure which kind of bus mouse you have, look at the kernel's startup messages. They identify the bus mouse type.

Page 180

CAUTION
Ensure that the kernel bus mouse driver is using the same IRQ as the bus mouse. If not, you have to change the IRQ and rebuild the kernel. The IRQ for bus mouse devices is given in
/usr/src/linux/include/linux/busmouse.h. The macro MOUSE_IRQ contains this IRQ and is set to 5 by default.

The following is a list of device names for the mouse selection:

TIP
If you have a two-button mouse, you might want to emulate the third button by setting Emulate3Buttons in the mouse section. Emulation is accomplished by pressing both buttons simultaneously. There are quite a number of other settings available, but they usually are not needed. Look at the XF86Config man page for a list of available settings.

You have to select one type of mouse and its baud rate if it's serial. Note in Listing 10.3 that I have "uncommented" the Microsoft mouse selection for my mouse and the 1200-baud rate line, and you will have to uncomment the line that matches your mouse selection. The 1200-baud rate seems to work fine with older mice and using the 9600 rate did not result in a speed difference for newer mice. Your results may vary.

Listing 10.3. Mouse selection.


#

Section "Pointer"

# Mouse definition and related parameters

#

#MouseSystems "/dev/mouse"

Microsoft     "/dev/mouse"

#MMSeries     "/dev/mouse"

Page 181


#Logitech     "/dev/mouse"

#MouseMan     "/dev/mouse"

#Busmouse     "/dev/mouse"

  BaudRate    1200

#  BaudRate   9600

#  SampleRate 150

#  Emulate3Buttons

... <deleted some stuff here > ...

EndSection

The Server Section

If you want to identify the chipset your graphics card uses, run SuperProbe, a program that comes with XFree86 and is capable of identifying a wide range of graphics hardware. Note that SuperProbe can probe far more hardware than XFree86 supports.

Listing 10.4 shows a plain setting for a 640¥480 monitor for X with a virtual space of 800¥600. A virtual space is an area where the display portion of your monitor is mapped onto. Your monitor is a window into this space.

Listing 10.4. Server selection.


#

# First the 8-bit color SVGA driver

#

vga256



#

# To disable SpeedUp, use NoSpeedUp

#

#  NoSpeedUp

#  Virtual    1152 900



  # Virtual   800 600

  Virtual     640 480

  ViewPort      0 0

  # Modes             "640x480" "800x600" "1024x768"

  # Modes             "640x480" "800x600"

  Modes               "640x480"



#

# Next the 1-bit mono SVGA driver

#

vga2



  Virtual     800 600

  ViewPort      0 0

  Modes               "640x480"

  # Modes        "800x600" "640x480"

Page 182

Setting Up Video Modes

This is the hardest part. Please read VideoModes.doc before beginning. If you are using xf86config (which I strongly recommend) and your monitor is not in the database, choose the generic modes and start making your own modes from there. If you do not have xf86config, read the tutorial on building modes in the README.Config file.

NOTE
I know this entire chapter is full of warnings. Please do not be alarmed. Just be careful and read the instructions for each step before taking it.

The XFree86 distribution includes a neat utility, xvidtune, to tune video modes. Because there is no check on the usability of a mode, you have to check the mode data against your monitor's specifications before testing the mode. The first line of the tuning modes screen gives you information on the specifications of the mode. You have to continuously check that these values are within your monitor's capabilities before testing that mode.

See Listing 10.5 for the common video modes for XFree86.

Listing 10.5. Video modes.


Section "Device"

    Identifier "Generic VGA"

    VendorName "Unknown"

    BoardName "Unknown"

    ChipSet "generic"

#   VideoRam 256

#   Clocks 25.2 28.3

EndSection



# **********************************************************************

# Screen sections

# **********************************************************************



# The color SVGA server



Section "Screen"

    Driver     "svga"

    Device     "Generic SVGA"

    Monitor    "Generic Monitor"

    Subsection     "Display"

        Depth      8

        Modes     "640x480"

        ViewPort   0 0

        Virtual    800 600

    EndSubsection

EndSection



# The 16-color VGA server

Previous | Table of Contents | Next