| Rev | Author | # | Line |
|---|---|---|---|
| 1 | perry | 1 | Linux Touch Screen HOWTO |
| 2 | |||
| 3 | |||
| 4 | |||
| 5 | ---- | ||
| 6 | |||
| 7 | !!!Linux Touch Screen HOWTO | ||
| 8 | |||
| 9 | !!(c) 2002 by Christoph Baumann, cgb@debian.orgv2.1, Jan 11, 2002 | ||
| 10 | |||
| 11 | |||
| 12 | ---- | ||
| 13 | ''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 | ||
| 14 | from !EloTouch(R) and !MicroTouch(R) this HOWTO is rather specific for these | ||
| 15 | devices.'' | ||
| 16 | ---- | ||
| 17 | |||
| 18 | |||
| 19 | The GNU Free Documentation License applies to this document. | ||
| 20 | |||
| 21 | |||
| 22 | |||
| 23 | |||
| 24 | !!1. Which sort of devices are described here? | ||
| 25 | |||
| 26 | |||
| 27 | |||
| 28 | |||
| 29 | !!2. How to configure the device | ||
| 30 | |||
| 31 | |||
| 32 | |||
| 33 | |||
| 34 | !!3. Activating the device | ||
| 35 | |||
| 36 | |||
| 37 | |||
| 38 | |||
| 39 | !!4. Using touch screen and mouse in parallel | ||
| 40 | |||
| 41 | |||
| 42 | |||
| 43 | |||
| 44 | !!5. Configuration under XFree86 4 | ||
| 45 | |||
| 46 | |||
| 47 | |||
| 48 | |||
| 49 | !!6. Suggested reading | ||
| 50 | ---- | ||
| 51 | |||
| 52 | !!1. Which sort of devices are described here? | ||
| 53 | |||
| 54 | |||
| 55 | This HOWTO concentrates on devices connected via the serial port | ||
| 56 | i.e. /dev/ttyS0 or /dev/ttyS1. | ||
| 3 | DithiDitih | 57 | Some Usb support |
| 1 | perry | 58 | ---- |
| 59 | |||
| 60 | !!2. How to configure the device | ||
| 61 | |||
| 3 | DithiDitih | 62 | For USB%%% |
| 63 | If you have a USB touch screen you will need to insert the module | ||
| 64 | with modprobe or insmod and create the device with mknod (if not | ||
| 65 | using devfs) before the device is available.%%% | ||
| 66 | Ex. For egalax drivers%%% | ||
| 67 | modprobe tkusb (this creates /dev/usb/tkpanel0 and /dev/usb/tkpanel1) | ||
| 68 | Other usb drivers for microtouch and elo are similar.%%% | ||
| 69 | Note: this is *NOT* the device name to put in XF86Config, that would | ||
| 70 | be /dev/tkpanel0 or something simliar. You can check to see if it exists | ||
| 71 | and if it is correct if it has permissions crw--w--w-, the world writeable | ||
| 72 | device is for XF86Config, the world readable device is for the usb panel daemon | ||
| 73 | (in this case, tpaneld) to use in it's conf file.%%% | ||
| 74 | You will probably also need to be running a usb pnp daemon such as usbpnpd. | ||
| 1 | perry | 75 | |
| 76 | Touch screen devices are configured in the Xinput section in the XF86Config | ||
| 77 | file (mostly /etc/X11/XF86Config or /etc/XF86Config). | ||
| 78 | At first verify that the device driver modules exist. They are located in | ||
| 79 | /usr/X11R6/lib/modules/ (the modules for the above mentioned devices are | ||
| 80 | xf86Elo.so and xf86MuTouch.so). Now have a look into XF86Config. | ||
| 81 | There should be a section looking like this: | ||
| 82 | |||
| 83 | |||
| 84 | |||
| 85 | |||
| 86 | Section "Files" | ||
| 87 | ... | ||
| 88 | !ModulePath "/usr/X11R6/lib/modules" | ||
| 89 | ... | ||
| 90 | !EndSection | ||
| 91 | |||
| 92 | |||
| 93 | |||
| 94 | To get the module loaded by the X server there has to be a section like this: | ||
| 95 | |||
| 96 | |||
| 97 | |||
| 98 | |||
| 99 | Section "Module" | ||
| 100 | Load "xf86Elo.so" | ||
| 101 | !EndSection | ||
| 102 | |||
| 103 | |||
| 104 | |||
| 105 | Now the more tricky part. X needs to know some parameters about the device. | ||
| 106 | The section for this looks like this (see "man XF86Config" for more details): | ||
| 107 | |||
| 108 | |||
| 109 | |||
| 110 | |||
| 111 | Section "Xinput" | ||
| 112 | !SubSection "Elographics" | ||
| 113 | #the entry for a !MicroTouch device would be !SubSection "!MicrotouchFinger" | ||
| 114 | Port "/dev/ttyS1" # for a device at serial port 2 | ||
| 115 | !DeviceName "!TouchScreen" #could be any unambiguous name | ||
| 116 | MinimumXPosition 300 | ||
| 117 | MaximumXPosition 3700 | ||
| 118 | MinimumYPosition 300 | ||
| 119 | MaximumYPosition 3700 | ||
| 120 | !UntouchDelay 10 #not supported with !MuTouch | ||
| 121 | !ReportDelay 10 #not supported with !MuTouch | ||
| 122 | !AlwaysCore #activates the device on startup | ||
| 123 | !EndSubSection | ||
| 124 | !EndSection | ||
| 125 | |||
| 126 | |||
| 127 | |||
| 128 | The values for the entries MinimumXPosition etc. are of course specific | ||
| 129 | for the setup of the hardware (i.e. depend on the position of the touch | ||
| 130 | screen relative to the monitor). The values determine where the points (0,0) | ||
| 131 | and (xmax,ymax) on your monitor (xmax and ymax depend on the resolution | ||
| 132 | chosen for the Xserver, such as 1024x768) are mapped on the touch screen. | ||
| 133 | The device driver reads these values and interpolishes the other coordinates. | ||
| 134 | For illustration: | ||
| 135 | |||
| 136 | |||
| 137 | |||
| 138 | |||
| 139 | --------------touch screen area----------------- | ||
| 140 | I I | ||
| 141 | I ########visible monitor area############## I | ||
| 142 | I #x # I | ||
| 143 | I # (0,0) # I | ||
| 144 | I # (MinimumXPosition,MinimumYPosition) # I | ||
| 145 | I # # I | ||
| 146 | I # # I | ||
| 147 | I # # I | ||
| 148 | I # # I | ||
| 149 | I # # I | ||
| 150 | I # # I | ||
| 151 | I # # I | ||
| 152 | I # (MaximumXPosition,MaximumYPosition)# I | ||
| 153 | I # (xmax,ymax)# I | ||
| 154 | I # x# I | ||
| 155 | I ########################################## I | ||
| 156 | I I | ||
| 157 | ------------------------------------------------ | ||
| 158 | |||
| 159 | |||
| 160 | |||
| 161 | This mapping can be done by trial and error or by reading the raw output | ||
| 162 | of the device (needs some serial port programming, see "The Linux Serial | ||
| 163 | Programming HOWTO"). For the types !EloTouch and !MicroTouch exists a | ||
| 164 | rudimentary calibration tool (written by the author of this document, | ||
| 165 | it can be found at | ||
| 166 | ftp://metalab.unc.edu/pub/linux/X11/xutils/touchcal-0.1.tar.gz). | ||
| 167 | ---- | ||
| 168 | |||
| 169 | !!3. Activating the device | ||
| 170 | |||
| 171 | |||
| 172 | After starting X, type in an Xterminal the command | ||
| 173 | |||
| 174 | |||
| 175 | xsetpointer <devicename> | ||
| 176 | |||
| 177 | |||
| 178 | where<devicename> is the name defined in XF86Config | ||
| 179 | with the line | ||
| 180 | !DeviceName ".....", in this example it would be !TouchScreen. | ||
| 181 | |||
| 182 | |||
| 183 | To get the device working on startup use the !AlwaysCore option in | ||
| 184 | the touch screen section (see above) | ||
| 185 | ---- | ||
| 186 | |||
| 187 | !!4. Using touch screen and mouse in parallel | ||
| 188 | |||
| 189 | |||
| 190 | To use the touch screen and a mouse in parallel you need to enter the | ||
| 191 | mouse specs in the Xinput-section. This definitions should be the same | ||
| 192 | as in the Pointer-section. The following example is for a | ||
| 193 | PS/2-mouse: | ||
| 194 | |||
| 195 | Section "Xinput" | ||
| 196 | !SubSection "Mouse" | ||
| 197 | Protocol "PS/2" | ||
| 198 | Port "/dev/mouse" #could also be /dev/psaux | ||
| 199 | !DeviceName "Mouse" | ||
| 200 | !AlwaysCore | ||
| 201 | !EndSubSection | ||
| 202 | ... | ||
| 203 | !EndSection | ||
| 204 | |||
| 205 | Several people pointed this out, especially the usage of the | ||
| 206 | !AlwaysCore option. Thanks to them all. | ||
| 207 | ---- | ||
| 208 | |||
| 209 | !!5. Configuration under XFree86 4 | ||
| 210 | |||
| 211 | |||
| 3 | DithiDitih | 212 | (from Lee Monamy, modified by dithi) |
| 1 | perry | 213 | |
| 214 | |||
| 215 | Example XF86Config-4 for an ELO touch screen: | ||
| 3 | DithiDitih | 216 | (Many distros now ship with XF86Config-4 named simply XF86Config. |
| 217 | The syntax is the same.) | ||
| 1 | perry | 218 | |
| 219 | |||
| 220 | |||
| 221 | Section "!InputDevice" | ||
| 222 | Identifier "ELO touchscreen" | ||
| 223 | Driver "elographics" | ||
| 224 | Option "Device" "/dev/ttyS0" | ||
| 225 | Option "MinimumXPosition" "300" | ||
| 226 | Option "MaximumXPosition" "3700" | ||
| 227 | Option "MinimumYPosition" "300" | ||
| 228 | Option "MaximumYPosition" "3700" | ||
| 229 | Option "!UntouchDelay" "10" | ||
| 230 | Option "!ReportDelay" "10" | ||
| 231 | Option "!SendCoreEvents" "yes" | ||
| 232 | !EndSection | ||
| 233 | |||
| 234 | |||
| 235 | |||
| 236 | Noteable differences between this and the version 3 config are that you | ||
| 237 | specify a Device, *not* a Port, otherwise you get an error. | ||
| 238 | Also, !AlwaysCore from v3 has been replaced with !SendCoreEvents. | ||
| 239 | |||
| 240 | |||
| 241 | You must also add to the !ServerLayout section, despite that X might | ||
| 242 | say: | ||
| 243 | "(II) XINPUT: Adding extended input device "TOUCHSCREEN" (type: | ||
| 244 | Elographics Touch Screen)" | ||
| 245 | |||
| 246 | |||
| 247 | |||
| 248 | |||
| 249 | Section "!ServerLayout" | ||
| 250 | Identifier "Default Layout" | ||
| 251 | Screen "Default Screen" | ||
| 252 | !InputDevice "Generic Keyboard" | ||
| 253 | ... | ||
| 254 | !InputDevice "ELO touchscreen" | ||
| 255 | !EndSection | ||
| 256 | |||
| 3 | DithiDitih | 257 | ---- |
| 258 | For egalax touch screen users | ||
| 259 | !InputDevice "TKPANEL" | ||
| 260 | |||
| 261 | Section "!InputDevice" | ||
| 262 | Identifier "TKPANEL" | ||
| 263 | Driver "touchkit" | ||
| 264 | Option "Device" "/dev/tkpanel0" | ||
| 265 | Option "!SendCoreEvents" "yes" | ||
| 266 | !EndSection | ||
| 1 | perry | 267 | ---- |
| 268 | |||
| 269 | !!6. Suggested reading | ||
| 270 | |||
| 271 | |||
| 272 | |||
| 273 | |||
| 274 | |||
| 275 | ****Manpage for XF86Config | ||
| 276 | **** | ||
| 277 | |||
| 278 | **** | ||
| 279 | http://www.elotouch.com/Support/linux.asp | ||
| 280 | **** | ||
| 281 | |||
| 282 | **** | ||
| 283 | http://www.microtouch.com/mthtml/05a1_drivers.htm | ||
| 284 | **** | ||
| 285 | |||
| 286 | **** | ||
| 287 | http://www.hof-berlin.de/tablet/tablet.html (Thanks to | ||
| 288 | Christer Olofsson for sending me this URL) | ||
| 289 | **** | ||
| 290 | |||
| 291 | ****The manual shipped with your touch screen :-) | ||
| 292 | **** | ||
| 293 | |||
| 294 | ---- |
lib/blame.php:177: Warning: Invalid argument supplied for foreach()
lib/blame.php (In template 'html'):177: Warning: Invalid argument supplied for foreach()
lib/plugin/WlugLicense.php (In template 'html'):99: Warning: Invalid argument supplied for foreach()