Site menu:

Sponsored by

Bitcube Ltd.  Expert Linux Consultancy

Categories

Meta

Site search

 

February 2010
M T W T F S S
« Jan   Mar »
1234567
891011121314
15161718192021
22232425262728

Archives

Links:

udev rules for Logitech G7 mouse

Recently, X.Org has been removing HAL from the requirement list. This is good except that it means reconfiguring things. Again.

I have a Logitech G7 mouse and it has a side button which defaults to “back”. I like it remapped to “middle button” (which pastes text in Unix). I used to use a ButtonMapping in xorg.conf but a while ago that stopped working and thanks to [http://groups.google.com/group/linux.gentoo.user/browse_thread/thread/21cb91a23646fc9f?pli=1 this post] I edited /etc/hal/fdi/policy/preferences.fdi and normally returned.

After this most recent breakage I found that I could fix things by running:
“xinput set-button-map 8 1 8 3 4 5 6 7 2″

This was hardly satisfactory. So a bit of google, quite a lot of cursing (such as “how on Earth are you supposed to figure this stuff out”), I’ve combined the previous post and [http://sidux.com/PNphpBB2-viewtopic-t-19491.html this post](broken link) about udev and X. My /etc/udev/rules.d/z00_local.rules now contains this:

# I want my mouse buttons working
ACTION!="add|change", GOTO="local_end"
ENV{ID_INPUT_MOUSE}=="?*",ENV{x11_options.ZAxisMapping}="4 5 6 7"
ENV{ID_INPUT_MOUSE}=="?*",ENV{x11_options.ButtonMapping}="1 8 3 4 5 6 7 2"
LABEL="local_end"

I’m now happy again. Until the next breakage.

Comments

Comment from Joel
Time: Monday 17 May, 2010, 17:52

Nice post, but the last link you give (to sidux.com) is broken..

Comment from adrian
Time: Monday 17 May, 2010, 19:55

Thanks Joel, I can’t find the appropriate post (just did a quick search) , hopefully the code above should be enough to get it working for you though.

Comment from Adrian Bridgett
Time: Sunday 7 August, 2011, 13:45

Well this has been broken for quite some time. I’ve finally sat down and pieced together the magic foo required to fix it now. You appear to be able to remove the udev rules (and hal has gone these days).

In /etc/X11/xorg.conf:

Section “InputClass”
Identifier “evdev mouse”
MatchProduct “Logitech USB Receiver”
MatchIsPointer “true”
Option “ButtonMapping” “1 8 3 4 5 6 7 2″
EndSection

Write a comment