How to enable the side buttons in Fedora Core 1 default Gnome install.
A lot of my text is just copied from earlier posts. The one new thing I had to do was add the "-f" switch to my imwheel command. Without this it wouldn't work. Below are all the steps I followed to enable my USB "Microsoft Trackball Optical" side buttons to allow me to go forward and back in Mozilla Firebird.
************Summary Steps************
1. Download and install imwheelrc
2. Edit "/etc/X11/XF86Config"
3. Create ".imwheelrc"
4. Manually run and test imwheelrc
5. Run imwheelrc automatically at login
************Detailed Step 1************
1. Download imwheel-1.0.0pre5.tar.gz from
http://jcatki.dhs.org/imwheel/
2. tar xzvf imwheel-1.0.0pre5.tar.gz
3. cd imwheel-1.0.0pre5
4. ./configure
5. make
6. make install
Note that you must be root before running step 6. If you run into trouble in the earlier steps you may want to try them as root too. Run "su -" to get root privileges.
************Detailed Step 2************
In the mouse section in "/etc/X11/XF86Config" I had to replace:
Option "Protocol" "IMPS/2"
with
Option "Protocol" "ExplorerPS/2"
Note that my trackball is plugged into a USB port.
I also had to replace:
Option "ZAxisMapping" "4 5"
with
Option "ZAxisMapping" "6 7"
The last edit I made was to add this line:
Option "Buttons" "7"
So my complete "Mouse0" section now looks like this:
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "ExplorerPS/2"
Option "Device" "/dev/input/mice"
Option "Buttons" "7"
Option "ZAxisMapping" "6 7"
Option "Emulate3Buttons" "no"
EndSection
************Detailed Step 3************
Create a file in your home directory called ".imwheelrc" with this text in it:
".*"
None, Left, Alt_L|Left
None, Right, Alt_L|Right
************Detailed Step 4************
Run these two commands:
xmodmap -e "pointer = 1 2 3 6 7 4 5"
imwheel -k -f -b 0067
You should now be able to use your forward and back buttons in Mozilla (and Firebird).
If you receive a long error message like this:
INFO: current pid 8872 is imwheel.
WARNING: imwheel pid file could not be removed.
Perhaps you want the -p option.
Or chown root and chmod u+s the imwheel executable...
: Operation not permitted
ERROR: Couldn't write pid to pid file
Perhaps you want the -p option to avoid this...
Otherwise you may SUID root the imwheel executable.
: Permission denied
then you need to run (as root):
chown YOURUSERNAME /tmp/imwheel.pid
For example, if you username is bob you would run
chown bob /tmp/imwheel.pid
Now try running "imwheel -k -f -b 0067" again. If the side buttons still don't work in Mozilla you'll have to keep on searching for help, the rest of this post won't be of any use to you.
************Detailed Step 5************
Now that you've gotten the side buttons to work the only thing left to do is to get it to run automatically at login.
Create a file called "imwheelstart.sh" in your home directory with these commands in it:
xmodmap -e "pointer = 1 2 3 6 7 4 5"
imwheel -k -f -b 0067
Make the file executable
chmod u+x imwheelstart.sh
You should now be able to run this file from your home directory by running "./imwheelstart.sh".
Add the file to Gnome "Startup Programs" list by going to:
-RedHatStartMenu->Preferences->More Preferences->Sessions
-Chose the "Startup Programs" tab
-Click the "+Add" button
-Browse to the file we made above "imwheelstart.sh"
-Click "OK", "OK", "Close" to save and exit out of the Sessions program
Your side buttons should work now automatically whenever you login.
************The End************
Although I haven't experimented with it yet, you can enable the side buttons to do different actions for each program you run. The file "/etc/X11/imwheel/imwheelrc" has lots of examples on how to do this. If you wanted to use all the settings in this file simply overwrite your home ".imwheelrc" file with this one.