Change Logitech Mouse Buttons in Ubuntu
Dependencies
We'll need to install xbindtools and xev prior to configuring our mouse buttons:
sudo apt-get install xev xbindtoolsExplore Button Numbers
First, find out what button number you are trying to set using 'xev'
This can be run from the command line simply by typing 'xev' - the tool will popup in a separate window. Mouse over this window in order to test the keys and watch the command line output to find the button number.
Make an Xbindtools Config File
Then write a config file to handle the key you want to change. For example, on my Performance MX, I wanted to set the "zoom" button to "back":
cat << EOF >> ~/.xbindkeysrc
"xdotool key Alt_L+Left"
m:0x0 + b:13
EOFTest the Custom Button Mapping
Next, reload xbindkeys in order to activate your changes:
xbindkeys -pShell Script
If you have a wireless mouse you can run this configuration elsewhere with the following file:
#!/bin/bash
sudo apt-get install xbindkeys
cat << EOF >> ~/.xbindkeysrc
"xdotool key Alt_L+Left"
m:0x0 + b:13
EOF
xbindkeys -pSource
Much of this was cribbed from the following answer on AskUbuntu: http://askubuntu.com/a/101126