Choose style:

Author Topic: Itronix Go Book VR1 IX600 Touchscreen  (Read 500 times)

0 Members and 1 Guest are viewing this topic.

Offline ebayironman

  • nOOb
  • *
  • Posts: 7
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): 10
Itronix Go Book VR1 IX600 Touchscreen
« on: November 10, 2019, 03:11:29 pm »
I have a couple of these old hardened Cop Car laptops.
Not powerful enough for modern Windoze, but I have tried several linux distros on them and have found Peppermint 10 32 bit to run very well, and finds all the hardware so far, except for the pen based touchscreen.
I can get it to work with information from: https://wiki.ubuntu.com/Touchscreen
Using inputattach and xinput-calibrator manually, it is very accurate and responsive single touch input, and will be helpful for the use I have in mind, IE: OpenCPN chartplotter navigation.
Units have a builtin GPS as well, and that is another story.
So, I have tried various methods to get the inputattach and the calibration settings to autostart for all users, to no avail.
I see references to rc.local, but I don't think that is right for Bionic.
So does anyone know the proper way to autostart the inputattach and calibration for this Touch Screen?
I think I need something like:
Code: [Select]
/usr/bin/inputattach --daemon --always -t213 /dev/ttyS4
exit 0
  to autorun as a system application or daemon.
And I need to get the calibration details to the system at startup as well, as mentioned in the ubuntu wiki article.
Anybody know right places to put this code?

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26468
  • Karma: 2864
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Itronix Go Book VR1 IX600 Touchscreen
« Reply #1 on: November 10, 2019, 03:21:30 pm »
If you reboot the laptop (so touchscreen is NOT working)....

Then you open a terminal and run:
Code: [Select]
/usr/bin/inputattach --daemon --always -t213 /dev/ttyS4
does the touchscreen start working ?
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline ebayironman

  • nOOb
  • *
  • Posts: 7
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): 10
Re: Itronix Go Book VR1 IX600 Touchscreen
« Reply #2 on: November 10, 2019, 03:42:42 pm »
No, without sudo at the beginning of the command it will fail with access denied.
if i do
Code: [Select]
sudo /usr/bin/inputattach --daemon --always -t213 /dev/ttyS4 
it will ask for password, complete and then the touchscreen works and is calibrated wrong.  have to do the calibration to get it working correctly, basically the vertical is 180 degrees off.
if i do the
Code: [Select]
xinput_calibrator --output-type xinput
, then it functions flawlessy, until I logoff or restart etc.
« Last Edit: November 10, 2019, 05:30:34 pm by ebayironman »

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26468
  • Karma: 2864
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Itronix Go Book VR1 IX600 Touchscreen
« Reply #3 on: November 10, 2019, 05:58:15 pm »
[EDIT]

Please answer this question before proceeding below

When you run:
Code: [Select]
xinput_calibrator --output-type xinput
what happens ? .. are you prompted to do anything, or does the command just complete ?

Do not continue below before answering the question above (the script below may be wrong).

[END EDIT]

Okay first let's create a shell script in say /opt:
Code: [Select]
gksudo xed /opt/setup-my-touchscreen.sh
when a blank file opens in the text editor, make it read:-
Code: [Select]
#!/bin/sh -e

/usr/bin/inputattach --daemon --always -t213 /dev/ttyS4
/usr/bin/xinput_calibrator --output-type xinput

exit 0
SAVE the file and exit the text editor.

Back in the terminal, make the shell script you just created executable with:
Code: [Select]
sudo chmod +x /opt/setup-my-touchscreen.sh

Okay, now in the main menu go to:-

Menu > Settings > Default applications for LXSession

Choose the "Autostart" tab.

Next to the [+Add] button enter:
Code: [Select]
/opt/setup-my-touchscreen.sh
then click the [+Add] button.
« Last Edit: November 11, 2019, 07:09:21 am by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline ebayironman

  • nOOb
  • *
  • Posts: 7
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): 10
Re: Itronix Go Book VR1 IX600 Touchscreen
« Reply #4 on: November 11, 2019, 01:28:13 am »
Please answer this question before proceeding below

When you run:
Code: [Select]
xinput_calibrator --output-type xinput
what happens ? .. are you prompted to do anything, or does the command just complete ?
The command brings up a GUI with the calibration page.  I can click the dots, and it proceeds through and leaves with the calibration code on the screen.

And yes, I thought of this method, creating a script and get it to run at startup.  The  actual commands that need to be in the startup are:
Code: [Select]
/usr/bin/inputattach --daemon --always -t213 /dev/ttyS4
Code: [Select]
xinput set-int-prop "Sahara Touch-iT213 Serial TouchScreen" "Evdev Axis Calibration" 32 25 1935 1896 57
That attaches and calibrates the screen.
BUT: it doesn't seem to run unless with  sudo on the first line.
Can't seem to get around running as su.

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26468
  • Karma: 2864
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Itronix Go Book VR1 IX600 Touchscreen
« Reply #5 on: November 11, 2019, 07:08:57 am »
Okay let's try it a little differently then...

Run:
Code: [Select]
gksudo xed /usr/bin/setup-my-touchscreen.sh
and make it read
Code: [Select]
#!/bin/sh -e

/usr/bin/inputattach --daemon --always -t213 /dev/ttyS4
/usr/bin/xinput set-int-prop "Sahara Touch-iT213 Serial TouchScreen" "Evdev Axis Calibration" 32 25 1935 1896 57

exit 0
Save the file and exit the text editor.

Make it executable
Code: [Select]
sudo chmod +x /usr/bin/setup-my-touchscreen.sh
next let's make an autostart launcher
Code: [Select]
gksudo xed /etc/xdg/autostart/setup-my-touchscreen.desktop
and when a blank file opens, make it read
Code: [Select]
[Desktop Entry]
Name=setup-my-touchscreen
Comment=Configure my touchscreen.
Exec=/usr/bin/setup-my-touchscreen.sh
Icon=input-touchpad
Terminal=false
Type=Application
Categories=GTK;GNOME;Settings;
StartupNotify=false
NoDisplay=true
SAVE the file and exit the text editor.

Log off/on (or reboot) to test.



You may need to put a short delay in the script .. as in
Code: [Select]
#!/bin/sh -e

sleep 5
/usr/bin/inputattach --daemon --always -t213 /dev/ttyS4
/usr/bin/xinput set-int-prop "Sahara Touch-iT213 Serial TouchScreen" "Evdev Axis Calibration" 32 25 1935 1896 57

exit 0
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline ebayironman

  • nOOb
  • *
  • Posts: 7
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): 10
Re: Itronix Go Book VR1 IX600 Touchscreen
« Reply #6 on: November 13, 2019, 09:39:22 am »
Tried this approach, and no sign of it working, on logon. or reboot and logon, there is no sign of the touchscreen driver at all., no touch works.
when I run the setup-my-touchscreen.sh script, in a terminal without sudo, I get an error
Code: [Select]
inputattach: can't set line discipline
And no sign of TS activity.
If i run the command with sudo it completes, but only seems to be attaching the screen, not running the xinput calibration line.
I appreciate your assistance, and will continue seeking a solution, in my spare time, haha.

Offline ebayironman

  • nOOb
  • *
  • Posts: 7
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): 10
Re: Itronix Go Book VR1 IX600 Touchscreen
« Reply #7 on: November 14, 2019, 09:38:37 am »
I got the inputattach to run from a line in /etc/rc.local
It may not be there by default, but if you create the folder and file, and make rc.local executable, it works just like older versions.
So a simple line in rc.local gets the inputattach to work.
However xinput is an Xwindows thing, and won't complete unless X is already loaded.
So the best I could get was to connect using rc.local
Just a single line:
Code: [Select]
/usr/bin/inputattach --daemon --always -t213 /dev/ttyS4
And then created a launcher to run the xinput command to set the calibration:
Code: [Select]
/usr/bin/xinput set-int-prop "Sahara Touch-iT213 Serial TouchScreen" "Evdev Axis Calibration" 32 25 1935 1896 57
  Which I manually run each boot.
Not what originally wanted, but 80% perfect.
For what I am doing, this will suffice.
But my thoughts along the way were:  This is why people use Windows.  It just works.  Of course this old beast wouldn't run worth a damn on Win10. 
It flies on Peppermint 10.  OpenCPN works well, the GPS loads automatically, so for what I need, this is a good solution, nonetheless.
thanks for all assistance.

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26468
  • Karma: 2864
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Itronix Go Book VR1 IX600 Touchscreen
« Reply #8 on: November 14, 2019, 10:47:18 am »
But my thoughts along the way were:  This is why people use Windows.  It just works.  Of course this old beast wouldn't run worth a damn on Win10.

Until you find a piece of hardware that doesn't work, or is no longer supported in Windows .. at which point you're completely without options.



So basically you want a script that runs
Code: [Select]
sudo /usr/bin/xinput set-int-prop "Sahara Touch-iT213 Serial TouchScreen" "Evdev Axis Calibration" 32 25 1935 1896 57
started AFTER the desktop comes up .. and without requiring or prompting for a password ?
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline ebayironman

  • nOOb
  • *
  • Posts: 7
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): 10
Re: Itronix Go Book VR1 IX600 Touchscreen
« Reply #9 on: November 16, 2019, 01:08:02 am »
The xinput command completes successfully as a standard user, no need for sudo.
I have created a desktop application launcher called CalTouch, pointing it at
Code: [Select]
/usr/bin/xinput set-int-prop "Sahara Touch-iT213 Serial TouchScreen" "Evdev Axis Calibration" 32 25 1935 1896 57
This runs fine when double clicked on.
Is not persistent on logoff/logon, but the touchscreen is still attached, have to run CalTouch at each user logon for TS to be calibrated correctly.
I tried adding that launcher to the manual autostart settings in LXSession configuration.  It doesn't launch automatically on logon.
But am very close, and this is functional at the moment.
Thanks again for your valued input.

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26468
  • Karma: 2864
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Itronix Go Book VR1 IX600 Touchscreen
« Reply #10 on: November 16, 2019, 08:36:49 am »
The following assumes your username is mark .. adjust as necessary

Okay lets allow you to run:
Code: [Select]
/usr/bin/inputattach <any options>
without being prompted for a password.

First let's backup /etc/sudoers .. run:
Code: [Select]
sudo cp -v /etc/sudoers /etc/sudoers.original
now open /etc/sudoers for editing
Code: [Select]
gksudo xed /etc/sudoers
and add these 3 new lines at the bottom:-
Code: [Select]
# BEGIN - Allow user mark to run inputattach without requiring a password when 'sudo' is used.
mark ALL = NOPASSWD: /usr/bin/inputattach
# END - Allow user mark to run inputattach without requiring a password when 'sudo' is used.
(remember to change all 3 instances of 'mark' to your username)
SAVE the file and exit the text editor.

You should now be able to run:
Code: [Select]
sudo /usr/bin/inputattach --daemon --always -t213 /dev/ttyS4 
without being prompted for a password.



Now create a script at /home/<username>/.setup-my-touchscreen.sh
Code: [Select]
xed ~/.setup-my-touchscreen.sh
and make it read
Code: [Select]
#!/bin/sh -e

sudo /usr/bin/inputattach --daemon --always -t213 /dev/ttyS4
/usr/bin/xinput set-int-prop "Sahara Touch-iT213 Serial TouchScreen" "Evdev Axis Calibration" 32 25 1935 1896 57

exit 0
SAVE the file and exit the text editor.

Make that script executable
Code: [Select]
chmod +x ~/.setup-my-touchscreen.sh
okay, now let's test it.

REBOOT.

Once rebooted, run:
Code: [Select]
~/.setup-my-touchscreen.sh
did the touchscreen start to work ?

If so, create an autostart .desktop launcher to run that script after logging on
Code: [Select]
xed ~/.config/autostart/setup-my-touchscreen.desktop
and when a blank file opens make it read
Code: [Select]
[Desktop Entry]
Name=setup-my-touchscreen
Comment=Configure my touchscreen.
Exec=/home/mark/.setup-my-touchscreen.sh
Icon=input-touchpad
Terminal=false
Type=Application
Categories=GTK;GNOME;Settings;
StartupNotify=false
NoDisplay=true
(remember to change 'mark' to your username)
SAVE the file, and exit the text editor.

Reboot to test.

If the command worked, but it still didn't autostart after a reboot, we may need to add a small delay to the command in the .desktop file .. just let me know if the command worked, but it still didn't autostart
« Last Edit: November 16, 2019, 08:38:55 am by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline ebayironman

  • nOOb
  • *
  • Posts: 7
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): 10
Re: Itronix Go Book VR1 IX600 Touchscreen
« Reply #11 on: November 16, 2019, 06:51:12 pm »
That works.
Initially when executing the script from terminal prior to deployment, I did get a failure on xinput command.
I added .5 second sleep and it worked perfectly.
Created the autostart launcher and all is well.
This is what the final working script looks like:
Code: [Select]
#!/bin/sh -e

sudo /usr/bin/inputattach --daemon --always -t213 /dev/ttyS4
sleep .5
/usr/bin/xinput set-int-prop "Sahara Touch-iT213 Serial TouchScreen" "Evdev Axis Calibration" 32 25 1935 1896 57

exit 0

Thanks PCNetSpec.  No one can call you a quitter...

Hopefully others will get benefit from our efforts.

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26468
  • Karma: 2864
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Itronix Go Book VR1 IX600 Touchscreen
« Reply #12 on: November 16, 2019, 10:47:37 pm »
You're welcome, glad I could help :)
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec