| « Do not turn on the xcb use flag if you plan on using =sun-jre-1.5* | Introducing myself » |
Getting MX Revolution setup in Gentoo
I recently bought a Logitech MX Revolution mouse. This is a very nice cordless laser mouse with plenty of buttons. See Gizmodo review for pictures. As usual I first googled to find what others have done to get everything working with this mouse. Of course the usual functionality was there without anything special. The first link Google gave me was
http://andy.hillhome.org/blog/2006/09/27/logitech-mx-revolution-in-linux/ Based on this information I set out to setup my new mouse. First I changed my xorg.conf to have the following:
Section "InputDevice"
Identifier "Mx Rev"
Driver "evdev"
Option "Protocol" "Auto"
Option "Name" "Logitech USB Receiver"
Option "Phys" "usb-*/input0
EndSection
This gives evdev control of my mouse and still keeps my other stuff working using the normal /dev/mice/input. This at least makes it possible to control this mouse specifically if I need to. The hotplug input framework should hopefully make this kind of stuff obsolete in the future.
Having evdev working and handling the mouse I got xev to recognize all my mouse buttons nicely. I have been using imwheel with my previous mouses and have found it an able tool to map mouse events to keyboard events. Here is my .imwheelrc:
"Firefox" None, Thumb1, Alt_L|Left None, Thumb2, Alt_L|Right None, Left, Control_L|W None, Right, Control_L|T "Thunderbird" None, Thumb1, N None, Thumb2, B "Konsole" None, Thumb1, Shift_L|Right None, Thumb2, Shift_L|Left
What this does:
- Makes back/forward work in Firefox with Thumb buttons
- Makes creating/deleting tabs work by tilting the scroll wheel
- Makes Thunderbird go to next unread message / previous message using Thumb buttons
- Makes Konsole change tabs using Thumb buttons
Using the same pattern you should be able to adjust the rest of the buttons to your liking. I will probably look into using the Thumb wheel to control beryl.
The last thing I didn't like about the default behavior of the MX in Linux was the scroll wheel. By default it is in the Free-spin mode which means that clicking the wheel does not generate Button2 events. I found a handy tool to control the features of this mouse in the comments of that blog post and I made an ebuild for it http://overlays.gentoo.org/svn/dev/betelgeuse/app-misc/revoco/. Using this tool I can just issue revoco manual=6 and after that I can use the One-Touch Search button to change the scrolling mode of the mouse. I don't know yet if this is good enough for the main tree as it atm must be run setuid because of default /dev/usb/hiddevN permissions. Will probably add it if I find the time to rewrite it using libhid.
The final touch to glue all this together is to have my .xprofile start the necessary programs for me:
revoco manual=6 #xmodmap -e "keycode 122 = XF86Search" /usr/bin/imwheel -k -b "007689"
Notice that you can use xmodmap to map the One-Touch search to XF86Search if you like. It's quite weird how the button is handled. To the OS it is shown as a keyboard with one button. Well engineers are creative.
Trackback address for this post
Trackback URL (right click and copy shortcut/link location)
24 comments
Just use that. There source file is included in svn.
@PirAh: you can get revoco at http://overlays.gentoo.org/svn/dev/betelgeuse/app-misc/revoco/files/revoco-0.2.c
Just download the file, gcc -Wall -O2 revoco-0.2.c -o revoco, chown root:root revoco, chmod 4755 revoco (the last two you must run as root) and it will work ;-)
I also get a MX Revolution for Christmas and the tool helped me. Unix/Linux without wheel-click is bad ;-)
And yes, *nix without wheel click is nasty :D
Thak you very much!
Thank you SOOOO much for that link! I did all of the stuff you have written here, but revoco returns this: "revoco: No Logitech MX-Revolution (046d:c51a) found." Rest assured I have one and it is plugged in! Any help is appreciated! Also, I'm not sure where to put the revoco file after gcc. I am running Ubuntu 6.10.
Thanks!!!
Did you run revoco as root? The place you put the binary doesnt change anything.
Do you have a /dev/usv/hiddevX, where X is some number between 1 and 16. If not, you need hiddev support in your kernel (and the proper rights to read and write to this device).
Just a thought, do you use udev? If not, you maybe need to create the char-devs by-hand (cannot tell you the device adress, my MX is somewhere outside this building ;).
Regards
Zhenech
Well after trying everything I could, I finally went to google and started searching for another download location and finally came upon this:
http://www.ibiblio.org/pub/Linux/Incoming/
Revoco 0.3 is located there (3 times). I downloaded it, and ran the gcc command on it as root. Gcc snagged on the spot where version is defined, but I cleared it up w/ some quotes (although the version does not display correctly because of this). In any case, the resulting program works like a charm! I'm opening new tabs like a champ now! I hope the link helps others. I am e-mailing Edgar to ask if I can host it so we will have yet another source for downloading it. Thanks!
Drew
http://overlays.gentoo.org/dev/betelgeuse/browser/app-misc/revoco/files/revoco-0.3.c
http://www.missingreality.com/revoco/
(thanks Petri!)
Don't spread the ibiblio link. The tar.gz file is broken and URL won't be valid for too long (it's the incoming directory).
About the compilation issue: just call make instead of calling gcc directly. The makefile passes the right version string to the compiler. (The backslashes in -DVERSION=\"0.3\" are required.)
With version 0.3 it's no longer necessary to invoke revoke each time you login. The settings are permanent.
Also, v0.3 looks in /dev and /dev/usb for the hiddev devices (it seems there's some disagreement on where these have to be located). And if it can't find an RX Revolution it gives some trouble-shooting advice.
Ciao, ET.
IMHO a pretty meager performance for such a pricy mouse - loses its main feature in less than two months ...
Ciao, ET.
Petteri, I didn't notice the link for the v0.3 source. I went straight to the link from Zhenech that took me to the v0.2 source, which didn't work...probably because of what ET said above about where it looks for hiddev devices.
In any case, I am at best a noob, and am much more educated on it now...and it works. Thanks for all the help!
Drew
bluetooth device.
Is MX Revolution capable of working through my own bluetooth
device rather then the wired usb bluetooth that it comes with?
Has anybody done any tests?
bluetooth adapter.
Logically it should work cause bluetooth is standart technology but you never know till you try it.
Before I spend my money on it just want to make sure it works directly. But still it's good news it works with gentoo.
Any chance you can make any tests with another bluetooth dongle?
cheers!
A few tips for using my MX Revolution:
1. I had to edit revoco-0.3.c and change:
#define MX_REVOLUTION to 0xc525 as my usb id is slightly different. (DrDrew: your problem? use `lsusb`)
2. The auto setting was a bit spastic by default - the solenoid was clicking on and off without even moving. This worked:
$ sudo revoco auto=10
(Froese - could this be your problem?)
3. setting the manual click change to button "6" (find button) gives me my middle click back *woot*
$ sudo revoco manual=6
and also gets rid of that annoying "search" keyevent which I have a keyboard for :)
4. ... But unfortunately, when I set the manual=6 option, the auto scroll feature turns off again :|
But that's a small price to pay! Thanks for finding and documenting this! Now I can show off to my friends :)
pointer = 1 9 3 4 5 7 6 8 2 10 11 12 13 14 15 16 17 18 19 20
This makes the "forward" thumb button a middle mouse button. I find this much easier to press than the wheel itself!
I just bought a MX 5500 Logitech kit, it has a MX Revolution mouse connected with bluetooth, but revoco doesn't seem to work for me, i run it as root, it returns no error but the mouse behaviour does not change, i run revoco manual=6 or manual=13 but the middle button still is the one in control over the scroll mode.
Any sugestions/tips would be appreciated :)
PS This blog does not let me post a comment with my gmail address, thanks!
I got so far as to download and extract. I went to the directory I extracted it in, and typed "make". Now I have 2 new files: revoco, and revoco.o
What do I do next to get this working. Please help.
At work, I have the previous version and it works great to change mode. But at home, I have the newer one, and it doesn't work. Unfortunately I'm not familiar enough with libusb to see immediately why it's failing. I do have several notes from a usbmon dump while using VirtualBox/XP to control the mouse, and have identified several features of both the keyboard and the mouse, in case anyone would like to take a stab at fixing revoco's support or writing an additional application for working with the keyboard. Feel free to contact me for the usbmon dump and notes.