Section 1.6. My Mouse Doesn t Do What I Want


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.

If you have a two-button mouse and a scroll wheel in the middle, you may really have a three-button mouse. Press down on the scroll wheel. If it clicks, it can function as a middle mouse button and is often detected as such by Linux X Window System configuration tools.


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:


Buttons

Under the Buttons tab, you can configure a "left-handed" mouse, which switches the left and right buttons on a standard mouse. This is often preferred by left-handed users. The double-click timeout specifies the amount of time that can pass between clicks when double-clicking on an item. Users who have problems with double-click speed may want to experiment with this setting.


Cursors

Under the Cursors tab, you can specify the size of the cursor. The default size may be too small, especially for nearsighted users who have configured a high dot-pitch resolution (such as 1600 x 1200).


Motion

Under the Motion tab, you can specify the speed (Acceleration) with which you can move the pointer, the Sensitivity of your pointer to motion, and the Threshold associated with drag-and-drop actions.

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:


General

Under the General tab, you can configure a "left-handed" mouse, which switches the left and right buttons on a standard mouse. You can even reverse the effect of a scroll wheel. You can also modify the behavior of single- and double-clicks with respect to opening files and folders.


Cursor Theme

You can select the cursor theme of your choice. Some themes may be easier to see in your GUI than others.


Advanced and Mouse Navigation (two tabs)

You can customize the way the mouse moves on your screen, as well as the drag-and-drop behavior of the mouse, using the options available under both of these tabs. Users with problems working with their pointing devices may want to experiment with some of these settings.

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[2]"   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.

Table 1-7. Directives for a touchpad

Directive

Description

Section "Input Device"

Start of the stanza.

Driver "synaptics"

Points to the Synaptics driver; may work for touchpads of other brands.

Identifier "Mouse[2]"

Identifies this Input Device as the second mouse.

Option "Device" "/dev/input/mice"

Specifies the device associated with the touchpad; may also be /dev/psaux.

Option "Emulate3Buttons" "on"

Supports middle-mouse-button emulation; the features of the middle button can be invoked by clicking the left and right mouse buttons simultaneously.

Option "InputFashion" "Mouse"

Allows input from the touchpad as if it were a regular mouse.

Option "Name" "Synaptics;Touchpad"

Specifies an appropriate name for the InputDevice.

Option "Protocol" "explorerps/2"

Most touchpads work as a PS2 device; if you're not sure of yours, you may be able to substitute "auto-dev".

Option "SHMConfig" "on"

Allows sharing of the touchpad space between the main area for navigation and the right-hand quarter for scrolling.

Option "ZAxisMapping" "4 5"

Configures scrolling up and down.

Option "RTCornerButton" "0"

Disables a middle click when you tap on the upper-right corner of the tap area, which provides more control on desktops with middle-mouse-button functionality, such as KDE.

Option "RBCornerButton" "0"

Disables a right click when you tap on the upper-right corner of the tap area, which requires you to use the touchpad button for right clicks.

EndSection

End of the stanza.


You may note that the Option "Vendor" "Sysp" directive is missing from the table; it's a label. RTCornerButton and RBCornerButton are directives you might consider if you have a touchpad.


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!



Linux Annoyances for Geeks
Linux Annoyances for Geeks: Getting the Most Flexible System in the World Just the Way You Want It
ISBN: 0596008015
EAN: 2147483647
Year: 2004
Pages: 144
Authors: Michael Jang

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net