« NoSuchMethodError - AdfFacesContextFactory.createContext | Main | Multiple Checkbox Selection in UIX Fails with JavaScript Error in Internet Explorer »

7 Buttons Mouse in Linux


I had some problems to have my 7 buttons mouse (Logitech MX510) working correctly under Linux.
Problem was that the Back and Forward buttons didn't work correctly:
the first had the same effect has the left button click and the second the same effect as the right button click.
And I couldn't find the right mouse (or equivalent) in the Mouse Configuration.

I could finally configure it correctly by editing the /etc/X11/XF86Config (Red Hat 4) and /etc/X11/xorg.conf (Oracle Unbreakable Linux) as the following:

(...)
Section "ServerLayout"
        (...)
        InputDevice    "Logitech" "CorePointer"
        (...)
EndSection
(...)
Section "InputDevice"
        Identifier  "Logitech"
        Driver       "mouse"
        Option      "Protocol" "ExplorerPS/2"
        Option      "Device" "/dev/input/mice"
        Option      "Buttons" "7"
        Option      "ZAxisMapping" "6 7"
        Option      "Emulate3Buttons" "no"
EndSection
(...)
The button numbers after "ZAxisMapping" are the values of the
scroll wheel up and down.

I used the xev tool to determine
which button numbers these are.
That is, I ran xev in a terminal,
hovered the mouse over the pop up window and on the mouse pushed the scroll
wheel up and down;
the output was as the following:
(...)
ButtonRelease event, serial 25, synthetic NO, window 0x2a00001,
    root 0x3b, subw 0x2a00002, time 550529, (22,49), root:(892,69),
    state 0x800, button 4, same_screen YES
(...)
ButtonPress event, serial 25, synthetic NO, window 0x2a00001,
    root 0x3b, subw 0x2a00002, time 551169, (22,49), root:(892,69),
    state 0x0, button 5, same_screen YES
(...)
I did the same to determine the values of the Back and Forward buttons:
(...)
ButtonRelease event, serial 25, synthetic NO, window 0x2a00001,
    root 0x3b, subw 0x2a00002, time 615813, (40,29), root:(910,49),
    state 0x200, button 6, same_screen YES
(...)
ButtonPress event, serial 25, synthetic NO, window 0x2a00001,
    root 0x3b, subw 0x2a00002, time 617300, (44,31), root:(914,51),
    state 0x0, button 7, same_screen YES
(...)

I then specified the order of the buttons (left, middle and right clicks, back, forward, wheel up & wheel down) in file /etc/X11/Xmodmap:
pointer = 1 2 3 6 7 4 5
It now works as expected :-)

Comments (3)

John:

Funnily enough I was just looking to fix the same problem- Logitech MX510 under linux.

I've edited my xorg.conf file no problem, but I'm unsure about Xmodmap- I'm pretty sure the Xmodmap files I've located are explicitly related to keyboard behaviour, not mouse (e.g. Xmodmap.gb-105). I presume the file to be edited will be specifically related to the mouse? In Ubuntu there seems to be a whole host of xmodmap files in the usr/share/xmodmap folder, which I presume is where I should be looking.

Any help would be excellent, thanks!

Didier Laurent:

Hi John,

I'm not using Ubuntu, and can't answer it myself.
I found however this site that may help you:

https://help.ubuntu.com/community/IntellimouseMousemanBackForwardButtons

Hope this helps,

Didier.

John:

Thanks so much for that, I really should have specifically searched the Ubuntu community pages first instead of hitting google.
The process is fairly similar for Ubuntu of course, but slightly different.

Thanks again!
John

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About This Entry

This page contains a single entry from the blog posted on February 13, 2007 1:26 PM.

The previous post in this blog was NoSuchMethodError - AdfFacesContextFactory.createContext.

The next post in this blog is Multiple Checkbox Selection in UIX Fails with JavaScript Error in Internet Explorer.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type and Oracle