Home of The Linux Revolution
PicoSearch

Quick Links

 Home 
 Distros 
 Mandrake
 Slackware
 All
 Topics 
Linux 
What is
Linux?
Why Use
Linux?
 
GUI 
What
is X?
Scroll 
Mouse
 Commands 
Commands
Reference
.tar.gz
 GIMP 
Save As
GIF
Outlines
Links
(Coming Soon!)

Windows Info

How to Enable a Scroll Mouse in Linux / KDE / Gnome / XFree86


From text editing, to web browsing, to writing / reading emails, once you use a scroll mouse you can't hardly use a PC without one.

Many Linux distributions will enable mouse wheel scrolling by default, others do not. The below instructions will give some tips and pointers (no pun intended) in configuring XFree86 to understand your scroll mouse.




Background / Concept

What we are actually doing here is telling the X Server (graphical interface program) what to do with certain mouse commands, which in turn will tell the application you are using how to act with these mouse commands.

Mouse Wheel Motion
Mouse, with arrow to the scroll wheel
Small red right arrow X Server
The XFree86 Project (www.xfree68.org)
Small red right arrow Buttons 4 & 5 Events (Explained Below)
Top of the mouse, showing scroll wheel
Small red right arrow Toolkits / Apps / Config Files
Graphic of an application
Small red right arrow Scrolling In Apps
Application with up and down arrows.


Configuration Entries

To configure XFree86 to understand that you have a scroll mouse, and how to interpret its commands, you must edit the XF86Config File.

To edit XF86, you must, as root, browse to the /etc/X11 directory. Edit XF86Config with the editor of your choice (we used "gedit" by Right Clicking the Document and choosing Open With > gEdit). Scroll down to the "Core Pointer's InputDevice section" and take note of the current settings, which now need to be removed. You may wish to place a "#" at the beginnings of duplicate lines to "comment out" the lines instead of deleting them (greatly easing the pain of reverting back in case this solution does not entirely work for your system).

Copy and paste the following text into your XF86Config file, remembering to comment or delete duplicate command entries (such as the existing "Option Protocol" directive).

# Option "Protocol" "PS/2"
Option "Protocol" "IMPS/2"
Option "Buttons" "5"
Option "ZAxisMapping" "4 5"


The Above Configuration Options Explained

# Option "Protocol" "PS/2"

This is your old "commented out" protocol directive, the one that didn't make your scroll mouse work.


Option "Protocol" "IMPS/2"

The new protocol directive. Stands for I(ntelli)M(ouse)PS/2


Option "Buttons" "5"

Tells X how many buttons your mouse has (check the diagram below). The current version of XFree86 only allows for mice with 5 buttons. Additional buttons may be mapped to keyboard commands (see Further Discussion below).

Mouse Button Diagram

Option "ZAxisMapping" "4 5"

Maps the buttons to functions



Further Discussion

Taken from http://koala.ilog.fr/colas/mouse-wheel-scroll an excellent page for scroll mouse resources:

Q - I want to use the side "thumb" button to something other than button2, or use a mouse with 4 buttons or more

A - Well, This seems difficult, due to the fact that the X protocol only supports 5 buttons and xmodmap do not allow to remap two physical buttons to the same logical value, so I have no solution here. The best way should be (and it would allow to use horizontal wheels too) should be to have the X server modified to send fake keyboard events on wheel events, not button events. Adding this to XFree would be nice.


The Linux Revolution is looking for its next Linux topic. If you have a subject related to Linux that you would like to see here, please email "Topics <at> TheLinuxRevolution.net".


Home Linux Forums Linux Topics Linux Distros
Legal
All images, trademarks and copyrights herein
are property of their respective owners.
All else Copyright © 2004 The Linux Revolution
Linux is a registered trademark of Linus Torvalds.