Update: Logitech LX8 in Ubuntu

December 22, 2008 by
Filed under: bash, gadget, HowTo, linux, Ubuntu 

I first wrote about the Logitech LX8 back in August, 2008. The one feature that had eluded me was the side scrolling with the tilt wheel. Through some information I found on fellow blogger Ken Zutter's site, I now have my LX8 working in Ubuntu including the side scrolling feature. The key was to go back to the evdev driver. Once I made the driver change the side scrolling worked, except in the wrong direction. Left went right and vice versa. No changes in button mapping in the xorg.conf file made a difference, so I resolved to make the mapping changes with Xmodmap. Below are the changes I made to get everything working the way that I want it.

Edit /etc/X11/xorg.conf

sudo gedit /etc/X11/xorg.conf

and make the mouse section look like this.

Section "InputDevice"
Identifier "LX8"
Driver "evdev"
Option "Device" "/dev/input/by-id/usb-Logitech_USB_Receiver-event-mouse"

And edit the server section to include the LX8 Device.

Affiliate Link
Section "ServerLayout"
Identifier "Default Layout"
screen 0 "Screen0" 0 0
Inputdevice "Generic Keyboard"
Inputdevice "LX8"

Save the file and exit.

After making these changes, a restart of the X server (CTRL+ALT+Backspace) should get the side scrolling feature working (although backwards).

Now, to fix the side scrolling direction. The button mapping can be changed with the xmodmap command like so:

xmodmap -e "pointer = 1 2 3 4 5 7 6 8 9"

but these settings will be lost upon logout. One solution is to put the pointer command into a .Xmodmap file in your home directory, but that only makes the change to one user account. If you have more than one user ID set up on your machine, then you'll have to copy this file to all of them as well. A better way is to make the change globally so that any user who logs in has the proper mouse settings. To do this you need to create a /etc/X11/Xmodmap file.

sudo gedit /etc/X11/Xmodmap

Insert this single line and save the file. (Change the button order to 3 2 1 4 5 7 6 9 8 for left handed mouse)

pointer = 1 2 3 4 5 7 6 8 9

Now make the file executable.

sudo chmod +x /etc/X11/Xmodmap

Lastly, edit the global xinitrc file to load the new Xmodmap file when the X server starts.

sudo gedit /etc/X11/xinit/xinitrc

Add the following lines to the end of the file and save.

# load global Xmodmap
[ -f /etc/X11/Xmodmap ] && xmodmap /etc/X11/Xmodmap

A restart of the X server will load the new files.

If you followed my post about how to make the LX8 left handed, then you will want to update your aliases in your .bashrc file.

gedit .bashrc

Edit your LX8 aliases to look like this.

# aliases for left and right handed Logitech LX8 mice
alias lhm='xmodmap -e "pointer = 3 2 1 4 5 7 6 9 8"'
alias rhm='xmodmap -e "pointer = 1 2 3 4 5 7 6 8 9"'


2 Responses to “Update: Logitech LX8 in Ubuntu”

  1. Ryan Larrowe says:

    Was wondering a good book to read about configuring xorg.conf. My xorg.conf doesn't even have a server section so I added one and just put the LX8 line in there and it craped on me. It seems to be full of generic options.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>