LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   How I enabled the side mouse buttons in Fedora Core 2 default Gnome install (https://www.linuxquestions.org/questions/linux-hardware-18/how-i-enabled-the-side-mouse-buttons-in-fedora-core-2-default-gnome-install-188636/)

jim-j 06-01-2004 07:56 PM

How I enabled the side mouse buttons in Fedora Core 2 default Gnome install
 
How I enabled the side mouse buttons in Fedora Core 2 default Gnome install.

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 Firefox. I don't understand why I have to do most the steps I do, and since I'm also am very busy right now I probably won't be able to answer any questions. However, this setup worked for me, so on the outside chance it will help someone else I thought I'd post it. It's the basically the same instructions I posted for FC1, with just a couple minor updates.

************Summary Steps************
1. Download and install imwheelrc
2. Edit "/etc/X11/xorg.conf"
3. Create ".imwheelrc"
4. Manually run and test imwheelrc
5. Run imwheelrc automatically at login



************Detailed Step 1************
1. Download imwheel-1.0.0pre10.tar.gz from http://imwheel.sourceforge.net/
2. tar xzvf imwheel-1.0.0pre10.tar.gz
3. cd imwheel-1.0.0pre10
4. ./configure
5. make
6. make install
-Note that you must be root before running step 6. Run "su -" to get root privileges.
-I used imwheel-1.0.0pre10 because it was the latest version available at the time that I wrote this. The newer versions will probably work with these instructions, but I've never tested them.



************Detailed Step 2************
In the mouse section in "/etc/X11/xorg.conf" I had to replace:
Option "Protocol" "IMPS/2"
with
Option "Protocol" "ExplorerPS/2"

Note that my trackball is plugged into a USB port. I don't know if this matters.

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

Now restart your Xserver (CTRL+ALT+BACKSPACE or a simple reboot)



************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 -b 0067

You should now be able to use your forward and back buttons in Firefox (and Mozilla). If they work continue on to step 5. Otherwise see below for a resolution to one possible problem.

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 -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 -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:
-Run "gnome-session-properties" from a command prompt
-Note that in Fedora Core 1 this was available at FedoraStartMenu->Preferences->More Preferences->Sessions, but for some reason it doesn't show up on the Core 2 menu.
-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.

mawero 12-29-2004 05:23 AM

Hi, I've found your guide really cool but I don't understand why you play this command: imwheel -k -b 0067

I tryed to not use it but only using xmodmap -e "pointer = 1 2 3 6 7 4 5" and it works at the same without some error.


(sorry if I have a bad english :p )

jim-j 12-31-2004 04:17 PM

Quote:

Originally posted by mawero
Hi, I've found your guide really cool but I don't understand why you play this command: imwheel -k -b 0067

I tryed to not use it but only using xmodmap -e "pointer = 1 2 3 6 7 4 5" and it works at the same without some error.


(sorry if I have a bad english :p )

I don't know why I ran 'imwheel -k -b 0067'. I thought it was needed in FC2. I'm now on FC3 and as you pointed out it isn't needed, at least in FC3. I don't understand why I had to do a lot of the steps in my post above, I just know that they worked for me. :)


All times are GMT -5. The time now is 12:13 AM.