It should be noted that the setup for mutlibutton mouse has to be done differently in AMD64. this is because xmodmap on AMD64 for some reason makes it so your system no longer sees the extra buttons (this may have changed in recent updates of Xorg... it was a while since i had to mess with this).
at the time i already had a partition set up for a 32bit Gentoo environment. so what i did was instead of using the native 64bit xmodmap, i used the one on the other Gentoo partition. i.e.,
Code: Select all
mnt/g32/usr/X11R6/bin/xmodmap -e "pointer = 1 2 3 6 7 4 5"
of course, "g32" is the name of the mount point where the 32 bit Gentoo env can be found... substitute as appropriate for your system. if you have the 32bit compatibility setup on your system, this should work without problem. you can test it by opening the Terminal in X and running "xev"
this allows you to see what the system "sees" every time you type or use your mouse.
if you want to stick to the default functionality for your mouse, you do not need imwheel. however, i prefer a customized setup where the extra buttons are set to "copy" and "paste", and this setup is the same regardless of the app i'm using. instead, i use xbindkeys and xvkbd.
unfortunately, imwheel, xbindkeys, and xvkbd are all masked in portage from AMD64. so i chrooted into my 32bit env and emerged xbindkeys and xvkbd there (i'm sure there is a viable way to do that locally in AMD64, but i'd just prefer to keep my local env from getting cluttered with crap as much as possible). then after you exit the chroot, you can start xbindkeys like so:
but note that it won't do you any good unless you have a file in your home folder called ".xbindkeysrc".
Note that to have this all up and running every time you startx, make your .xinitrc look like this:
Code: Select all
mnt/g32/usr/X11R6/bin/xmodmap -e "pointer = 1 2 3 6 7 4 5" &
mnt/g32/usr/bin/xbindkeys &
exec startkde
if you are left handed like me

change pointer to "pointer = 3 2 1 6 7 4 5"
[note: of course if you don't use KDE, switch "startkde" with whatever's appropriate for your windows manager.]
Like i said, .xbindkeysrc has to be set up so we can switch out various buttons for functions. xbindkeys will use xvkbd for this purpose, but note that xvkbd will probably not work "out of the box." to get it to work, you need to copy a library over from the 32bit install over to the 64bit install.
Code: Select all
cp mnt/g32/usr/lib/libXaw3d.so.8 /usr/lib/libXaw3d.so.8
though, you should probably make sure you won't end up overwriting a copy of the same file, as it might be needed by something else could even be different under the AMD64 env. if this file already exists, try running xvkbd from the terminal:
if this returns with an error, then this won't work. unfortunately, i had nothing but bad luck with imwheel in AMD64, but you might be able to get that to work instead.
otherwise, if you enter the above and you get an interface for keyboard input (this is afterall, a virtual keboard daemon), then xvkbd works.
In order to reprogram the extra buttons using this setup, we need to add a few lines to .xbindkeysrc. this is what mine looks like:
Code: Select all
"/mnt/g32/usr/X11R6/bin/xvkbd -xsendevent -text "\Cx""
m:0x10 + b:2
"/mnt/g32/usr/X11R6/bin/xvkbd -xsendevent -text "\Cc""
m:0x10 + b:6
"/mnt/g32/usr/X11R6/bin/xvkbd -xsendevent -text "\Cv""
m:0x10 + b:7
by all means, change this setup to suit your purposes. consult the man pages for xvkbd and xbindkeys for how to use the syntax. note that b:6 and b:7 are the extra buttons, and b:2 is the wheel click button (i never used it for anything else anyways).
that should work. test it out, and hammer out any bugs along the way.