Reputation: 557
I am trying out the eGalax touch screen driver for my touch screen, as an alternative to the evdev/xinput_calibrator combination.
The calibration tool that comes with the eGalax driver, TKCal, takes the device to which the touch screen is connected as a command line argument.
Now I would like to start the calibration tool from a bash script. Is there some smart way to determine the device within the script, instead of hard coding "/dev/hidraw0" as in this example:
TKCal /dev/hidraw0 Cal
I presume that I can't rely on the touch screen landing on hidraw0 every time, can I? If I run my software on a different system, with a mouse and a keyboard and touch screen, I guess I have to handle that the devices can be conneted to different hdrawX devices. Please correct me if I am wrong.
Thank you very much! /Fredrik Israelsson
Upvotes: 1
Views: 2659
Reputation: 557
The guys developing the eGalax drive told be to try a much simpler solution: Write a udev rule that will map the touch screen to a device name of my choice.
Upvotes: 0
Reputation: 119847
Try looking at /sys/class/hidraw/hidraw*/device/uevent
.
Upvotes: 3