📄 132-135.html
字号:
<HTML>
<HEAD>
<TITLE>Linux Configuration and Installation:Installing and Configuring XFree86</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=1558285660//-->
<!--TITLE=Linux Configuration and Installation//-->
<!--AUTHOR=Patrick Volkerding//-->
<!--AUTHOR=Kevin Reichard//-->
<!--AUTHOR=Eric Foster//-->
<!--PUBLISHER=IDG Books Worldwide, Inc.//-->
<!--IMPRINT=M & T Books//-->
<!--CHAPTER=3//-->
<!--PAGES=132-135//-->
<!--UNASSIGNED1//-->
<!--UNASSIGNED2//-->
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="129-132.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="135-139.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
<P><BR></P>
<H4 ALIGN="LEFT"><A NAME="Heading14"></A><FONT COLOR="#000077">Configuring the Pointer Section</FONT></H4>
<P>The mouse—called <I>pointer</I> in X terminology—is rather easy to set up, but you must watch out for some tricks. The main reason for this is that many vendors’ mice (e.g., Logitech) are set up to emulate other vendors’ mice, most notably Microsoft mice. Because of this, you may have to lie about your mouse.</P>
<P>For example, one of our test systems uses a serial Logitech Firstmouse. This mouse was designed by Logitech to emulate the Microsoft serial mouse. What’s odd is that the Logitech mouse has three buttons (a very good thing for X, as most X programs expect three-button mice), while the Microsoft serial mouse sports only two buttons.</P>
<P>When we configure the <B>XF86Config</B> file, we claim our Logitech mouse is really a Microsoft mouse (the other common choice for Logitech mice is to claim that they are Mouseman mice).</P>
<P>The two key things you must specify for your Pointer section is what kind of mouse, e.g., Microsoft, and what port, if it’s a serial mouse.</P>
<P>With this, our Pointer section is rather short:</P>
<!-- CODE SNIP //-->
<PRE>
Section "Pointer"
Protocol "Microsoft"
Device "/dev/ttyS0"
EndSection
</PRE>
<!-- END CODE SNIP //-->
<P>Be sure to put in the type of mouse you have and the device it is connected to, rather than merely copying our configuration.
</P>
<P>The protocol must be one of the options listed in Table 3.9.</P>
<TABLE WIDTH="100%"><CAPTION><B>Table 3.9</B> Pointer Protocols
<TR>
<TH WIDTH="100%" ALIGN="LEFT">Protocol
<TR>
<TH COLSPAN="1"><HR>
<TR>
<TD>BusMouse
<TR>
<TD>Logitech
<TR>
<TD>Microsoft
<TR>
<TD>MMSeries
<TR>
<TD>Mouseman
<TR>
<TD>MouseSystems
<TR>
<TD>PS/2
<TR>
<TD>MMHitTab
<TR>
<TD>Xqueue
<TR>
<TD>OSMouse
<TR>
<TD COLSPAN="1"><HR>
</TABLE>
<P>For Logitech mice, you’ll most likely use BusMouse (if a bus mouse); for serial mice, you’ll probably use the Microsoft or Mouseman protocols, rather than the more obvious Logitech protocol. If your mouse is connected to a PS/2 port, use the PS/2 protocol. (If you’re using a newer system from a mass merchandiser like Dell, check the mouse port. Many newer systems feature PS/2 mouse ports, but they’re not always called PS/2 ports; for example, Dell calls it a mouse port.)
</P>
<P>The Xqueue protocol is only used if you set that up for the keyboard, too. We don’t advise using this. The OSMouse is only for SCO UNIX, not for Linux.</P>
<P>In our case, the mouse is connected to serial port number one, often called <I>com1</I> in the DOS lexicon. In true UNIX tradition, however, Linux starts counting serial ports with 0. To specify our mouse is connected to com1, we use a device name of <B>/dev/ttyS0</B>, the Linux device file for this port. We list commonly used ports in Table 3.10.</P>
<TABLE WIDTH="100%"><CAPTION><B>Table 3.10</B> Commonly Used Serial Ports in Linux
<TR>
<TH WIDTH="25%" ALIGN="LEFT">Port
<TH WIDTH="75%" ALIGN="LEFT">Device File Name in Linux
<TR>
<TH COLSPAN="2"><HR>
<TR>
<TD>com1
<TD>/dev/ttyS0
<TR>
<TD>com2
<TD>/dev/ttyS1
<TR>
<TD>com3
<TD>/dev/ttyS2
<TR>
<TD>com4
<TD>/dev/ttyS3
<TR>
<TD COLSPAN="2"><HR>
</TABLE>
<P>Your system may also have the <B>/dev/mouse</B> device file set up for the mouse port. No matter what device file you choose, the device must exist beforehand. (On our system, <B>/dev/mouse</B> is a link to <B>/dev/ttyS0</B>.)</P>
<P>The bus mouse device files are listed in Table 3.11.</P>
<TABLE WIDTH="100%"><CAPTION><B>Table 3.11</B> Bus mouse Device Names
<TR>
<TH WIDTH="30%" ALIGN="LEFT">Device
<TH WIDTH="70%" ALIGN="LEFT">Usage
<TR>
<TH COLSPAN="2"><HR>
<TR>
<TD>/dev/atibm
<TD>ATI bus mouse
<TR>
<TD>/dev/logibm
<TD>Logitech bus mouse
<TR>
<TD>/dev/inportbm
<TD>Microsoft bus mouse
<TR>
<TD>/dev/psaux
<TD>PS/2 or Quickport mice
<TR>
<TD COLSPAN="2"><HR>
</TABLE>
<P>Note that except for the <B>/dev/psaux</B> PS/2 mice, all the bus mice should use a protocol of <I>busmouse</I>.</P>
<P>There are a few more options for the Pointer section, but you’re normally better off leaving them alone. (We know; we were curious and we managed to mess things up.)</P>
<P>We list the other Pointer options in Table 3.12.</P>
<TABLE WIDTH="100%"><CAPTION><B>Table 3.12</B> Other Pointer Section Options
<TR>
<TH WIDTH="30%" ALIGN="LEFT">Option
<TH WIDTH="70%" ALIGN="LEFT">Usage
<TR>
<TH COLSPAN="2"><HR>
<TR>
<TD>BaudRate rate
<TD>Specifies the baud rate for the serial mouse
<TR>
<TD VALIGN="TOP">Emulate3Buttons
<TD>Allows a two-button mouse to act like a three-button mouse; the third button is emulated by pressing both at once
<TR>
<TD>ChordMiddle
<TD>Fixes a problem with some Logitech Mouseman mice
<TR>
<TD>SampleRate rate
<TD>Fixes a problem with some Logitech mice
<TR>
<TD VALIGN="TOP">ClearDTR
<TD>May be required by dual-protocol mice in MouseSystems protocol mode
<TR>
<TD VALIGN="TOP">ClearRTS
<TD>May be required by dual-protocol mice in MouseSystems protocol mode
<TR>
<TD COLSPAN="2"><HR>
</TABLE>
<P>We generally don’t set the baud rate. When we tried to, the mouse didn’t work. If you do this, it is one time where the <B>Ctrl-Alt-Backspace</B> zapping sequence comes in handy.</P>
<P>For best results in X, you want to have a three-button mouse. Many X programs assume such a mouse.</P><P><BR></P>
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="129-132.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="135-139.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -