📄 0179-0182.html
字号:
<HTML>
<HEAD>
<TITLE>Developer.com - Online Reference Library - 0672311739:RED HAT LINUX 2ND EDITION:X Window</TITLE>
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>
-->
<!-- ISBN=0672311739 //-->
<!-- TITLE=RED HAT LINUX 2ND EDITION //-->
<!-- AUTHOR=DAVID PITTS ET AL //-->
<!-- PUBLISHER=MACMILLAN //-->
<!-- IMPRINT=SAMS PUBLISHING //-->
<!-- PUBLICATION DATE=1998 //-->
<!-- CHAPTER=10 //-->
<!-- PAGES=0175-0194 //-->
<!-- UNASSIGNED1 //-->
<!-- UNASSIGNED2 //-->
<P><CENTER>
<a href="0175-0178.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0183-0185.html">Next</A>
</CENTER></P>
<A NAME="PAGENUM-179"><P>Page 179</P></A>
<H4><A NAME="ch10_ 8">
The Keyboard Section
</A></H4>
<P>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.
</P>
<P>Listing 10.2. Keyboard selection.
</P>
<!-- CODE //-->
<PRE>
#
# 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
</PRE>
<!-- END CODE //-->
<H4><A NAME="ch10_ 9">
The Pointer Section
</A></H4>
<P>The pointer section keyword is the name for the protocol the mouse uses. The available
protocol names are listed in the XF86Config man page.
</P>
<P>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.
</P>
<P>Any mouse connected to the PS/2 port uses the PS/2 keyword even if it is in fact a serial mouse.
</P>
<CENTER>
<TABLE BGCOLOR="#FFFF99">
<TR><TD><B>
TIP
</B></TD></TR>
<TR><TD>
<BLOCKQUOTE>
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.
</BLOCKQUOTE></TD></TR>
</TABLE></CENTER>
</P>
<A NAME="PAGENUM-180"><P>Page 180</P></A>
<TABLE BGCOLOR=#FFFF99><TR><TD><B>CAUTION</b></TD></TR><TR><TD><BLOCKQUOTE>
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 <BR>
/usr/src/linux/include/linux/busmouse.h. The macro
MOUSE_IRQ contains this IRQ and is set to 5 by default.
</BLOCKQUOTE></TD></TR></TABLE>
<P>The following is a list of device names for the mouse selection:
</P>
<UL>
<LI>
/dev/inportbm—Use for the Microsoft bus mouse. Note that this uses the bus
mouse protocol, not the Microsoft protocol.
<LI>
/dev/logibm—Use this for the Logitech bus mouse. Note that this uses the bus
mouse protocol, not the Logitech protocol.
<LI>
/dev/psau—Select for a PS/2 or quick port mouse. This uses the PS/2 protocol.
<LI>
/dev/atibm—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.
<LI> Other supported mice are serial mice; therefore, the device names are the same as
the serial devices (/dev/ttyS? or /dev/ttyS?? for Linux).
</UL>
<TABLE BGCOLOR="#FFFF99">
<TR><TD><B>
TIP
</B></TD></TR>
<TR><TD>
<BLOCKQUOTE>
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.
</BLOCKQUOTE></TD></TR>
</TABLE>
</P>
<P>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.
</P>
<P>Listing 10.3. Mouse selection.
</P>
<!-- CODE //-->
<PRE>
#
Section "Pointer"
# Mouse definition and related parameters
#
#MouseSystems "/dev/mouse"
Microsoft "/dev/mouse"
#MMSeries "/dev/mouse"
</PRE>
<!-- END CODE //-->
<A NAME="PAGENUM-181"><P>Page 181</P></A>
<!-- CODE //-->
<PRE>
#Logitech "/dev/mouse"
#MouseMan "/dev/mouse"
#Busmouse "/dev/mouse"
BaudRate 1200
# BaudRate 9600
# SampleRate 150
# Emulate3Buttons
... <deleted some stuff here > ...
EndSection
</PRE>
<!-- END CODE //-->
<H4><A NAME="ch10_ 10">
The Server Section
</A></H4>
<P>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.
</P>
<P>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.
</P>
<P>Listing 10.4. Server selection.
</P>
<!-- CODE //-->
<PRE>
#
# 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"
</PRE>
<!-- END CODE //-->
<A NAME="PAGENUM-182"><P>Page 182</P></A>
<H4><A NAME="ch10_ 11">
Setting Up Video Modes
</A></H4>
<P>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.
</P>
<CENTER>
<TABLE BGCOLOR="#FFFF99">
<TR><TD><B>
NOTE
</B></TD></TR>
<TR><TD>
<BLOCKQUOTE>
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.
</BLOCKQUOTE></TD></TR>
</TABLE></CENTER>
</P>
<P>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.
</P>
<P>See Listing 10.5 for the common video modes for XFree86.
</P>
<P>Listing 10.5. Video modes.
</P>
<!-- CODE //-->
<PRE>
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
</PRE>
<!-- END CODE //-->
<P><CENTER>
<a href="0175-0178.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0183-0185.html">Next</A>
</CENTER></P>
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -