📄 ch22.htm
字号:
< information for the section >
EndSection
</FONT></PRE>
<H4 ALIGN="CENTER"><A NAME="Heading8<FONT COLOR="#000077">The Pathnames</FONT></H4>
<P>There is no reason to fiddle with the standard paths as provided in the sample
<TT>XF86Config</TT> file. In fact, any Linux distribution that provides strange paths
will also have edited this section of the <TT>XF86Config.eg</TT> or the template
<TT>XF86Config</TT> file for <TT>ConfigXF86</TT>. You do have to know where these
paths are pointing to in case of difficulties.</P>
<P>Your <TT>XF86Config</TT> file should look similar to my <TT>XF86Config</TT> file,
as shown in Listing 22.1.
<H3 ALIGN="CENTER"><A NAME="Heading9<FONT COLOR="#000077">Listing 22.1. Font
paths.</FONT></H3>
<PRE><FONT COLOR="#0066FF">
#
# Multiple FontPath entries are allowed (which are concatenated together),
# as well as specifying multiple comma-separated entries in one FontPath
# command (or a combination of both methods)
#
FontPath "/usr/X11R6/lib/X11/fonts/misc/"
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"
FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"
# FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"
</FONT></PRE>
<P>To see whether these lines are correct, look into each of the directories mentioned
in List- ing 22.1 to see whether they have files in them. If these directories are
empty, you do not have the fonts installed, or they might be at another location.
<H4 ALIGN="CENTER"><A NAME="Heading10<FONT COLOR="#000077">The Keyboard Section</FONT></H4>
<P>You should specify the <TT>ServerNumlock</TT> option in this section if it is
not already defined. This is an easy way to specify your keyboard for XFree86. Otherwise,
only those keyboard modifications needed for international keyboard support must
be set manually. In a typical <TT>XConfig</TT> file, this section looks like the
one shown in Listing 22.2.
<H3 ALIGN="CENTER"><A NAME="Heading11<FONT COLOR="#000077">Listing 22.2. Keyboard
selection.</FONT></H3>
<PRE><FONT COLOR="#0066FF">
#
# 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
</FONT></PRE>
<H4 ALIGN="CENTER"><A NAME="Heading12<FONT COLOR="#000077">The Pointer Section</FONT></H4>
<P>The pointer section keyword is the name for the protocol the mouse uses. The available
protocol names are listed in the <TT>XF86Config</TT> man page.</P>
<P>The Logitech serial mouse uses several keywords. The MouseMan uses the <TT>MouseMan</TT>
keyword. The more recent Logitech serial mouse uses the <TT>Microsoft</TT> keyword.
The older Logitech serial mouse uses the <TT>Logitech</TT> keyword.</P>
<P>Any mouse connected to the PS/2 port uses the <TT>PS/2</TT> keyword even if it
is in fact a serial mouse.
<DL>
<DT></DT>
</DL>
<DL>
<DD>
<HR>
<A NAME="Heading13<FONT COLOR="#000077"><B>TIP:</B> </FONT>If you are not sure
which kind of bus mouse you have, look at the kernel's startup messages. It identifies
the bus mouse type.
<HR>
</DL>
<DL>
<DT></DT>
</DL>
<DL>
<DD>
<HR>
<A NAME="Heading14<FONT COLOR="#000077"><B>CAUTION:</B> </FONT>Ensure that
the kernel bus mouse driver is using the same IRQ as the bus mouse. If not, you must
change the IRQ and rebuild the kernel. The IRQ for bus mouse devices is given in
</DL>
<DL>
<DD><FONT COLOR="#0066FF">/usr/src/linux/include/linux/busmouse.h</FONT>
</DL>
<PRE></PRE>
<BLOCKQUOTE>
<P>The macro <TT>MOUSE_IRQ</TT> contains this IRQ and is set to <TT>5</TT> by default.
<HR>
</BLOCKQUOTE>
<P>Following is a list of device names for the mouse selection:
<UL>
<LI><TT>/dev/inportbm</TT>--Use this for the Microsoft bus mouse. Note that this
uses the Bus Mouse protocol, not the Microsoft protocol.
<P>
<LI><TT>/dev/logibm</TT>--Use this for the Logitech bus mouse. Note that this uses
the Bus Mouse protocol, not the Logitech protocol.
<P>
<LI><TT>/dev/psaux</TT>--Select this for a PS/2 or quick port mouse. This uses the
PS/2 protocol.
<P>
<LI><TT>/dev/atibm</TT>--Use this for the ATI XL bus mouse. Note that the ATI GU
bus mouse is a Logitech or Microsoft bus mouse, depending on the version you have.
<P>
<LI>Other supported mice are serial mice; therefore, the device names are the same
as the serial devices (<TT>/dev/ttyS</TT>? or <TT>/dev/ttyS</TT>?? for Linux).
</UL>
<DL>
<DT></DT>
</DL>
<DL>
<DD>
<HR>
<A NAME="Heading15<FONT COLOR="#000077"><B>TIP:</B> </FONT>If you have a two-button
mouse, you might want to emulate the third button by setting <TT>Emulate3Buttons</TT>
in the mouse section. Emulation is accomplished by a press of both buttons simultaneously.
Many other settings are available, but they usually are not needed. Look at the <TT>XF86Config</TT>
man page for a list of available settings.
<HR>
</DL>
<P>You have to select one type of mouse and its baud rate if it's serial. Note in
Listing 22.3 that I have "uncommented" the Microsoft mouse selection for
my mouse and the 1200-baud-rate line. 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. (Actually,
the 9600 rate did not work with my mouse at all.) Your results might vary.
<H3 ALIGN="CENTER"><A NAME="Heading16<FONT COLOR="#000077">Listing 22.3. Mouse
selection.</FONT></H3>
<PRE><FONT COLOR="#0066FF">
#
Section "Pointer"
# Mouse definition and related parameters
#
#MouseSystems "/dev/mouse"
Microsoft "/dev/mouse"
#MMSeries "/dev/mouse"
#Logitech "/dev/mouse"
#MouseMan "/dev/mouse"
#Busmouse "/dev/mouse"
BaudRate 1200
# BaudRate 9600
# SampleRate 150
# Emulate3Buttons
... <deleted some stuff here > ..
EndSection
</FONT></PRE>
<H4 ALIGN="CENTER"><A NAME="Heading17<FONT COLOR="#000077">The Server Section</FONT></H4>
<P>If you want to identify the chip set 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.</P>
<P>Listing 22.4 shows a plain setting for a 640x480 monitor for X with a virtual
space of 800x600. A virtual space is an area where the display portion of your monitor
is mapped onto. Your monitor is a window into this space.
<H3 ALIGN="CENTER"><A NAME="Heading18<FONT COLOR="#000077">Listing 22.4. Server
selection.</FONT></H3>
<PRE><FONT COLOR="#0066FF">
#
# 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"
</FONT></PRE>
<H4 ALIGN="CENTER"><A NAME="Heading19<FONT COLOR="#000077">Setting Up Video
Modes</FONT></H4>
<P>This is the hardest part. If your monitor is not in the database, choose the generic
modes (VGA and 640x480) and start making your own modes from there. The <TT>VideoModes.doc</TT>
file in <TT>/usr/lib/X11/docs</TT> is a very detailed document on how monitors work.
It should help you determine which parameters you need for this section.
<DL>
<DT></DT>
</DL>
<DL>
<DD>
<HR>
<A NAME="Heading20<FONT COLOR="#000077"><B>NOTE:</B> </FONT>I know that this
entire chapter is full of warnings, but don't be alarmed. Just be careful and read
the instructions for each step before taking it.
<HR>
</DL>
<P>The <TT>xvidtune</TT> program is a neat utility to tune video modes. The modes
listed after running this utility might not work in all cases. You still have to
check the mode data against your monitor's data sheet and specifications before actually
testing the mode. The first line of the tuning mode's 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.</P>
<P>See Listing 22.5 for the common video modes for XFree86.
<H3 ALIGN="CENTER"><A NAME="Heading21<FONT COLOR="#000077">Listing 22.5. Common
video modes.</FONT></H3>
<PRE><FONT COLOR="#0066FF">
Section "Device"
Identifier "Generic VGA"
VendorName "Unknown"
BoardName "Unknown"
ChipSet "generic"
# VideoRam 256
# Clocks 25.2 28.3
EndSection
# **********************************************************************
# Screen sections
# **********************************************************************
# The colour 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-colour VGA server
Section "Screen"
Driver "vga16"
Device "Generic VGA"
Monitor "Generic Monitor"
Subsection "Display"
Modes "640x480"
ViewPort 0 0
Virtual 800 600
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -