MX1000Mouse

Differences between revisions 19 and 21 (spanning 2 versions)
Revision 19 as of 2006-01-21 15:25:41
Size: 6969
Editor: dhcp0534
Comment: typo
Revision 21 as of 2006-01-22 15:37:43
Size: 7481
Editor: dhcp0534
Comment: used the wrong icon :P
Deletions are marked like this. Additions are marked like this.
Line 10: Line 10:
sudo apt-get install xvkbd xbindkeys xmacro #!rst
.. image:: IconsPage/IconGNOMETerminal.png
   :align: left
Line 12: Line 14:
 {{{
 sudo apt-get install xvkbd xbindkeys xmacro
 }}}

Line 14: Line 21:
 * Make sure your mouse is connected to a '''usb''' port, not the PS/2 port. attachment:IconsPage/IconNote.png Make sure your mouse is connected to a '''usb''' port, not the PS/2 port.
Line 19: Line 26:
 cat /proc/bus/input/devices #!rst
.. image:: IconsPage/IconGNOMETerminal.png
   :align: left
Line 21: Line 30:
  {{{
  cat /proc/bus/input/devices
  }}}
Line 50: Line 62:
 We're interested in the section concerning the mouse (which is marked above by *'s). You're information may be different than mine so do not assume that you can just use the values displayed above.  Specifically, we want three pieces of information. Make sure you write these down somewhere: Name, Phys, and Handlers.  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.
Line 55: Line 69:
 sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
 sudo gedit /etc/X11/xorg.conf
#!rst
.. image:: IconsPage/IconGNOMETerminal.png
   :align: left
Line 58: Line 73:
  {{{
  sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
  sudo gedit /etc/X11/xorg.conf
  }}}
Line 79: Line 98:
 * Now look at the piece of paper where you wrote down the information from before. 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.
 * Still with that piece of paper in your hand, look at what your Phys was. 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 from your paper 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.
 * The finished product should look similar to:
 * 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:
Line 96: Line 116:
 * Great we are done with editing xorg.conf. Double check to make sure you didn't make any typos because X may refuse to start if you did (if that happens just restore the backup copy of xorg.conf and start over: {{{sudo rm /etc/X11/xorg.conf; sudo cp /etc/X11/xorg.conf.backup /etc/X11/xorg.conf}}}). If everything looks okay go ahead and save your changes and exit. Okay almost done, that was the hard part.
 * Restart X by pressing ctrl+alt+backspace (make sure you save anything you are working on).
 * 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 ==
Line 101: Line 125:
  * Change {{{mousewheel.horizscroll.withnokey.sysnumlines}}} to {{{true}}} (alternatively you can leave this setting as {{{false}}} and use {{{mousewheel.horizscroll.withnokey.numlines}}} to specify a custom number).
 * 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.
  * Change {{{mousewheel.horizscroll.withnokey.sysnumlines}}} to {{{true}}}
Line 104: Line 127:
== Setup xbindkeys ==   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 ==
Line 107: Line 134:
 gedit ~/.xbindkeysrc #!rst
.. image:: IconsPage/IconGNOMETerminal.png
   :align: left
Line 109: Line 138:
  {{{
  gedit ~/.xbindkeysrc
  }}}
Line 122: Line 154:
 *So that you don't have to reboot, you can just run {{{xbindkeys &}}} in a terminal.
attachment:IconsPage/IconHint2.png So that you don't have to reboot, you can just run {{{xbindkeys &}}} in a terminal.

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

MX1000Mouse (last edited 2008-08-06 16:26:52 by localhost)