Page 1 of 65 1231151 ... LastLast
Results 1 to 10 of 650

Thread: HOWTO: Configuring Logitech mice in Ubuntu 6.06: New Guide

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

    HOWTO: Configuring Logitech mice in Ubuntu 6.10 and 7.04

    70.06.19: I've made a major update to this guide for Ubuntu 6.10 and 7.04. Tell me if I made any mistakes.

    A COMPLETE guide to a Logitech mouse

    Note: Some have complained that this guide is too complicated (they should see the old guide, about twice the length). Well, I won't argue, but I'd like to point out that sections 2 and 3 are optional and there is an alternative method for Section 1 as well, but my method will greatly increase the functionality of the mouse.

    This is my guide on how to get all the buttons working properly on a logitech mouse (loosely based on Endy's guide), how to use lmctl 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, it should work for the similar mx510 and mx518 and the wireless versions like the mx700 however, they may require slightly different configurations. Higher models, such as the MX1000 and the G series definatley need config changes, especially in the xbindkeys area.

    Prerequisite: Installing evdev

    Evdev was installed by default on my system, but some people didn't have it installed by default. So if you don't, run this command to install it:

    Code:
    sudo apt-get install xserver-xorg-input-evdev

    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.

    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"

    2. Adding a udev rule

    Adding a udev rule in MOST cases is not necessary anymore, therefore it has been removed.

    3. Editing the xorg.conf file

    First, let's back it up in case you mess anything up:

    Code:
    sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak
    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 replace it with:

    Code:
    Section "InputDevice"
    	Identifier	"Configured Mouse"
    	Driver		"evdev"
    	Option		"CorePointer"
    	Option		"Name"	"Logitech USB-PS/2 Optical Mouse" #this should be the name of the device which I made bold here.
    EndSection
    Make sure you save the changes to your xorg file.

    4. Restart udev and Xorg

    Warning!
    Don't restart yet! Just before we do I have to warn you if you made a mistake in the xorg file X will not start. But don't worry that's why we backed up the previous file. If X fails to start then you will end up in a text console. Log in and type the following to rename the current xorg.conf and restore the previous file:

    Code:
    sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf-logi
    sudo mv /etc/X11/xorg.conf.bak /etc/X11/xorg.conf
    Ok, I'm ready
    Now we're prepared, restart evdev by typing:
    Code:
    sudo /etc/init.d/udev restart
    Then restart Xorg by logging out and pressing Alt+Ctrl+Backspace. Then log back in.

    Section 2: Side buttons and Nautilus, Epiphany, Konqueror, etc (Optional)

    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 (for MX500, MX510, MX518, MX700):

    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
    For mice with a tilt wheel (such as the MX1000), you would most likely change b:6 to b:8 and b:7 to b:9.

    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.

    2. Fixing the cruise control buttons (MX500, MX510, MX700, MX1000):

    Note: In Edgy and Feisty I haven't noticed this problem anymore (I've had cruise control off for a while though), but I will leave this section here because it hasn't been confirmed that the problem is gone.

    Install these packages for "click" to compile:

    Code:
    sudo apt-get install build-essential libx11-dev x11proto-xext-dev libxtst-dev
    Download and untar "click" source code into ~/.click (or wherever you want, just remember the dir, you'll need it in the .xbindkeysrc):

    Code:
    cd ~/
    wget http://bg.rifetech.com/click.tgz
    tar xvfz click.tgz
    mv click .click
    then compile it:

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

    Code:
    "~/.click/click 4"
      m:0x0 + b:9
    "~/.click/click 5"
      m:0x0 + b:10
    Note: Mice with more buttons and/or tilt wheels will most likely have different button numbers, please check in xev.

    3. 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.

    In KDE (Thanks to msak007), you create a startup script:
    Code:
    kedit ~/.kde/Autostart/start-xbindkeys
    Insert this into it:
    Code:
    #!/bin/sh
    xbindkeys
    Make it executable:
    Code:
    chmod +x ~/.kde/Autostart/start-xbindkeys

    Section 3: lomoco (Resolution, etc.) (Optional)

    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.

    1. Getting everything we need

    lomoco is in the repositories as of Ubuntu 6.10. Ok so lets install lomoco:

    Code:
    sudo apt-get install lomoco
    2. Working lomoco

    I use the command "lomoco -8" which you can run now:

    Code:
    sudo lomoco -8
    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 lomoco command, mine like the example above is:

    Code:
    echo "Setting up Logitech mouse..."
    lomoco -8
    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 lomoco loads automatically on boot!

    Conclusion

    I think that's everything, phew. 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 mx500 so we can find out what works.

    Thanks to endy's howto, http://floam.sh.nu/guides/mx1000, and the many people who responded to my first howto, especially pietruszka.
    Please tell me if you have any problems or if I made any errors.

    Edit: Added the need to restart the whole computer for the udev rule to take effect. I think this is where many people had trouble with my last guide.
    Edit: Simplified the click downloading and all.
    Edit: Added a few notes for those who complain.
    Edit: Fixed the click path for xbindkeys.
    Edit: Added the requirement for the evdev package since not everybody has it installed by default.
    Edit: Replaced LMCtl with lomoco in the instructions
    Edit: Fixed a most embarrasing error in the note at the top.
    Edit: Added the KDE way to add xbindkeys to the session.
    Edit: Did a major upgrade for Edgy and Feisty.
    Edit: Replaced the restart part with a command to restart evdev and Xorg.
    Last edited by detyabozhye; August 29th, 2007 at 06:05 AM. Reason: Updated for new realeases of Ubuntu
    aka anime4christ (I'm a guy, btw.)
    My personal boring website ^_^
    Jesus has changed your life. Save changes? (Y/N)

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

    Re: HOWTO: Configuring Logitech mice in Ubuntu 6.06: New Guide

    K, this is the new guide, use the old one ONLY if this one fails any way you try.
    aka anime4christ (I'm a guy, btw.)
    My personal boring website ^_^
    Jesus has changed your life. Save changes? (Y/N)

  3. #3
    Join Date
    Feb 2006
    Location
    USA
    Beans
    98

    Re: HOWTO: Configuring Logitech mice in Ubuntu 6.06: New Guide

    detyabozhye - You rock! This works perfectly with my Logitech G7.

    Just have to use "Logitech USB Receiver". Some extra config is needed for buttons, but no big deal.

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

    Re: HOWTO: Configuring Logitech mice in Ubuntu 6.06: New Guide

    Thanks. ^_^ Prayed a lot while trying to get it to work (I do that all the time) so I can't take the credit. ^^;
    aka anime4christ (I'm a guy, btw.)
    My personal boring website ^_^
    Jesus has changed your life. Save changes? (Y/N)

  5. #5
    Join Date
    Jul 2006
    Location
    Munich, Germany
    Beans
    7
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: HOWTO: Configuring Logitech mice in Ubuntu 6.06: New Guide

    Thanks for the howto. It works quite good on my Notebook.

    I just have some problems:

    - My MX518 doesn't want to do any cruising, the buttons [+] and [-] don't create any reaction in xev. I've read your comment in the other howto that these buttons work differently on a MX518, but I know for sure that you can set them up to do cruise control in Windows. The standard driver from Logitech allows these buttons to be setup as cruise control. So it should (somehow) be possible on Linux, too.

    - My V500 now has all buttons working too, but instead of sending mouse6 on scrolling left and mouse7 on scrolling right, they are switched. Left gives 7 and right gives 6. I tried remapping with xmodmap, but it doesn't work. I guess I'll have to go the xbindkey-route for them to work.

    The LMCtl-version you linked in this howto doesn't have support for MX510, MX518, and newer ones. There seems to be a patch for lmctl somewhere, but I couldn't find it with google. But there is a kind of replacement, called lomoco with support for the newer mice.

  6. #6
    Join Date
    Jan 2006
    Beans
    53

    Re: HOWTO: Configuring Logitech mice in Ubuntu 6.06: New Guide

    Quote Originally Posted by detyabozhye View Post

    Then add this to you .xbindkeysrc:

    Code:
    "~/click/click 4"
      m:0x0 + b:9
    "~/click/click 5"
      m:0x0 + b:10
    how do I do this?

  7. #7
    Join Date
    Jan 2006
    Beans
    53

    Re: HOWTO: Configuring Logitech mice in Ubuntu 6.06: New Guide

    And also how do I make the wheel button a double click button?

  8. #8
    Join Date
    Jul 2006
    Beans
    13

    Re: HOWTO: Configuring Logitech mice in Ubuntu 6.06: New Guide

    Quote Originally Posted by kpurcell View Post
    Quote:
    Originally Posted by detyabozhye View Post

    Then add this to you .xbindkeysrc:

    Code:

    "~/click/click 4" m:0x0 + b:9 "~/click/click 5" m:0x0 + b:10


    how do I do this?
    Yes, everything else was an excellent walk through, until I got here.

    Any help is appreciated.
    Last edited by skeeterflea; July 24th, 2006 at 03:54 AM. Reason: quote

  9. #9
    Join Date
    Jul 2006
    Location
    Munich, Germany
    Beans
    7
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: HOWTO: Configuring Logitech mice in Ubuntu 6.06: New Guide

    how do I do this?
    Code:
    gedit ~/.xbindkeysrc

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

    Re: HOWTO: Configuring Logitech mice in Ubuntu 6.06: New Guide

    Quote Originally Posted by Alexander Heß View Post
    - My MX518 doesn't want to do any cruising, the buttons [+] and [-] don't create any reaction in xev. I've read your comment in the other howto that these buttons work differently on a MX518, but I know for sure that you can set them up to do cruise control in Windows. The standard driver from Logitech allows these buttons to be setup as cruise control. So it should (somehow) be possible on Linux, too.
    well, to make it do cruise control, I believe you would do the equiv of $ lmctl --sms using lomoco or something.

    Quote Originally Posted by Alexander Heß View Post
    - My V500 now has all buttons working too, but instead of sending mouse6 on scrolling left and mouse7 on scrolling right, they are switched. Left gives 7 and right gives 6. I tried remapping with xmodmap, but it doesn't work. I guess I'll have to go the xbindkey-route for them to work.
    hmm, what did xmodmap say? It should be possible with xmodmap.

    Quote Originally Posted by Alexander Heß View Post
    The LMCtl-version you linked in this howto doesn't have support for MX510, MX518, and newer ones. There seems to be a patch for lmctl somewhere, but I couldn't find it with google. But there is a kind of replacement, called lomoco with support for the newer mice.
    Does it take all the same commands?
    aka anime4christ (I'm a guy, btw.)
    My personal boring website ^_^
    Jesus has changed your life. Save changes? (Y/N)

Page 1 of 65 1231151 ... 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
  •