Taming Macbook Pro’s Trackpad in Ubuntu 12.10 Linux

Taming Macbook Pro's Trackpad in Ubuntu Linux

Taming Macbook Pro’s Trackpad in Ubuntu Linux

I’ve been working much more in Ubuntu Linux lately on my 2011 Macbook Pro, and the lack of integration for the trackpad has really been driving me crazy. The default synaptics driver does an ok job, but when it comes to things like gestures, the details make all the difference.

I tried BlueDragon’s xf86-input-mtrack, an Xorg driver for multitouch trackpads. It seems to act more like a mouse emulator and offers some options for control via gestures. The most important options for me were the ability to ignore a thumb as it rests on the trackpad, as well as being able to map three-fingered swiping gestures for web navigation.

After a bit of tuning, here’s the configuration I found came the closest to what I was used to in OSX. Still not perfect, but serviceable:

Section "InputClass"
	MatchIsTouchpad "on"
	Identifier      "Touchpads"
	Driver          "mtrack"
	Option          "Sensitivity" "0.55"
	Option		"FingerHigh" "12"
	Option		"FingerLow" "1"
	Option          "IgnoreThumb" "true"
	Option          "IgnorePalm" "true"
	Option          "TapButton1" "0"
	Option          "TapButton2" "0"
	Option          "TapButton3" "0"
	Option          "TapButton4" "0"
	Option          "ClickFinger1" "1"
	Option          "ClickFinger2" "3"
	Option          "ClickFinger3" "3"
	Option          "ButtonMoveEmulate" "false"
	Option		"ButtonIntegrated" "true"
	Option          "ClickTime" "25"
	Option          "BottomEdge" "25"
	Option		"SwipeLeftButton" "8"
	Option		"SwipeRightButton" "9"
	Option		"SwipeUpButton" "0"
	Option		"SwipeDownButton" "0"
	Option		"ScrollDistance" "75"
EndSection

To set this up on your Ubuntu machine (technically it should work in Gentoo and Arch too) first install xf86-input-mtrack. In a Terminal, enter the command:

sudo apt-get install xserver-xorg-input-mtrack

Then edit your xorg.conf file (if you prefer a text editor besides gedit, use that instead):

sudo gedit /etc/X11/xorg.conf

You may have existing configurations for the synaptics touchpad driver. Comment out existing stuff by adding a # to the beginning of each line. Then add the configuration block from above. There are a lot of additional options for mtrack covered in the readme.

Then apply your changes by restarting lightdm (no reboot required, but all your windows will be closed!):

sudo restart lightdm

that’s it!