Page 1 of 19 12311 ... LastLast
Results 1 to 10 of 185

Thread: HOWTO Configuring Logitech mice in Ubuntu 6.06 32 bit, based on endy's HOWTO

  1. #1
    Join Date
    Oct 2005
    Location
    California
    Beans
    572
    Distro
    Kubuntu 9.04 Jaunty Jackalope

    HOWTO Configuring Logitech mice in Ubuntu 6.06 32 bit, based on endy's HOWTO

    Please go to the new guide. Use this guide only if the new one fails no matter what you try.

    A complete guide to a Logitech mouse
    WARNING: Contains hacks, not for the faint of heart.

    This is endy's guide on how to get all the buttons working properly on a logitech mouse (modified by me for Ubuntu 6.06), how to use the "logitech_applet" to enable the higher resolutions and cruise control and how to get the side mouse buttons to make forwards and back work in Nautilus, Epiphany, Konqueror, etc.

    This works for my mx500, I assume it would work for the similar mx510 and mx518 and the wireless versions like the mx700 however, I haven't got all those mice so I'd appreciate it if anyone get them working to post a reply and I'll make a list of what works.


    Section 1: Getting your mouse working on USB with evdev

    First off you need to plug your mouse into a USB port, you can't do anything else in this how to until you do that.

    0.9 You need an older version of evdev, the current one is broken.

    In your terminal, type:

    Code:
    wget http://detyabozhye.com/other/xserver-xorg-input-evdev_1.0.0.5-0ubuntu2_i386.deb
    Code:
    sudo dpkg -i xserver-xorg-input-evdev_1.0.0.5-0ubuntu2_i386.deb
    To avoid it updating to the new version (broken), open Synaptic Package Manager. Find xserver-xorg-input-evdev, select it, go to Package->Lock Version. Close Synaptic. The tradeoff here is that if a working new version comes out, you won't know about it.

    1. Getting all the information you need

    Great, so we're all plugged in via USB and ready to go. Before we change anything we need to get some important information about the mouse so run the following command in your favourite terminal:

    Code:
    cat /proc/bus/input/devices
    You should get a list of details, here's what I get and I'll highlight the bit we need to concentrate on:

    Code:
    I: Bus=0010 Vendor=001f Product=0001 Version=0100
    N: Name="PC Speaker"
    P: Phys=isa0061/input0
    S: Sysfs=/class/input/input0
    H: Handlers=kbd event0
    B: EV=40001
    B: SND=6
    
    I: Bus=0003 Vendor=046d Product=c025 Version=1800
    N: Name="Logitech USB-PS/2 Optical Mouse"
    P: Phys=usb-0000:00:1d.1-1/input0
    S: Sysfs=/class/input/input1
    H: Handlers=mouse0 event1 ts0
    B: EV=7
    B: KEY=ff0000 0 0 0 0 0 0 0 0
    B: REL=103
    
    I: Bus=0003 Vendor=049f Product=000e Version=0100
    N: Name="Compaq Compaq Internet Keyboard"
    P: Phys=usb-0000:00:1d.1-2/input0
    S: Sysfs=/class/input/input2
    H: Handlers=kbd event2
    B: EV=120003
    B: KEY=10000 7 ff87207a c14057ff febeffdf ffefffff ffffffff fffffffe
    B: LED=7fff
    
    I: Bus=0003 Vendor=049f Product=000e Version=0100
    N: Name="Compaq Compaq Internet Keyboard"
    P: Phys=usb-0000:00:1d.1-2/input1
    S: Sysfs=/class/input/input3
    H: Handlers=kbd event3
    B: EV=3
    B: KEY=20000 87a 5000d000 1e0000 0 0 0
    Note: For mx700 users the mouse name is "Logitech USB Receiver"

    1.1 Adding a udev rule

    I've found that the event number for the mouse sometimes changes in 6.06, so we'll make a udev rule.

    Type this in your terminal:
    Code:
    sudo gedit /etc/udev/rules.d/19-local.rules
    and paste this into there and save it (replace the bold part with the name of your mouse and replace the underlined part with whatever you want to put there, it will be used in xorg.conf):

    Code:
    KERNEL=="event[0-9]*", SYSFS{../name}=="Logitech USB-PS/2 Optical Mouse", NAME="input/mx500"
    2. Editing the xorg.conf file

    Now we have the information we need to start to set up xorg. So open up your xorg.conf file in your favourite editor, mine is mousepad but as gedit is on everyone elses install by default you can type:
    Code:
    sudo gedit /etc/X11/xorg.conf
    Now scroll down to the mouse section and instead of deleting it we're going to comment it out, to do this you put a "#" in front of each line in the section, again here is my commented section as an example:

    Code:
    #Section "InputDevice"
    #    Identifier     "Configured Mouse"
    #    Driver         "mouse"
    #    Option         "CorePointer"
    #    Option         "Device" "/dev/input/mice"
    #    Option         "Buttons" "10"
    #    Option         "ButtonMapping"         "1 2 3 6 7"
    #    Option         "Protocol" "ExplorerPS/2"
    #    Option         "ZAxisMapping" "4 5"
    #    Option         "Resolution" "800"
    #EndSection
    Again, yours might look different, the important bit is to comment the whole section out, but only this section.

    Next up we want to paste in out new section, make a but of room underneath (or above if you prefer) that section we just commented out and paste in the following template:

    Code:
    Section "InputDevice"
    	Identifier	"Configured Mouse"
    	Driver		"evdev"
    	Option		"CorePointer"
    	Option		"Device"	"/dev/input/mx500" #this should be that underlined name from 19-local.rules
    EndSection
    Make sure you save the changes to your xorg file.

    3. Restart X

    Warning!
    Don't restart X yet! Just before we do I have to warn you if you made a mistake in the xorg file X will not restart. But don't worry that's why we only commented out the previous settings and didn't delete them. If X fails to restart then you will end up in a text console. Log in and type the following to edit the xorg file:

    Code:
    sudo nano /etc/X11/xorg.conf
    All you need to do is comment out the new section we just added by putting a "#" in front of each line and un-commenting the original section by deleting the "#" which is at the start of each line. Save the xorg file in nano by typing "CTRL + X" press "Y" to confirm the save and type "startx" to get back to your desktop and re-read section two carefully and correct your xorg file.


    Ok, I'm ready
    Now we're prepared, restart X by first logging out then pressing "CTRL + ALT + BACKSPACE" simultaneously and hopefully after a moment you can log back in.


    4. Editing the Xmodmap file The higher models, such as the MX1000, don't need this part. Thanks to adam.tropics for the heads up.

    Code:
    gedit ~/.Xmodmap
    and paste the following, overwriting any previous "pointer" line:
    Code:
    pointer = 1 3 2 4 5 8 9 6 7 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
    Now run xmodmap to apply these settings:
    Code:
    xmodmap ~/.Xmodmap
    If this is the first time you created a .Xmodmap file then next time you log into gnome it will ask you if you want to automatically load it, add the file and click Ok if this happens.

    Now all the buttons should work properly including the little up button above the scroll wheel. The side buttons should also make Firefox go forward and backward a page just like before but they will not work in Nautilus or Konqueror yet. Keep reading to see how to get that to work!

    Note: If you're mouse has more or less buttons then you'll need to figure out what button numbers are the two side buttons, you can do this with the utility "xev" which you run from the terminal, hover the mouse over the pop up box and hold it still and press the side buttons. You'll see some output part of which is a button number. The two button numbers for you mouse go last in the .Xmodmap file, look at mine as an example.
    Section 2: Side buttons and Nautilus, Epiphany, Konqueror, etc

    We can use "xvkbd" and "xbindkeys" to bind the side mouse buttons to "ALT + LEFT" and "ALT + RIGHT" so they work as forward and backwards in Nautilus.


    1. xvkbd and xbindkeys

    Lets install "xvkbd" and "xbindkeys":

    Code:
    sudo apt-get install xvkbd xbindkeys
    Next we need to create the configuration for them:

    Code:
    gedit ~/.xbindkeysrc
    Now paste the following (Note: With some updates in the Dapper flights, the bath to xvkbd changed, please update your .xbindkeysrc accordingly):

    Code:
    "/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[Left]""
      m:0x0 + b:6
    "/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[Right]""
      m:0x0 + b:7
    Please note, the "L" and "R" from the words "left" and "right" in the square brackets above should be capitalised, this seems like a bug in the forums here that they don't display properly.

    Make sure you keep the quote marks, save the file and run "xbindkeys" in the terminal. It runs as a daemon in the background. You should now be able to test if it works in Nautilus by using the side buttons it also works in Epiphany if you use it.

    Note: Same as before, if you have different mouse buttons use xev to find out what number they are and change the "b:6" and "b:7" in the above to the correct numbers.

    1.1 Fixing the cruise control buttons

    Note: Requires the package build-essential

    Install these three packages for "click" to compile:
    Code:
    libx11-dev
    x11proto-xext-dev
    libxtst-dev
    Download this file: http://bg.rifetech.com/click.tgz
    untar it to ~/click (or wherever you want, just remember the dir, you'll need it in the .xbindkeysrc)
    then compile it:

    Code:
    cd ~/click
    make
    Then add this to you .xbindkeysrc

    Code:
    "~/click/click 4"
      m:0x0 + b:11
    "~/click/click 5"
      m:0x0 + b:12
    2. Adding it to your session

    Now it's working open up the gnome sessions settings "System > Preferences > Sessions" click on the "Startup Programs" tab, click "Add" and enter "xbindkeys". This makes sure it's run each time you log in, you should probably test it by logging out and back in now. If you aren't running GNOME, you will need to do it another way, e.g. in XFCE, go to Xfce Menu -> Settings -> Autostarted Applications. (I haven't tried it, but that should be where to go in XFCE)
    Section 3: The logitech_applet


    First of all some people use a program called LMCtl instead. This section is for making sure your mouse is using the best resolution it can, making it more accurate which is pretty handy especially in games where that counts like Quake 3


    1. Getting everything we need

    There is no logitech_applet in Synaptic so I just download the source and use the program "checkinstall" to package it and install it, you'll also need the "build-essential" packages which can be quite large so bear this in mind and the "libusb-dev" library. Once this is done you can uninstall it if you want via Synaptic. Ok so lets download and install logitech_applet:

    Code:
    sudo apt-get install checkinstall build-essential libusb-dev
    wget http://detyabozhye.com/other/logitech_applet-0.4test1.tar.gz
    tar xvfz logitech_applet-0.4test1.tar.gz
    mv ./logitech_applet-0.4test1 ./logitech-applet-0.4test1
    cd ./logitech-applet-0.4test1
    ./configure --prefix=/usr
    make
    sudo checkinstall
    Just hit enter when checkinstall prompts you. Now it should be installed


    2. Working logitech_applet

    I use the command "logitech_applet -s 800 -e" which you can run now:

    Code:
    sudo logitech_applet -s 800 -e
    This sets the mouse resolution to it's maximum 800cpi and makes sure the "cruise control" is enabled, you'll probably have to adjust the mouse settings in gnome as it should be much more accurate now. Type "logitech_applet --help" for more information.


    3. Load on boot

    We need to add this to a start up script so it's done automatically when the machine boots up, to do this I make a file in /etc/init.d/local where I keep local settings, so lets make that now:

    Code:
    sudo gedit /etc/init.d/local
    Now paste the logitech_applet command, mine like the example above is:

    Code:
    echo "Setting up Logitech mouse..."
    logitech_applet -s 800 -e
    I have the echo line so I can check if it works in the boot messages, it's nice but you don't need it.

    To make it executable run the following command:
    Code:
    sudo chmod 755 /etc/init.d/local
    Now run the following command to make the "local" script run when the system boots:
    Code:
    sudo update-rc.d local defaults
    Now the applet loads automatically on boot, huzzah!
    Conclusion

    I think that's everything, phew, this was longer than I expected. I hope it works for you and I haven't made too many mistakes. Please add any corrections and success stories for logitech mice other then the mx510 so we can find out what works.

    Thanks to endy's howto, and http://floam.sh.nu/guides/mx1000
    Please tell me if you have any problems or if I made any errors.

    Edit: Fixed the udev rule code, thanks Rizado and khedron.
    Edit: Fixed the path to xvkbd, thanks to XomboX
    Edit: Added two packages that need to be installed for click to be compiled.
    Edit: Added another package that needs to be installed for click to be compiled.
    Edit: Changed the URL for the logitech_applet, the one on freshmeat seems to be down, so I put it on my site.
    Edit: Added the requirement for build-essential for compiling click.
    Last edited by detyabozhye; July 21st, 2006 at 06:49 PM.
    aka anime4christ (I'm a guy, btw.)
    My personal boring website ^_^
    Jesus has changed your life. Save changes? (Y/N)

  2. #2
    Join Date
    Sep 2005
    Beans
    124

    Re: HOWTO Configuring Logitech mice in Ubuntu 6.06 32 bit, based on endy's HOWTO

    Somehow the binds to alt+left and alt+right are causing my side buttons to stop being recognized. so they won't work with neither mozilla or nautilus

    in xev the buttons are not displayed when pressed to.

    what could be the cause of this?

    EDIT: Solved... it's stupid really, I forgot to make the L and the R capitalised for Left and Right. My bad.

    Thanks for setting up a 6.06 guide
    Last edited by Cenotaph; June 4th, 2006 at 05:03 PM.

  3. #3
    Join Date
    May 2006
    Beans
    225
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: HOWTO Configuring Logitech mice in Ubuntu 6.06 32 bit, based on endy's HOWTO

    Odd, I followed your steps and restarted X, but when it comes back I just see an Nvidia splash screen and it hangs there.

  4. #4
    Join Date
    Sep 2005
    Location
    Confusion
    Beans
    30
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: HOWTO Configuring Logitech mice in Ubuntu 6.06 32 bit, based on endy's HOWTO

    I hit the same problem as Enigmatic. Here are the last few lines of my xorg log from the failed attempt:

    Code:
    (**) Configured Mouse: Device: "/dev/input/mx510"
    (EE) Unable to open evdev device "/dev/input/mx510".
    (EE) PreInit failed for input device "Configured Mouse"
    (II) UnloadModule: "evdev"
    
       *** If unresolved symbols were reported above, they might not
       *** be the reason for the server aborting.
    
    Backtrace:
    0: /usr/bin/X(xf86SigHandler+0x86) [0x80b4a56]
    1: [0xffffe420]
    2: /lib/tls/i686/cmov/libc.so.6(malloc+0x81) [0xb7e01411]
    3: /usr/bin/X(xf86optionListCreate+0xb0) [0x80d135f]
    4: /usr/bin/X(xf86CollectInputOptions+0x34) [0x80b6d7e]
    5: /usr/lib/xorg/modules/input/wacom_drv.so [0xb737f1fd]
    6: /usr/bin/X(InitInput+0x1a0) [0x809cfe5]
    7: /usr/bin/X(main+0x368) [0x806df94]
    8: /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xd2) [0xb7db0ea2]
    9: /usr/bin/X(FontFileCompleteXLFD+0x81) [0x806d611]
    
    Fatal server error:
    Caught signal 11.  Server aborting
    I did use the 1.0.0.5 evdev listed. I tried with the current evdev and didn't even get the splash screen.

  5. #5
    Join Date
    Oct 2005
    Location
    California
    Beans
    572
    Distro
    Kubuntu 9.04 Jaunty Jackalope

    Re: HOWTO Configuring Logitech mice in Ubuntu 6.06 32 bit, based on endy's HOWTO

    I think you have a problem with the udev rule, does it work if you use
    Code:
    	Option		"Device"	"/dev/input/eventX" #X being the event number you get from "cat /proc/bus/input/devices"
    instead of
    Code:
    	Option		"Device"	"/dev/input/mx***"
    ?
    aka anime4christ (I'm a guy, btw.)
    My personal boring website ^_^
    Jesus has changed your life. Save changes? (Y/N)

  6. #6
    Join Date
    Nov 2005
    Location
    Sweden
    Beans
    257
    Distro
    Kubuntu 9.10 Karmic Koala

    Re: HOWTO Configuring Logitech mice in Ubuntu 6.06 32 bit, based on endy's HOWTO

    Quote Originally Posted by crysys
    I hit the same problem as Enigmatic. Here are the last few lines of my xorg log from the failed attempt:

    Code:
    (**) Configured Mouse: Device: "/dev/input/mx510"
    (EE) Unable to open evdev device "/dev/input/mx510".
    (EE) PreInit failed for input device "Configured Mouse"
    (II) UnloadModule: "evdev"
    
       *** If unresolved symbols were reported above, they might not
       *** be the reason for the server aborting.
    
    Backtrace:
    0: /usr/bin/X(xf86SigHandler+0x86) [0x80b4a56]
    1: [0xffffe420]
    2: /lib/tls/i686/cmov/libc.so.6(malloc+0x81) [0xb7e01411]
    3: /usr/bin/X(xf86optionListCreate+0xb0) [0x80d135f]
    4: /usr/bin/X(xf86CollectInputOptions+0x34) [0x80b6d7e]
    5: /usr/lib/xorg/modules/input/wacom_drv.so [0xb737f1fd]
    6: /usr/bin/X(InitInput+0x1a0) [0x809cfe5]
    7: /usr/bin/X(main+0x368) [0x806df94]
    8: /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xd2) [0xb7db0ea2]
    9: /usr/bin/X(FontFileCompleteXLFD+0x81) [0x806d611]
    
    Fatal server error:
    Caught signal 11.  Server aborting
    I did use the 1.0.0.5 evdev listed. I tried with the current evdev and didn't even get the splash screen.
    You have changed your udev rule to NAME="input/mx510" instead of NAME="input/mx500" right?
    Make sure evdev module is loaded too. Do "lsmod | grep evdev" and if it doesn't show up do "sudo modprobe evdev" and add evdev to /etc/modules

    I have a feeling it's necessary to reload udev to create the new device nodes. Not sure about it though. Just run "sudo /etc/init.d/udev restart" or reboot.

    detyabozhye
    Isn't there something missing in step 1.1? "sudo gedit /etc/udev/rules." should be something like "gksu gedit /etc/udev/rules.d/number-fancyname.rules"
    Last edited by Rizado; June 6th, 2006 at 09:12 AM.

  7. #7
    Join Date
    Feb 2006
    Location
    London, UK
    Beans
    161
    Distro
    Kubuntu 8.10 Intrepid Ibex

    Re: HOWTO Configuring Logitech mice in Ubuntu 6.06 32 bit, based on endy's HOWTO

    Firstly, I would like to second Rizado. There is a typo in the udev setup instructions. Where it says
    Code:
    sudo gedit /etc/udev/rules.
    you really mean
    Code:
    sudo gedit /etc/udev/rules.d/19-local.rules
    Secondly, with the MX700 I have a problem with the udev rule. Your
    Code:
    KERNEL=="event[0-9]*", SYSFS{../name}=="Logitech USB Receiver", NAME="input/mx700"
    (edited for my configuration) will match both my keyboard and my mouse, as both of them use the same USB receiver (they are wireless, remember). I'm not familiar with udev rules: is there some other criterion I could use to distinguish the keyboard from the mouse? Or is it possible to use
    Code:
        Option        "Dev Phys"        "usb-*/input1"
        Option        "Device"          "/dev/input/ts0"
    instead of /dev/input/mx700, like for Breezy?

  8. #8
    Join Date
    Apr 2006
    Beans
    22

    Re: HOWTO Configuring Logitech mice in Ubuntu 6.06 32 bit, based on endy's HOWTO

    Nice HOWTO, but it works till section2 for me.
    I can not get xbindkeys to work

    Xbindkeys simply doesn`t work for mouse buttons
    Can someone help me?

    How can I get to know the "action"?
    For example I want to run minimalize firefox with my thumb button. Where can I find the code for action "minimalize"?

    Thanks for help!
    Last edited by XomboX; June 6th, 2006 at 05:37 PM.

  9. #9
    Join Date
    Aug 2005
    Location
    UK
    Beans
    570
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: HOWTO Configuring Logitech mice in Ubuntu 6.06 32 bit, based on endy's HOWTO

    Using the evdev package from the link posted here I still get

    Unknown protocol: "evdev"

    What's gone wrong? This is the section from my xorg.conf

    Section "InputDevice"
    Identifier "Configured Mouse"
    Driver "mouse"
    Option "CorePointer"
    Option "Protocol" "evdev"
    Option "Dev Name" "Logitech USB Receiver"
    Option "Dev Phys" "usb-0000:00:02.0-3/input0"
    Option "Device" "mouse1 event3 ts1"
    Option "Buttons" "10"
    Option "ZAxisMapping" "4 5"
    EndSection

    I read that using careful ZAxisMapping you don't need to use xmodmap

    Thanks

    Ironfistchamp

  10. #10
    Join Date
    Apr 2006
    Beans
    22

    Re: HOWTO Configuring Logitech mice in Ubuntu 6.06 32 bit, based on endy's HOWTO

    ironfistchamp:
    I think there is a mistake in your xorg.conf. You should write "evdev" instead "mouse" after driver option.

    Finally:
    Section "InputDevice"
    Identifier "Configured Mouse"
    Driver "evdev"
    Option "CorePointer"
    Option "Protocol" "evdev"
    Option "Dev Name" "Logitech USB Receiver"
    Option "Dev Phys" "usb-0000:00:02.0-3/input0"
    Option "Device" "mouse1 event3 ts1"
    Option "Buttons" "10"
    Option "ZAxisMapping" "4 5"
    EndSection

Page 1 of 19 12311 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •