You can modify the behaviour of input devices on Linux as normal user with 'xinput'. It should be available on any reasonably recent distribution (at least those using X.Org), but may not be installed by default.
I use the following code to configure my Logitech M570:
Code: Select all
#!/bin/sh
## Name of trackball device, do not use numeric ID as it may change between reboots
TRACKBALL="Logitech Unifying Device. Wireless PID:1028"
## Configure "forward" button (9) as second middle button (2)
xinput set-button-map "$TRACKBALL" 1 2 3 4 5 6 7 8 2 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
## set up omni-directional scrolling when pressing and holding the "back" button (8)
## set button presses for movement on axes in order left right up down
xinput set-prop "$TRACKBALL" "Evdev Wheel Emulation Axes" 6 7 4 5
## assign button for scroll mode; this is the physical button number and not affected by the button map
xinput set-prop "$TRACKBALL" "Evdev Wheel Emulation Button" 8
## start scroll mode immediately, values greater than 0 allow for clicking with the button
xinput set-prop "$TRACKBALL" "Evdev Wheel Emulation Timeout" 0
## set speed on range 1 to 16, with 1 being the fastest
xinput set-prop "$TRACKBALL" "Evdev Wheel Emulation Inertia" 8
## enable scrolling
xinput set-prop "$TRACKBALL" "Evdev Wheel Emulation" 1
I'm running this script with the auto-start feature of my window manager. Adding it to '~/.xsession' (or maybe '~/.xinit', depending on your distribution and method of starting a graphical session) is also an option.
You can get a list of your input devices with:
A list of properties of a device:
More help: