Web Analytics
We support WINRAR [What is this] - [Download .exe file(s) for Windows]

CLASSICISTRANIERI HOME PAGE - YOUTUBE CHANNEL
SITEMAP
Audiobooks by Valerio Di Stefano: Single Download - Complete Download [TAR] [WIM] [ZIP] [RAR] - Alphabetical Download  [TAR] [WIM] [ZIP] [RAR] - Download Instructions

Make a donation: IBAN: IT36M0708677020000000008016 - BIC/SWIFT:  ICRAITRRU60 - VALERIO DI STEFANO or
Privacy Policy Cookie Policy Terms and Conditions
Linux Touch Screen HOWTO

Linux Touch Screen HOWTO

Christoph Baumann, cgb@debian.org

Oct 24, 2000


This document describes how to set up a touch screen input device under XFree86. As the author had only the opportunity to work with devices from EloTouch(R) and MicroTouch(R) this HOWTO is rather specific for these devices.

1. Which sort of devices are described here?

2. How to configure the device

3. Activating the device

4. Using touch screen and mouse in parallel

5. Suggested reading


1. Which sort of devices are described here?

This HOWTO concentrates on devices connected via the serial port i.e. /dev/ttyS0 or /dev/ttyS1.


2. How to configure the device

Touch screen devices are configured in the Xinput section in the XF86Config file (mostly /etc/X11/XF86Config or /etc/XF86Config). At first verify that the device driver modules exist. They are located in /usr/X11R6/lib/modules/ (the modules for the above mentioned devices are xf86Elo.so and xf86MuTouch.so). Now have a look into XF86Config. There should be a section looking like this:

Section "Files"
...
ModulePath "/usr/X11R6/lib/modules"
...
EndSection

To get the module loaded by the X server there has to be a section like this:

Section "Module"
Load "xf86Elo.so"
EndSection

Now the more tricky part. X needs to know some parameters about the device. The section for this looks like this (see "man XF86Config" for more details):

Section "Xinput"
 SubSection "Elographics"  
#the entry for a MicroTouch device would be SubSection "MicrotouchFinger"
  Port "/dev/ttyS1" # for a device at serial port 2
  DeviceName "TouchScreen" #could be any unambiguous name
  MinimumXPosition 300
  MaximumXPosition 3700
  MinimumYPosition 300
  MaximumYPosition 3700
  UntouchDelay 10 #not supported with MuTouch
  ReportDelay 10  #not supported with MuTouch
  AlwaysCore #activates the device on startup
 EndSubSection
EndSection

The values for the entries MinimumXPosition etc. are of course specific for the setup of the hardware (i.e. depend on the position of the touch screen relative to the monitor). The values determine where the points (0,0) and (xmax,ymax) on your monitor (xmax and ymax depend on the resolution chosen for the Xserver, such as 1024x768) are mapped on the touch screen. The device driver reads these values and interpolishes the other coordinates. For illustration:

 --------------touch screen area-----------------
 I                                              I
 I  ########visible monitor area##############  I
 I  #x                                       #  I
 I  # (0,0)                                  #  I
 I  # (MinimumXPosition,MinimumYPosition)    #  I
 I  #                                        #  I
 I  #                                        #  I
 I  #                                        #  I
 I  #                                        #  I
 I  #                                        #  I
 I  #                                        #  I
 I  #                                        #  I
 I  #     (MaximumXPosition,MaximumYPosition)#  I
 I  #                             (xmax,ymax)#  I
 I  #                                       x#  I
 I  ##########################################  I
 I                                              I
 ------------------------------------------------

This mapping can be done by trial and error or by reading the raw output of the device (needs some serial port programming, see "The Linux Serial Programming HOWTO"). For the types EloTouch and MicroTouch exists a rudimentary calibration tool (written by the author of this document, it can be found at ftp://metalab.unc.edu/pub/linux/X11/xutils/touchcal-0.1.tar.gz).


3. Activating the device

After starting X, type in an Xterminal the command

xsetpointer <devicename>

where<devicename> is the name defined in XF86Config with the line DeviceName ".....", in this example it would be TouchScreen.

To get the device working on startup use the AlwaysCore option in the touch screen section (see above)


4. Using touch screen and mouse in parallel

To use the touch screen and a mouse in parallel you need to enter the mouse specs in the Xinput-section. This definitions should be the same as in the Pointer-section. The following example is for a PS/2-mouse:

Section "Xinput" 
   SubSection "Mouse" 
      Protocol "PS/2" 
      Port "/dev/mouse" #could also be /dev/psaux 
      DeviceName "Mouse" 
      AlwaysCore 
   EndSubSection
...
EndSection 
Several people pointed this out, especially the usage of the AlwaysCore option. Thanks to them all.

5. Suggested reading


Static Wikipedia 2008 (no images)

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -

Static Wikipedia 2007 (no images)

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -

Static Wikipedia 2006 (no images)

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -

Sub-domains

CDRoms - Magnatune - Librivox - Liber Liber - Encyclopaedia Britannica - Project Gutenberg - Wikipedia 2008 - Wikipedia 2007 - Wikipedia 2006 -

Other Domains

https://www.classicistranieri.it - https://www.ebooksgratis.com - https://www.gutenbergaustralia.com - https://www.englishwikipedia.com - https://www.wikipediazim.com - https://www.wikisourcezim.com - https://www.projectgutenberg.net - https://www.projectgutenberg.es - https://www.radioascolto.com - https://www.debitoformtivo.it - https://www.wikipediaforschools.org - https://www.projectgutenbergzim.com