It’s been a LOONG time since I’ve posted eh?
Well I finally solved my issues I’ve been having with revoco in the later version of Ubuntu. For those of you who don’t know, when you buy a Logitech MX Revolution mouse (or its ilk), the middle button can alternatively work in “click-to-click” mode (where you feel “clicking” when you spin the wheel) or “free spin” mode where the wheel spins free of resistance. By default the mouse maps the middle click to alternate in between these modes (by default I mean every time it loses connection with the PC, e.g. in the event of a shut down). This has the unfortunate habit of also laying the smack down on a normal middle button event (like middle clicking a link in Firefox to open it up in a new tab) sent to the PC (plus I hate free spin).
For a while btnx solved my problems as it had the ability to send revoco signals to supported mice, but recent changes in Xorg have rendered this useless.
However an enterprising individual named Edgar Toernig wrote a command line utility called revoco that lets you set the modes.
So to get the mouse to always work in click-to-click mode (as you would expect it) you would first need to get a copy of revoco from here. Alternatively, if the site goes down you can download revoco version 0.5 from me.
Next you’ll need to compile it (just run make in the extracted directory).
Once it’s all compiled, I like to use sudo to move the file to /usr/local/bin/.
Next I create an init.d script to set the mouse to click-to-click on boot. Save the following to the text file /etc/init.d/revoco:
#!/bin/bash
/usr/local/bin/revoco click
Finally run a chmod +x /etc/init.d/revoco to allow the code to execute.
All this is well and good but you’ll notice that on a resume from hibernate/sleep, your mouse will be back to its old shenanigans. To fix this we want to create a script in /etc/pm/sleep.d/. So in this folder lets edit a text file 10revoco:
#!/bin/bash
case "$1" in
hibernate|suspend)
/usr/local/bin/revoco click
;;
thaw|resume)
/usr/local/bin/revoco click
;;
*) exit $NA
;;
esac
Again lets run a chmod +x /etc/pm/sleep.d/10revoco to allow us to execute
Now if you give it a try, you’ll notice that even on wakeup/resume from hibernation/suspend your mouse will stay in click to click mode!