A touchscreen calibration utility

Download here

touchcal (c) 1999, 2002, 2004 by Christoph Baumann <>
         (c) 2006                Daniel Drake <>

Current maintainer
Daniel Drake <>

This software is only 'loosely maintained' - I fixed it up to work with my
elo screens and don't really plan to advance it further. If anyone has a
serious interest in taking this software further, I will readily hand over

Cleanups, fixes and enhancements are welcome - please email me unified diffs
(patches). If your work has a degree of sanity I will give you commit access.

Testing with mutouch screens is also much appreciated as I don't have any of


touchcal was originally developed by Christoph Baumann and hosted on his
personal website. In 2006, Daniel Drake moved the project to sourceforge to
make it easier for potential future maintainers to take over the project.


Development happens in sourceforge SVN. See the sourceforge project page for 
more info.


As it is already stated in COPYING, there is NO WARRANTY for any damage
caused by a malfunction of this program. Users of MicroTouch touch screens
are informed that the program rewrites the ROM of the MicroTouch controller.
As this rewrite uses an undocumented command which may be changed in later
versions of the firmware it may cause irreparable damage to the controller.
The author also doesn't have any access to touch screen devices any more.
So please don't send me complaints except bug reports which also may not be
solved - Sorry.


touchcal is a tool to simplify the process of configuring X to work with your

Supported Hardware
 - EloGraphics(R) IntelliTouch E281-2310 (serial)
 - MicroTouch(R) SMT3 (serial)

No USB touchscreens are supported at this time, but patches to support
different configurations and new hardware are very welcome.


As well as a standard build environment, the ncurses library is required.
See INSTALL for compilation/installation instructions.

What the program does

The program initializes the controller. Then it reads in 3 coordinates from the
touch screen (see below) and calculates the appropriate values for the entries
in XF86Config. It prints the result to STDOUT and also writes them to a file.


touchcal needs to be run as root and with no Xserver running. As you can guess
by now, it needs to be run in console mode. To allow the use of the coordinates
obtained in console mode under X, the borders of the monitor display of these
two modes need to be exactly the same. This is rather easy with LCD displays.
With CRTs this is more or less hopeless :-(.
touchcal requires two parameters. First the device type:
'e' for EloGraphics, 'm' for MicroTouch. Then the serial port to which the 
device is connected: e.g. /dev/ttyS1 .
For example to calibrate a MicroTouch touch screen connected to serial port 2:
touchcal m /dev/ttyS1


After invoking touchcal correctly 3 cross-hair-like markers are displayed, one
after another. Each marker must be touched from the position of normal use. 
Don't be hasty. The more exact you touch the markers the better the 
calibration. After the three markers are touched, touchcal writes the entries 
for xorg.conf to STDOUT and into the file /tmp/touchcal.tmp. This output could
then be inserted into XF86Config by a shell script. If you use a MicroTouch
device there are additional information printed to STDOUT stating what
cruelties the program does to the touch screen controller.


* touchcal only works with the above stated models 
* the console - X discrepancy

Further information

* official touchcal homepage
* sourceforge project page:
* manpage for xorg.conf
* XFree86-Touch-Screen-HOWTO
* the manuals and homepages of the manufacturers Logo