Ubuntu – How to assign actions to all the mouse buttons

mouse

I have a mouse with lots of buttons, but it's not a mainstream make like Logitech. For Windows, I have a driver that lets me assign actions like close-window (Ctrl+W) or next-tab (Ctrl+Tab), but I don't have a Linux driver. Since Linux is so flexible, I thought perhaps there is a general way to do this, regardless of brand?

Update: Based on input from Cyrex, I installed and ran sudo apt-get install btnx which found several but not all mouse buttons.
Found: left, right, wheel, wheelclick, thumb fwd, thumb back.
Not found: wheel left, wheel right, thumb middle button.
Vendor ID is 0x04d9, Model ID is 0xa015.

Update 2: In System>Prefs>Mouse there's a lightbulb icon for testing double-click speed. Every working button can turn the bulb on&off, but the missing buttons can't. It would seem that Ubuntu isn't aware of these buttons and thus doesn't register their clicks. I guess I need to hunt for a driver, though a mainstream mouse is probably the easier way.

Best Answer

If all buttons are detected correctly then you can install btnx:

sudo apt-get install btnx OR sudo aptitude install btnx

Then go to: Applications -> System Tools -> Btnx

It has support for many types of mice