This guide works well for the MX610 Mouse - if you own another mouse, I suggest you find a howto for that exact mouse.
Preface
Well, everything except horizontal scrolling works - I have done some research and attempted to get horizontal scrolling to work with no luck so for. This is as quick and easy as I could manage.
If you are just looking for back/forward buttons in firefox, I wrote this guide. Also check out this howto, which has info about cruise control, as well as a different approach for evdev.
This guide uses the evdev driver, which should work for any usb-attached mouse.
There is a section at the end of this guide specifically for getting MX610 email and IM indicator lights working.
This has been tested with Kubuntu 6.10 Edgy and a logitech mx610 mouse. The mx600 and mx700 mice don't work well under this setup.
I realize there are other similar guides on this forum. I am trying to improve upon them, with a focus on simplicity and clarity for new linux/ubuntu users.
This guide is based on Dankoozy's blog post, with several changes.
The Quick & Easy Guide
1. Backup your xorg.conf file
Code:
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.good #(think: Copy Source Destination)
now you have a good version (xorg.conf.good) of the file to fall back on if something goes wrong. If, after rebooting, you wind up at a text prompt, type in your username and pass. Then type:
Write this down!
Code:
sudo cp /etc/X11/xorg.conf.good /etc/X11/xorg.conf
startx # this command will load Xorg (the GUI)
2. Equipment Check
We need three packages, which we can get with the following console command all at once (these might require universe or multiverse to be enabled in your package manager):
Code:
sudo apt-get install xvkbd xbindkeys xserver-xorg-input-evdev
xserver-xorg-input-evdev is the generic usb driver we will be using for the mouse.
xvkbd will allow mouse button presses to simulate keyboard buttons, such as Alt + Left/Right for forwards/backwards.
xbindkeys is a program that will run in the background and map the mouse buttons to the actions we will set. Optionally, get the xbindkeys-config package - this is a GUI for editing the xbindkeys bindings text file, but this guide will simply edit the text file manually.
3. Create Two Text Files
a. create a new rule file for udev with the following command:
Code:
sudo gedit /etc/udev/rules.d/19-local.rules
(replace gedit with kate in kubuntu)
in this text file, paste the following:
Code:
KERNEL=="hiddev*", NAME="%k", MODE="666"
KERNEL=="event*", SYSFS{../name}=="Logitech USB Receiver", NAME="input/mx610"
The bold mx610 part can be replaced with whatever you want - just make a note of what you have written here, because it must correspond to what you will write in the xorg.conf file.
b. now create the xbindkeys bind file:
Code:
gedit ~/.xbindkeysrc
and paste the following: ( go to the xbindkeys site for more info and example configuration files)
People with other mice and some expertise - please add your bind files.
Code:
# Backward and Forward buttons
"xvkbd -xsendevent -text "\[Alt_L]\[Left]""
m:0x0 + b:8
"xvkbd -xsendevent -text "\[Alt_L]\[Right]""
m:0x0 + b:9
#Email Button - put in a console command to launch your mail app, such as thunderbird or kmail
"firefox -new-tab http://mail.google.com/mail/"
m:0x0 + c:236
XF86Mail
# sad note - the IM button is not a real button - as far as I can tell
# Volume +
"amixer set PCM 1+"
m:0x0 + c:176
# Volume -
"amixer set PCM 1-"
m:0x0 + c:174
# Mute
"amixer set PCM toggle"
m:0x0 + c:160
4. Autostart xbindkeys
Next, we need to add the xbindkeys process to the autostart.
In Ubuntu:
System > Preferences > Sessions
select the Startup Programs tab
Add: /usr/bin/xbindkeys
In Kubuntu:
Code:
kate ~/.kde/Autostart/start-xbindkeys
Insert this into the file:
Code:
#!/bin/sh xbindkeys
Make it executable:
Code:
chmod +x ~/.kde/Autostart/start-xbindkeys
5. Edit The xorg.conf File
Open up your xorg.conf file in a text editor:
Code:
sudo gedit /etc/X11/xorg.conf
find the Module Section and add the evdev module:
Code:
Section "Module"
Load "i2c"
Load "bitmap"
....
....
load "evdev"
EndSection
Next, change the InputDevice section for the mouse to this:
Code:
Section "InputDevice"
Identifier "Configured Mouse"
Driver "evdev"
Option "Device" "/dev/input/mx610"
EndSection
Make sure that the bold mx610 name part corresponds to the name part in the file 19-local.rules that we made before.
Make sure the Identifier name, Configured Mouse, is the same as in the ServerLayout section:
Code:
Section "ServerLayout"
...
InputDevice "Configured Mouse"
...
EndSection
6. Save and Reboot
save the xorg.conf file, and the other two text files previously created. Then Restart the computer. Remember: if the xorg.conf file is not edited properly (ie typos) you will need to revert to the backup as explained above.
An alternate backup strategy for xorg.conf is to comment out old stuff by adding # to the start of an old line. Then to edit xorg.conf and check for mistakes, you can say "sudo nano etc/X11/xorg.conf" right there before loading Xorg.
Optional: Indicator lights with the mx610hack
Get the mx610hack here
Then extract it.
Delete the debcomp link file, and replace it with this file
Open up a console window, change to the directory where you extracted the files.
Compile the mx610 hack:
Code:
./configure
make
sudo make install
Now you should be able to control the lights! In the console, try "mx610hack --usage" and "mx610hack --help". For example:
Code:
mx610hack --email-on /dev/hiddev0
mx610hack --email-off /dev/hiddev0
I use an email notifier called checkgmail, which can execute a command when there is mail, and another command when there is no new mail. This is very cool, because the blue email LED stays on as long as I have new mail, so I don't have to have the monitor on. I also use Kopete, and I have setup my IM light to pulse when I get an IM, and then it turns off, with this one command in the Notifications:
Code:
mx610hack -i /dev/hiddev0 && sleep 1.5 && mx610hack -O /dev/hiddev0
You can use the same idea for your mail application if there is only one command you can execute on a new mail event. The sleep value is how long the light will stay on before the second part of the command is executed to turn it back off.
Bookmarks