Multitouch X.org howto
We get a lot of questions on how to use our multitouch developments for X.org.
Here are a few hints.
See our multitouch devices page for
more information on known devices and their support.
First, the requirements:
- A multitouch-capable device
- A kernel that correctly handles the multitouch device
- An xserver 1.7.0 and above (with MPX inside)
- Tools to compile programs (automake, autoconf, gcc, xorg-devel, etc...)
- Time
Then, the files:
xf86-input-evdev.tar.bz2. Warning: this is not the latest version. The latest is available from Benjamin's git repository on freedesktop.
multitouchd.tar.bz2. Same warning as above.
How to compile:
- Download the files listed above.
- Unzip/tar them.
- In xf86-input-evdev (you must have the xorg-devel package installed):
- $> ./autogen.sh --prefix=/usr
- $> make
- $> su
- # make install
- Relaunch your X.org server. There must have been no changes, it still has to be ok. Otherwise, send me your /var/log/Xorg.0.log ;-)
- Now go to the multitouchd directory.
- be sure to have the following dependencies: libpng-devel, libxi-devel, libpixman-devel
- $> make
- If everything is ok, you should have two executables: multitouchd and multitouchctl.
Now, how to use it (at your own risks):
- If everything is ok, you could just run "./multitouchd" (the multitouch device should have been detected as an avdev one)
Beware that if you are not in a dir where there is the file null.png (a null image...), the program will not run. - You can check that the program is ready by calling "xinput list"
- If you are bored with the classic cursor, you also can use any png as an argument to change the cursors of the touches. (for instance: "./multitouchd my_wonderfull_cursor.png")
- To control the number of detected fingers, you can use the command multitouchctl with:
- $> ./multitouchctl n # with 0 < n &le 5 to activate n touch detections
- $> ./multitouchctl 0 # to come back to no more multitouch (very useful)
- To clean up the mess introduced by multitouchd, be sure to call "./multitouchctl 0" before interrupting multitouchd.
- Last but not least, GTK+ and Qt are not aware of Xi2 (unless you install some unstable branches) so sometimes (often) they may freeze. This is due to a grab of the wrong device and is not my fault...
Changelog:
- Wed Jul 23 11:44:35 CET 2010
- Introduced NUM_SUBDEVICES to change the default number of subdevices that are created.
- Correct segfaults when using devices that are declared in xorg.conf (thanks to Markus Jochim)
- Correct the creation of new subdevices when using devices that are declared in xorg.conf
Contact: tissoire at lii-enac.fr
Updated Mar 25, 2010.