niceTouch is a tool to “Easily calibrate multiple touch and non touch screens on a single linux system.”
This is to address the issue on multi-display Linux desktops where the touch panel is automatically calibrated to operate over all of the displays, and even if you get the calibration right, it’s then wrong again when you add or remove displays.
For now, it works by keeping track of what touch and display devices are added and removed at any given time, and matching them up accordingly. This is done by running the command between each change, and again in the final state. But I want to turn this into a user-space service that listens to DBUS (for example) very soon. At that point the user will be able to simply plug stuff in, and it be calibrated correctly very soon (The time it takes for getting the event, and the correct information about the new state being reported. Associating stuff is computationally easy.)
If there is more than one device that has been added between runs, it guesses based on device ordering (for reasons I won’t go into in this post (but let me know if you’re interested), that is only slightly better than flipping a coin.) Depending how necessary it seems at the time, I’m keen to improve the guessing. One way to do this would be to maintain a database of display/touchpanel combinations that are common. This will help when people plug in external touch panels, but won’t be better for devices where the are multiple devices of the same make and model. As we strike those cases, we can look at the best way to solve them. Eg meta infomation.
Knowledge is persisted, so subsequent boots will work just fine with everything plugged in.
If you google around for how to calibrate a touch screen to a specific display in a multi-display setup, there are lots of results telling you to get information about the screen from xrandr, do some calculations, stick them in to a long line in xinput. It’s fiddly, but it works. This was actually what I intended to automate, but when I did my research this most recent time, the page where I normally got information for this now talks about using --map-to-output
to map to a particular device. This isn’t persistant, but is substantially easier than the old way.
If you think this might be helpful to you, or you think you know someone who might benefit from this, feel free to use it. If you have improvements, feel free to create pull requests. If you have suggestions, but not the ability to do them, feel free to raise issues.
More * Known good releases. * Repo.
NOTE: This page has moved from FunnyHacks.com/niceTouch.