Scroll emulation with Trackman Marble in Debian 9

images-duckduckgo-comSpending a lot of time with mouse and keyboard, I decided I would give it a try with trackball. A friend lent me Logitech Trackman Marble for a week to see if I can get used to it. The one drawback in Linux is that there’s no support for scroll emulation by default. It was relatively easy to set this up on my laptop with help of xinput, but at home, where I’m using Debian 9 (currently ‘testing’ branch) with Mate, this didn’t work. So this had to go to a good old X.Org configuration file:

# cat /usr/share/X11/xorg.conf.d/50-trackball.conf 
Section "InputClass"
    Identifier  "Marble Mouse"
    MatchProduct "Logitech USB Trackball"
    MatchIsPointer "on"
    MatchDevicePath "/dev/input/event*"
    Driver "evdev"
    Option "ButtonMapping" "1 2 3 4 5 6 7 8 9"
    Option "EmulateWheel" "true"
    Option "EmulateWheelButton" "8"
    Option "ZAxisMapping" "4 5"
    Option "XAxisMapping" "6 7"
    Option "Emulate3Buttons" "true"
    Option "EmulateWheelInertia" "10"
EndSection
# cat /etc/debian_version 
9.0

By the way, after two days of using it, I think I’m getting used to it, so I’ll probably buy one for myself.

9 February 2018 update:
As Debian testing keeps rolling on and on, the above mentioned stopped worked for me, and had to be replaced by the following (obviously, there has been a driver change):

#cat /etc/debian_version 
buster/sid
# cat /usr/share/X11/xorg.conf.d/50-trackball.conf 
Section "InputClass"
        Identifier      "Marble Mouse"
        MatchProduct    "Logitech USB Trackball"
        Driver          "libinput"
        Option          "ScrollMethod" "button"
        Option          "ScrollButton" "8"
	Option		"MiddleEmulation" "on"
EndSection

12 June 2022 update:

When running on a system with Wayland, like RHEL 9, this has to be set this way in the command line:

gsettings set org.gnome.desktop.peripherals.trackball scroll-wheel-emulation-button 8