[UBUNTU 5.10] How to configure extra buttons on a Logitech Cordless Optical mouse
On my desktop system, I have the Logitech Ultra X Cordless Desktop keyboard and mouse bundle. After installing Ubuntu, the mouse's scrollwheel worked OK, but the thumb-buttons that are configured on Windows as back and forward buttons (in a browser) didn't work. While there seem to be plenty of 'how-to' guides around for configuring the extra buttons on a Microsoft IntelliMouse, there don't seem to be any for this specific mouse. The steps below will allow you to configure these two thumb buttons to provide back & forward actions in Firefox.
Modifying xorg.conf
-
The first thing you need to do is make some modifications to the X.org configuration file that the Ubuntu installer will have
automatically generated. Open up the
/etc/X11/xorg.conf
file in a text editor as root:
sudo vi /etc/X11/xorg.conf
-
Within this file, find the
InputDevice
section for your mouse. In my original xorg.conf file, my configuration looked
like this:
Section "InputDevice" Identifier "Configured Mouse" Driver "mouse" Option "CorePointer" Option "Device" "/dev/input/mice" Option "Protocol" "ImPS/2" Option "Emulate3Buttons" "true" Option "ZAxisMapping" "4 5" EndSectionThis configuration will not allow the thumb buttons to work (I couldn't get it to anyway). -
These settings need to be tweaked a little by adding a line and changing some of the existing ones so that you end up with the
following
InputDevice
settings:
Section "InputDevice" Identifier "Configured Mouse" Driver "mouse" Option "CorePointer" Option "Device" "/dev/input/mice" Option "Protocol" "ExplorerPS/2" Option "Emulate3Buttons" "false" Option "Buttons" "9" Option "ZAxisMapping" "4 5 6 7" EndSection - Save your changes to this file.
Create an xmodmap Xsession file
-
The next step is just a simple creation of a text file (an xmodmap) to put in
/etc/X11/Xsession.d/
:
sudo vi /etc/X11/Xsession.d/57xmodmap
-
The contents of the
57xmodmap
file should be:
#/bin/bash xmodmap -e "pointer = 1 2 3 4 5 8 9 6 7" -
Save your changes to this file, then restart the X server by pressing CTRL+ALT+Backspace. Once you log back in, you should find
that you can now move backwards and forwards through pages in Firefox.
I've also noticed that these buttons also do horizontal scrolling in the gedit text editor and Bluefish , which I think should really be done with the horizontal tilt on the scroll-wheel. If I ever figure out how to get the wheel tilt working, I'll update this how-to.
This how-to assumes that you are using standard Gnome-based Ubuntu (i.e.: what you get after doing a standard installation). It should work with other Ubuntu derivatives such as Kubuntu or Xubuntu, as all changes are to X server settings and not Gnome-specific.