Installation
Kernel
First, confirm required support on your kernel source configuration file.
Open /lib/modules/your-kernel-version/build/.config and check for this lines:
Kernel 2.6
CONFIG_INPUT=y
CONFIG_INPUT_MOUSEDEV=y
CONFIG_INPUT_EVDEV=m
CONFIG_USB=m
CONFIG_USB_UHCI_HCD=m
Kernel 2.4
CONFIG_INPUT=m
CONFIG_INPUT_KEYBDEV=m
CONFIG_INPUT_MOUSEDEV=m
CONFIG_INPUT_EVDEV=m
CONFIG_USB=m
CONFIG_USB_UHCI=m
Notes:
- All this support can be compiled kernel builtin if you preffer.
- If your USB controller uses another host controller interface, replace CONFIG_USB_UHCI by the correct one.
If this lines are not present, add them.
Now, make sure CONFIG_USB_MOUSE and CONFIG_USB_HID
ARE NOT kernel builtin (=y).
If you made any kind of change to the kernel configuration file, you should recompile (
Kernel-HOWTO).
When all the required support is compiled, you can proceed.
Compilation
Get lmpcm_usb
source tarball and uncompress it:
# tar zxf lmpcm_usb-0.5.8.tar.gz
Now, change to the created directory, compile and install the driver:
# cd lmpcm_usb-0.5.8
# make
# make install
Installation script installed lmpcm_usb.ko (lmpcm_usb.o for kernel 2.4) into /lib/modules/your-kernel-version/misc/ and added an entry to modules.dep file, using depmod.
Loading modules
Edit /lib/modules/your-kernel-version/misc/modules.dep and remove usbmouse and hid entries. This is required because these modules "steal" any kind of mouse, so we have to load lmpcm_usb first. If usbmouse and/or hid are required for any other device, just load them after lmpcm_usb. But don't forget, lmpcm_usb
SHOULD LOAD FIRST that any generic mouse driver.
Loading support:
Kernel 2.6
# modprobe usbcore
# modprobe uhci-hcd
# modprobe evdev
Kernel 2.4
# modprobe usbcore
# modprobe usb-uhci
# modprobe input
# modprobe mousedev
# modprobe keybdev
# modprobe evdev
Notes:
- If your USB controller uses another host controller interface, replace uhci-hcd (or usb-uhci) by the correct one.
- This lines should be added to your rc modules script to provide usb mouse support before applications start.
Ensure usbmouse and hid are not loaded:
Kernel 2.6
# rmmod usbmouse
# rmmod usbhid
Kernel 2.4
# rmmod usbmouse
# rmmod hid
Load lmpcm_usb module:
# modprobe lmpcm_usb
At this time, your mouse should work.
Testing
To check if your mouse was successfully detected, perform these commands:
# dmesg | grep '^lmpcm.* usb'
You should get something like this:
lmpcm_usb.c: Logitech MediaPlay Mouse on usb1:4.0 [Logitech USB Receiver]: input0
If you got nothing, that's because your mouse was not detected by lmpcm_usb kernel module. Maybe you have no USB support or HID is loaded and "stealing" mouse device.
Check your multimedia buttons by running:
# hexdump < /dev/input/eventX
(where X is the mouse event device number)
Press and release play/pause button, the result should be similar to:
0000000 d0c8 4287 1e3b 000e 0001 00a4 0001 0000
0000010 d0c9 4287 6c1a 0001 0001 00a4 0000 0000
Configuring X server
Edit the X server configuration file (/etc/X11/XF86Config for XFree86 or /etc/X11/xorg.conf for X.org) and change it to match this configuration:
...
Section "InputDevice"
...
Option "XkbModel" "pc105"
EndSection
Section "InputDevice"
Identifier "LMPCM"
Driver "mouse"
Option "Protocol" "ExplorerPS/2"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "6 7"
Option "Buttons" "7"
EndSection
Section "ServerLayout"
...
InputDevice "LMPCM" "CorePointer"
EndSection
Notes:
- If you preffer to add Logitech MediaPlay Mouse as a secondary pointer device (example: for laptop computers), just replace "CorePointer" with "AlwaysCore".
- Dont's forget to restart the X server after changing configuration file.
Download
Xmodmap-2.6 (or
Xmodmap-2.4 for kernel 2.4), move to your home directory, set LMPCM as main pointer device (if you have more than one) and load it:
Kernel 2.6
$ mv Xmodmap-2.6 $HOME/.Xmodmap
$ xsetpointer LMPCM
$ xmodmap $HOME/.Xmodmap
Kernel 2.4
$ mv Xmodmap-2.4 $HOME/.Xmodmap
$ xsetpointer LMPCM
$ xmodmap $HOME/.Xmodmap
Configuring applications
Gnome
Gnome have a simple and quick interface to configure shortcut keys, but unfortunately it just supports a few number of operations.
Assuming you have Gnome-2.10, on your higher panel, click on "Desktop" menu, choose "Preferences" and "Keyboard Shortcuts".
Choose an event from event list and press the button you preffer.
Done :)
Kde
I think KDE have an almost perfect shortcut management system. It's very simple to configure shortcut keys on any application and operation. Anyway, the only thing I couldn't get working here was the Left blue Back/Forward browser buttons.
Assuming you have Kde-3.4, on your bottom menu, click on Konqueror web browser icon.
Type "settings:/Accessibility/" on the location bar.
Click on "Keyboard Shortcuts" icon, this will show you a very complete shortcut management interface. Choose an action, click on the button-like image, press the button you want to assign and click "Ok".
Done :)