LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   5 button mouse, almost working (https://www.linuxquestions.org/questions/fedora-35/5-button-mouse-almost-working-529030/)

ThirtySixBelow 02-14-2007 11:37 AM

5 button mouse, almost working
 
I modified my xorg.conf file to work with my mouse. Now it seems all I have to run to get it to work is the command
xmodmap -e "pointer = 1 2 3 8 9 4 5 6 7 10 11"

I'm not sure where to put this command to make it work all the time. Someone suggested .xsession, which mine currently looks like this.
xmodmap -e "pointer = 1 2 3 8 9 4 5 6 7 10 11" &
exec imwheel -k -b "67" &
exec $REALSTARTUP


Any ideas where to put this info? I've seen things like mouse.sh, but I'm not sure what to do.

belliott4488 02-15-2007 08:30 PM

Please let us know how this works out for you.

I gave up on getting my mouse to work fully a couple of years ago, but maybe it's worth a fresh look. I'm in a more difficult position, though, since my mouse would have to be configured as a nine-button mouse (!!). There are four physical buttons (two main ones and two "extra" ones), plus two scroll wheels (so they get configured as two buttons each, for four more buttons), one of which is also clickable (ninth button).

This mouse works great with the OS for which there's actually a driver; I wish I could get full functionality on Linux ...

Quakeboy02 02-15-2007 08:38 PM

"Any ideas where to put this info? I've seen things like mouse.sh, but I'm not sure what to do."

I put it in a shell file and called that shell file from gnome's Desktop->Preferences->Sessions->Startup Programs.

ThirtySixBelow 02-19-2007 10:47 AM

Ok, I got it working. This works with my Intellimouse 3.0 and should work with any 5 button mouse. The only thing you might have to toy around with is the xmodmap button order in combination with the number of buttons.

First thing was to change the xorg.conf file. I'm not sure if every single statement is necissary, but this worked for me. Too much is better than too little. :)

Code:

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "CorePointer"
        Option      "Protocol" "ExplorerPS/2"
        Option      "Device" "/dev/input/mice"
        Option      "Buttons" "7"
        Option      "ZAxisMapping" "6 7"
EndSection

Next was to insert the xmodmap statement into a file called mouse.sh. Create the mouse.sh file under /etc/X11/xinit/xinitrc.d/ and give it execute rights. The file should contain the following statements.

Code:

#!/bin/sh
# /etc/X11/xinit/xinitrc.d/mouse.sh
# Required for the configuration of a 5-button mouse
xmodmap -e "pointer = 1 2 3 8 9 4 5 6 7 10 11"

Again, i'm pretty sure the first part is just interpreted as comments. Not entirely sure if they are needed at all.
The xmodmap statement is what most people will find themselves messing with the get the proper functionality of each button. This setup should work for anyone with an Intellimouse 3.0. mouse.sh is run on startup via xinit so the session does not need an extra script or command under startup programs for it to work.


All times are GMT -5. The time now is 01:43 AM.