Hello, GUIX users. No packages/script for touchscreen calibration
I wish I could get at least one package or script for touchscreen calibration. Calibration is needed in cases when the touchscreen is given incorrect coordinates. The cursor is not directed where you want it to be. The calibration program is designed to set the real coordinates for the touchscreen when the screen is rotated, otherwise it will not work properly. Unfortunately, there is no package for such calibration for GUIX. There is not much need for this, although there is a small group of 2-1 devices running Linux well. And GUIX has a built-in service xinputattach for touchscreen/stylus support. Let's make the workable one. There are several programs for such calibration. The classic is xinput_calibrator, the simpler is python based xcalibrate. I managed to get python 238 lines of code script "xcalibrate" from https://github.com/reinderien/xcalibrate/blob/main/xcalibrate what was provided by creator as is. It requires python3 and numpy as dependencies. So installed their: guix install python, guix install python-numpy. And let's run it by calling ./xcalibrate from script's folder. The problem is that the script calls another program xinput. It tries find xinput into /usr/bin/xinput because it thinks that we have usual Linux. And the paths in GUIX are not like in regular Linux. No we are on GUIX. Output with error: FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/xinput' It is necessary to edit the source code for running under GUIX. So edited path to xinput in guixstyle to /gnu/store/80bw6m....-xinput-1.6.4/bin/xinput. But this is not only problem with path. File contains bits of code which are calling tkinter (Tk) and math python modules. def show_tk(n_points, old_cal_inv, new_cal=None): from tkinter import Tk, Canvas from math import ceil, sqrt Looks like needed Tk package. Installed tk package: guix package install tk But it python can't find it. Python unable to find this Tk ->tkinter under GUIX. Here is output with error: Traceback (most recent call last): File "/home/user1/downloads/xcalibrate/./xcalibrate", line 306, in <module> main() File "/home/user1/downloads/xcalibrate/./xcalibrate", line 287, in main points = show_tk(n_points, old_cal_inv) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/user1/downloads/xcalibrate/./xcalibrate", line 100, in show_tk from tkinter import Tk, Canvas File "/gnu/store/c5qarpvwzcz1idryvvpiqd7738jn4rs1-python-3.11.11/lib/python3.11/tkinter/__init__.py", line 38, in <module> import _tkinter # If this fails your Python may not be configured for Tk Please help python find this tkinter in GUIX. Thanks.
