Well, actually, I just wanted to put it on my server so that I could carry my trackball to a job site and be able to download the section that makes it work. But everyone else gets to benefit.
# Logitech Marble FX Trackball
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no" # which is the default
# Protocol
# PS/2 is the basic vanilla protocol, but lacks the extras.
# Some people report that they use IMPS/2, but it doesn't work for me.
Option "Protocol" "MouseManPlusPS/2"
# Tells X about the 4th button (the red one).
Option "Buttons" "4"
# Sets the 4th button as a lock for button #1.
# To do a drag, you click and release the red button,
# move the ball, and then click the red button again to release.
Option "DragLockButtons" "4 1"
# Or you can set it up to emulate a wheel mouse like this.
# (Moving the ball while the red button is pressed scrolls.)
#Option "EmulateWheel" "1"
#Option "EmulateWheelButton" "4" # (the default)
EndSection
Disclaimer: This is for XFree86 version 4, specifically 4.3.0.
NOTE: For xorg (at least for 6.7), I had to use "Auto" for the protocol.
And for 7.0, my mouse section turned into this:
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Device" "/dev/input/mice"
Option "Name" "Logitech Marble Mouse (trackball)"
Option "Protocol" "Auto"
# Big left + big right = middle
# Option "Emulate3Buttons" "True"
# Option "Emulate3Timeout" "50"
# Option "ChordMiddle"
# Small left button is a lock for button #1.
Option "DragLockButtons" "8 1"
# Option "EmulateWheel" "True"
# Option "EmulateWheelButton" "9"
Option "ZAxisMapping" "6 7"
EndSection