My new mouse, the Logitech G5 refresh (edit: the one with 2 thumb buttons), works really nice under Linux. The only minor issue I had was that the direction of the horizontal scrolling was swapped. I solved this with the following code in my xorg.conf (xorg-server-, xf86-input-evdev-1.1.5-r2 as Gentoo packages, the appropriate evdev kernel modules have to be loaded):
Section "InputDevice"
Identifier "Mouse0"
Driver "evdev"
Option "CorePointer"
Option "Name" "Logitech USB Gaming Mouse"
Option "HWHEELRelativeAxisButtons" "7 6"

No further setup is needed, all buttons and scroll wheel direction work out of the box; especially no xmodmap is needed. The dpi setting buttons work too. However, at the moment, one can only set the mouse to 400, 800 or 2000dpi. A customization will hopefully be possible when lomoco supports the G5.

Using the settings above let you scroll horizontally eg in konqueror or OpenOffice. Firefox sets it to “go back/forward one page” by default. To scroll, set mousewheel.horizscroll.withnokey.action and mousewheel.horizscroll.withnokey.numlines (edited, thanks to Deth for pointing out a mistake) to 1 in the about:config dialogue. The default behaviour is reached with ALT+wheel.

Although xev prints the thumb buttons’ pressing correctly, there isn’t any function yet AFAICS. Unfortunatly (for me) KDE cannot assign actions to mouse buttons. This is possible with xbindkeys, which is configured via .xbindkeysrc. Here is mine (edit: which sets actions for both thumb buttons):
"xvkbd -text "\[F13]""
"xvkbd -text "\[Control]\[Prior]""
"xvkbd -text "\[Control]\[Next]""
Control + b:9

xbindkeys, however, cannot assign simple key combinations but only shell commands so — you guessed it — another tool is needed: xvkbd. Now button 8 simulates a F13 which is not on my keyboard but can be assigned by KDE and button 9 gives a CTRL+PageUp, which cycles through the tabs in firefox; CTRL+Button9 does the obvious thing. I guess I’m happy now but, nonetheless, I hope KDE 4 makes the use of extra mouse buttons a bit easier.