Scroll Wheel Function for the Marble Mouse on Linux

Computing, Linux Add comments

Update: Since Ubuntu 8.10 "Intrepid Ibex" Hal has superseded xserver/xorg.conf as the preferred means to configure input devices. However, I couldn’t get the advice at

https://help.ubuntu.com/community/Logitech_Marblemouse_USB

to work for me. The article hints at shaky button mapping, so if you want to go back to the good old days of xorg.conf, you can add

Option "AutoAddDevices" "no"

to the "ServerLayout" section of your xorg.conf file which will effectively disable Hal. More info (in German) is  here:

http://www.blogs.uni-osnabrueck.de/rotapken/2008/08/14/xorg-evdev-und-hal-teil-2/

Update: This post has the settings for hal, and they work just like the old xorg.settings. Migration to hal will likely bring benefits for most, such as plug-and-play hot plugging. You might want to check out this writeup before taking the plunge.

Original post:

As you know I consider the Logitech Marble Mouse the Best Pointing Device, bar none. And the final tweak I wanted to enable the trackball to act as a scroll wheel. For Windows and those suffering from the generally horrid Logitech drivers and utilities (SetPoint anyone?), there’s Marble Mouse Scroll Wheel (original download page seems to be down recently, so here is another download link). But for my installation of Linux Mint/Ubuntu I had tried some advice from the web without success, to the point when X failed to load. Finally the approach suggested by linux (USA) in his Amazon review worked. It lets you use the right small button as a paste button and holding the left small button will let you use marble/ball as an omnidirectional scroll wheel. Here it goes:

You must edit your /etc/X11/xorg.conf file (dont’ forget to backup with cp xorg.conf xorg.conf.bak), for xorg 6.8 the relevant settings look like this:

Section "InputDevice"
Identifier "Configured Mouse"
Driver  "mouse"
Option  "CorePointer"
Option  "Device"  "/dev/input/mice"
Option "Protocol" "ExplorerPS/2"
Option "Buttons" "5"
Option "YAxisMapping" "4 2"
Option "XAxisMapping" "6 7"
Option "EmulateWheel" "yes"
Option "EmulateWheelButton" "4"

EndSection

You also need to create an ~/.xmodmap file in your home directory and enter:

pointer = 1 5 3 4 2 6 7

With xorg 7.2 (released 15th Feb. 2007) and newer you have to remove the “YAxisMapping” and change the “EmulateWheelButton” to “8”, so that the entire section looks like this:

Section "InputDevice"
Identifier "Configured Mouse"
Driver  "mouse"
Option  "CorePointer"
Option  "Device"  "/dev/input/mice"
Option "Protocol" "ExplorerPS/2"
Option "XAxisMapping" "6 7"
Option "EmulateWheel" "yes"
Option "EmulateWheelButton" "8"

EndSection

Your ~/.xmodmap file will have to contain this:

pointer = 1 9 3 4 5 6 7 8 2 10 11

instead of the above. The protocol setting “ExplorerPS/2” is also important to get the buttons to work even though the device is connected via USB.

To enable horizontal scrolling in Firefox you’ll have to go to the about:config page and set:

mousewheel.horizscroll.withnokey.action 0

The ~/.xmodmap file will likely be loaded automatically when you start your system, but if not you might have to create a ~/.xinitrc file. This page has more info, and here’s more info about monitoring your buttons using the xev utility. Hope it helps.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

6 Responses to “Scroll Wheel Function for the Marble Mouse on Linux”

  1. Ken Says:

    This does not work for me. The small left button reloads the page. I have the mouse connected to the PS2 port.

  2. Ken Says:

    Just switched to USB, same result.

    Running linuxmint 6, I think. Most recent as of 1/16/09.

  3. dirk Says:

    @Ken: I’m still on Daryna and FF 2. It might be necessary to manually capture the mouse button keys as outline in the quoted article at http://cweiske.de/howto/xmodmap/allinone.html. Is this just a browser issue or can’t you get the scrolling with any program?

  4. Ken Says:

    Found this somewhere, added it to xorg.conf, leaving the original ‘configured mouse’ section intact, and it works in firefox and thunderbird for autoscroll using the small left button to activate.

    Section “InputDevice”
    Identifier “Marble Mouse”
    Driver “mouse”
    Option “CorePointer”
    Option “Protocol” “ExplorerPS/2″
    Option “Buttons” “5″
    Option “ButtonMapping” “1 8 3 6 7″
    Option “Device” “/dev/input/mice”
    Option “EmulateWheel” “true”
    Option “EmulateWheelTimeout” “300″
    Option “EmulateWheelButton” “6″
    Option “XAxisMapping” “4 5″
    EndSection

    It’s good enough for now.

    I did not do an .xmodmap.

  5. Ken Says:

    Did I mention this is under Debian Sid, xorg 7.4, I think.

  6. Shanti Dressen Says:

    [..] A little unrelated, but I rather liked this site post [..]

Leave a Reply

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in