Using ginn for adding multitouch gestures to ubuntu (for Acer 1825)

By Christopher, February 20, 2011

In my last post I explained were you found a tutorial for installing a real multitouch driver for the ACER 1825 and said I don’t know how to use these multitouch support. Thanks to Tom/drnessie who recommended ginn to me.

Ginn is a daemon which recognizes multitouch gestures with the ubuntu utouch interface and translates them to global or application specific shortcuts.

Installing ginn:

  1. download the newest ginn sources from this side: https://edge.launchpad.net/canonical-multitouch/ginn
  2. extract them into a arbitrary folder and change into
  3. install missing libraries sudo apt-get install libxml-dev libxml libbambf-dev
1
2
3
4
./configure
#if more libraries are missing the configure scripts prints it out
make
sudo make install

Configuration:
Next you need to specify the mapping from gestures to shortcuts. An example is inside the source package etc/wishes.xml. This file needs to be located in /etc/ginn/wishes.xml. Copy this file and configure it on your own or check my configuration:
ginn-wishes.xml

Gestures:
I have added gestures for the webbrowsers opera,firefox and google-chrome, for Last.fm, gedit and xournal. More application are already defined.
In opera, firefox and chrome you could scroll in x and y direction with two finger dragging and zoom in/out with pinching.
In gedit/Texteditor you could scroll vertical with two finger dragging. In Last.fm application you could change volume with pinching and play next track with two finger right drag. In xournal you could scroll like in the browsers. I also specified the zoom/pinch gesture equal to the browser but on my system it does not work, I don’t know why, because its the same keyboard shortcut…? If somebody could help please write a comment.

Unfortunately our Acer 1825 is only a dual touch device and so you are a bit restricted with your gestures but you could use two finger dragging up,down,left,right, rotating left, rotating right and pinch spread and close.

Tipps for configuration:
I struggled a lot with the fact that the detection of the running applications is done with some strange matching of the name. The names seems to be language specific, therefore on my German ubuntu gedit is Texteditor. In my opinion the plain process name should be the better matching feature. If some gestures do not work on your system start ginn from terminal and do some gestures on your application and then look through the output from ginn how it named you application. This naming must be used inside the wishes.xml.

Start automatically ginn in tablet mode
This could be done by a simple edit on the gyro-key.run script from the last post:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
pid=$( pgrep gyro-auto-rotat )
if [[ $1 == "activate" ]];then
#DO NOT START TWICE
if [ "$pid" == "" ] ;then
gyro-auto-rotate.run &
ginn &
fi
notify-send "gyro auto rotation enabled --> tablet mode"
else
if [[ $1 == "deactivate" ]];then
if [ "$pid" != "" ] ;then
kill -9 $pid
pkill ginn
#reset screen to default
gyro-auto-rotate.run normal
fi
notify-send "gyro auto rotation disabled --> laptop mode"
else
notify-send "No param"
fi
fi

Let me know about your cool gestures. It works really nice. Try it out.