MX1000Mouse

Revision 21 as of 2006-01-22 15:37:43

Clear message

Enabling all of the functions on your Logitech MX1000 mouse

This guide will guide you through the process of enabling all 12 buttons on your logitech mx1000 mouse, including the side buttons, side scroll and cruise control (aka auto vertical scroll) functionality.

Install the necessary packages

In a terminal (you will need the [wiki:AddingRepositoriesHowto universe repository enabled]):

Rendering of reStructured text is not possible, please install Docutils.
.. image:: IconsPage/IconGNOMETerminal.png
   :align: left
  •  sudo apt-get install xvkbd xbindkeys xmacro

Set up evdev

attachment:IconsPage/IconNote.png Make sure your mouse is connected to a usb port, not the PS/2 port.

Get some info

  • Now we need to get some information about the mouse. In a terminal:
    Rendering of reStructured text is not possible, please install Docutils.
    .. image:: IconsPage/IconGNOMETerminal.png
       :align: left
    •   cat /proc/bus/input/devices
    In my case the output was,
      jason@luso:~$ cat /proc/bus/input/devices
      I: Bus=0011 Vendor=0001 Product=0001 Version=ab41
      N: Name="AT Translated Set 2 keyboard"
      P: Phys=isa0060/serio0/input0
      H: Handlers=kbd event0
      B: EV=120013
      B: KEY=1 80000004 2000000 3002078 f840d001 f2ffffdf ffefffff ffffffff fffffffe
      B: MSC=10
      B: LED=7
     
     *I: Bus=0003 Vendor=046d Product=c50e Version=2500
     *N: Name="Logitech USB Receiver"
     *P: Phys=usb-0000:00:1d.0-1/input0
     *H: Handlers=mouse0 event1 ts0
     *B: EV=7
     *B: KEY=ffff0000 0 0 0 0 0 0 0 0
     *B: REL=143
     
      I: Bus=0010 Vendor=001f Product=0001 Version=0100
      N: Name="PC Speaker"
      P: Phys=isa0061/input0
      H: Handlers=kbd event2
      B: EV=40001
      B: SND=6
     
      jason@luso:~$

    attachment:IconsPage/IconHint2.png We're interested in the section concerning the mouse (which is marked above by *'s). Specifically, we want three pieces of information: Name, Phys, and Handlers.

    attachment:IconsPage/IconWarning3.png You're information may be different than mine so do not assume that you can just use the values displayed above.

Edit xorg.conf

  • Now we need to actually use this information and edit xorg.conf. Let's make a backup and then open it up for editing. In a terminal:
    Rendering of reStructured text is not possible, please install Docutils.
    .. image:: IconsPage/IconGNOMETerminal.png
       :align: left
    •   sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
        sudo gedit /etc/X11/xorg.conf
  • Find the section that looks like:
     Section "InputDevice"
            Identifier      "Configured Mouse"
     ...
     EndSection
    Go ahead and delete this section (don't worry we made the backup in case anything goes wrong) and replace it with the following template:
     Section "InputDevice"
            Identifier      "Configured Mouse"
            Driver          "mouse"
            Option          "CorePointer"
            Option          "Protocol"              "evdev"
            Option          "Dev Name"              "Logitech USB Receiver"
            Option          "Dev Phys"              
            Option          "Device"                
            Option          "Buttons"               "12"
            Option          "ZAxisMapping"          "4 5 7 6"
     EndSection
  • Now look at the information you gathered above with the cat /proc/bus/input/devices command. If Name was the same as "Logitech USB Receiver", then you can leave the "Dev Name" line alone since it is the same as the template. If it is different, then change "Logitech USB Receiver" appropriately.

  • Look at the Phys section of the information. In the "Dev Phys" line in your xorg.conf file add the appropriate option. In my case I got Phys=usb-0000:00:1d.0-1/input0 and so I would add "usb-*/input0" (see below for a completed template). What matters here is the input[NUMBER] part, we can use a wildcard for the 0000:00:1d.0-1 part.

  • The last piece of information we are going to use is Handlers. In my case, Handlers was "mouse0 event1 ts0". We only care about the event[NUMBER] part. In my case I would add "/dev/input/event1" to the "Device" line. If your Handlers had event0 in it, then you would add "/dev/input/event0", etc.

    attachment:IconsPage/IconExample48.png The finished product should look similar to:

     Section "InputDevice"
            Identifier      "Configured Mouse"
            Driver          "mouse"
            Option          "CorePointer"
            Option          "Protocol"              "evdev"
            Option          "Dev Name"              "Logitech USB Receiver"
            Option          "Dev Phys"              "usb-*/input0"
            Option          "Device"                "/dev/input/event1"
            Option          "Buttons"               "12"
            Option          "ZAxisMapping"          "4 5 7 6"
     EndSection
  • Save your changes and exit.
  • Restart X by pressing ctrl+alt+backspace (make sure you save anything you are working on).

    attachment:IconsPage/IconWarning3.png If X refuses to start, it means you probably made a typo. To fix this, just restore the backup copy of xorg.conf: sudo rm /etc/X11/xorg.conf; sudo cp /etc/X11/xorg.conf.backup /etc/X11/xorg.conf. Then start X again and check your xorg.conf for errors.

Set up Firefox

  • Now let's tell firefox we want it to use sidescroll.
    • Enter about:config in your address bar in firefox and press enter.

    • Change the value of mousewheel.horizscroll.withnokey.action to 0.

    • Change mousewheel.horizscroll.withnokey.sysnumlines to true

      attachment:IconsPage/IconHint2.png Alternatively, you may leave this setting as false and use mousewheel.horizscroll.withnokey.numlines to specify a custom number.

    attachment:IconsPage/IconNote.png At this point your mouse should have side scroll and cruise control working. Go ahead and try it in firefox if you'd like. However, the side buttons won't go back and forward in your history and the cruise control will highlight text as it scrolls vertically. We are going to take care of those problems now.

Set up xbindkeys

  • In a terminal:
    Rendering of reStructured text is not possible, please install Docutils.
    .. image:: IconsPage/IconGNOMETerminal.png
       :align: left
    •   gedit ~/.xbindkeysrc
  • Paste the following into your new file:
     "/usr/X11R6/bin/xvkbd -xsendevent -text "\[Alt_L]\[Left]""
       b:8
     "/usr/X11R6/bin/xvkbd -xsendevent -text "\[Alt_L]\[Right]""
       b:9
     "echo ButtonPress 4 ButtonRelease 4 | xmacroplay -d 0 :0.0"
       b:11
     "echo ButtonPress 5 ButtonRelease 5 | xmacroplay -d 0 :0.0"
       b:12
  • Save your changes and exit.
  • Add xbindkeys to your startup programs in the System -> Preferences -> Sessions -> Startup Programs

    attachment:IconsPage/IconHint2.png So that you don't have to reboot, you can just run xbindkeys & in a terminal.


Final Remarks

Try out all of the buttons on your mouse now. The side buttons should let you go back and forward in your history. And the side scroll and cruise control should be working perfectly. I haven't found a good use for that third side button but you can setup a bind for it with xbindkeys (it should be "b:10").

I tried to omit any details or explanations I didn't think we're necessary to try to keep the size of this howto to a minimum but feel free to ask questions and post comments on the forums in the folowing thread: http://ubuntuforums.org/showthread.php?t=97936.

I should note that most of the evdev setup was ripped from [http://ubuntuforums.org/showthread.php?t=65471 A complete guide to a Logitech mouse] by endy on the forums.


CategoryDocumentation CategoryCleanup