1.6. My Mouse Doesn't Do What I Want
The mouse (or pointing device, such as a touchpad) is important to users on any graphical desktop environment. Each button has its function. Left-handed users often find it helpful to switch the functionality of the left and right buttons. All users may want to customize the size of the cursor, as well as the speed of motion. Many users may have problems with the scroll wheel.
The middle mouse button is important for some users. It activates a pop-up menu in the KDE desktop environment, and it pastes recently highlighted text into editors and the command-line interface.
But most PC-based pointing devices, including mice, have only two buttonsor it might just seem that way. In many cases, you can configure a middle mouse button using the appropriate X Window configuration tool; I've described several in the previous annoyance and won't describe their uses here.
You may be able to configure what you need with the GNOME Mouse Preferences tool or the KDE Configure - Mouse tool. If you need to do more, such as configure a scroll wheel or touchpad, you may need to modify your X Window configuration file directly. I illustrate how to help you meet both needs in this annoyance.
1.6.1. GNOME Mouse Preferences
Any user can start the GNOME Mouse Preferences tool with the gnome-mouse-properties command. In each of the distributions discussed in this book, it includes three tabs:
If you're running Debian or SUSE Linux, changes are saved to the individual user's home directory, in the ~/.gconf/%gconf-tree.xml configuration file. If you're running Red Hat/Fedora Linux, changes are saved to the %gconf.xml file in the ~/.gconf/desktop/gnome/peripherals/mouse directory (which you won't see if you use default settings).
1.6.2. KDE Mouse Preferences
Any user can start the KDE Configure Mouse tool with the kcmshell mouse command. In each of the distributions discussed in this book, it includes four tabs:
Changes are written to several KDE configuration files in each individual user's ~/.kde/share/config directory. The actual files vary by distribution. If you need to know what they are, after you make changes, log in as the target user and run the following command:
ls -ltr ~/.kde/share/config
1.6.3. The Scroll Wheel
When you're in an application with a long array of data, such as a 30-page document or a big web page, you can often use the scroll wheel to move up and down the document. The scroll wheel is usually a wheel in the center of a mouse. Virtual scroll wheels are also offered by some touchpads. In many cases, if you move your finger up and down the right quarter of the touchpad, the effect is the same as that of a scroll wheel.
Linux may have already configured your scroll wheel when it detected your mouse. If so, you should have no problems using your scroll wheel.
However, the configuration of a virtual scroll wheel on a touchpad is a more difficult exercise. I illustrate the necessary changes to the xorg.conf file here using the working configuration from my SUSE workstation on a Sony laptop. The same settings work well on my Debian workstation on an HP laptop, with a couple of modifications:
Section "InputDevice" Driver "synaptics" Identifier "Mouse" Option "Device" "/dev/input/mice" Option "Emulate3Buttons" "on" Option "InputFashion" "Mouse" Option "Name" "Synaptics;Touchpad" Option "Protocol" "explorerps/2" Option "SHMConfig" "on" Option "Vendor" "Sysp" Option "ZAxisMapping" "4 5" EndSection
These directives may not work for your touchpad. If you have a touchpad on a laptop computer, you may be able to benefit from the experience of others. Search for the name of your laptop computer online. Alternatively, search for your laptop on a web site such as http://www.linux-laptop.net.
Now, I'll explain each of these directives in Table 1-7. The first and last directives are straightforward; they bracket the stanza. All mice, touchpads, other pointing devices, and even keyboards are known as the InputDevice directive.
Configuration data for other types of pointing devices is available in the README.mouse file, typically available in the /usr/X11R6/lib/X11/doc directory. It includes configuration information for an alternative touchpad, the Alps GlidePoint.
If this configuration doesn't work for you, make sure you've inserted the names of the appropriate drivers into a file such as /etc/modprobe.conf, /etc/modules.conf, or /etc/modprobe.d/mouse.
You may want to customize your touchpad further. While there is no dedicated HOWTO or FAQ that explains the directives that you can use, there is hard-won experience available from other Linux users on web sites such as http://tuxmobil.org. They include directives such as LeftEdge, RightEdge, TopEdge, BottomEdge, FingerLow, FingerHigh, MaxTapTime, MaxTapMove, VertScrollDelta, MinSpeed, MaxSpeed, EdgeMotionSpeed, and AccelFactor.
Some trial and error may be required, so remember to back up your X Window configuration file before you start editing!