I recently purchased a 2011 Macbook Pro. Not long after, I installed Ubuntu 11.04 Natty which came with a shiny new Unity desktop. I quickly noticed that while Unity supported my multitouch trackpad out of the box (Kudos Ubuntu team!), there was no way (at least that I could find) to configure the gestures. But this is linux, and I can do whatever I want right? Right! After a little searching I came across a tool named touchegg. This tool seemed like it was going to be chalk-full of awesome sauce. It came with a graphical interface to configure the gestures, but unfortunately I found it to be pretty finicky. It very rarely worked. For a short time I lived on the edge–not knowing whether the touchegg action would fire or if it would be the Unity action. Sad Face. Very Sad Face. So after a little further searching I found the ubuntu sanctioned tool: ginn. This tool is designed to give multitouch support to older, non-touch aware applications–which are most applications on the desktop or laptop these days.
Getting down to business…
You configure gestures in ginn with an XML file that goes something like this:
<application name="google-chrome"> <wish gesture="Drag" fingers="3"> <action name="Back" when="update"> <trigger prop="delta x" min="-1200" max="-100"/> <key modifier1="Alt_L">Left</key> </action> </wish> </application>
In English, if I drag left with three fingers, please send alt+Left to the application. i.e. “Back” in my browser window–just like I grew so accustomed to when I test drove OSX for a week before switching back to Ubuntu. Sweet like cake. If you didn’t notice, ginn allows you (but does not force you) to define the application for the gesture. So if you want to fire different actions for the same gesture, based on the current app, you can do that. Also sweet like cake.
It’s all fun and games until…
But wait! ginn doesn’t override Unity’s built in gestures. So whenever I performed a gesture that was already defined in Unity, both the ginn action and the Unity action would take place. I’m sure there is a way to turn off multitouch gestures in Unity, but it was not an obvious enough setting that I could find it. For this, and many other reasons, I decided to take the plunge into Gnome3.
<sidenote> Let’s just say that while Gnome 3 has it’s flaws, I haven’t looked back. Like Unity, Gnome 3 provides a very different way to interact with your computer. I’m not sure yet if I like it, but I couldn’t stand Unity, so Gnome 3 is a huge improvement in my opinion. I could go back to Gnome 2, but after using 3, 2 seems so unpolished.</sidenote>
Gnome 3, by default, doesn’t have any multitouch gestures defined. Well, it has 2 finger scrolling if you turn it on. Don’t get me wrong, this is exactly what I was hoping for. I started up ginn and everything was working great except for scrolling–which wasn’t overly surprising considering that I didn’t define that gesture. I was actually sort of hoping that, like Unity, the built-in scrolling gesture would fire even while ginn was running. Not so in Gnome 3. A quick jump back to the configuration file to let ginn know that it should press the Up and Down arrows to scroll and Mr. Hammond, I think we’re back in business!
Sort of. Using the Up and Down arrows to scroll worked in the browser window, but when you switch to another application, like the terminal for instance, using the Up and Down arrows didn’t have the desired affect. I struggled with this for a few days until I found out that ginn supports Mouse actions.
<wish gesture="Drag" fingers="2"> <action name="scroll" when="update"> <trigger prop="delta y" min="20" max="80"/> <button>5</button> </action> </wish>
That little fix, along with button 4 for scrolling back up made this guy a whole lot happier. So if you have a multitouch trackpad on Ubuntu, check out ginn. It’s a great piece of software.
Here is my complete configuration file as it currently stands. (Note that wordpress wouldn’t allow me to upload an XML file so I renamed it to a .txt.