0

I'm using a touchscreen in vertical position as a monitor and I need to run a script at startup, otherwise Ubuntu does not flip the touch interface to fit the vertical position of the monitor and the touchscreen is unusable as a result. As the idea is not to need either a mouse or a keyboard, I need to be able to run the script automatically at startup without any user interaction.

I tried all the ways I could find through Google to do it but none worked, probably because some of them referred to older Ubuntu versions. The last one I tried was this one:

https://linuxconfig.org/how-to-run-script-on-startup-on-ubuntu-20-04-focal-fossa-server-desktop

which looked promising. I did exactly what was shown, replacing the script with my script, but nothing happens at startup and I still have to run the .sh file from terminal manually to get proper touch screen calibration after startup.

Only the result matters, the method can be ugly, but I desperately need a way to make it work. I never thought it would be so complex and would require so much work to run a script at startup, and I'm way past my level of competence here.

funkypitt
  • 131
  • For the sake of completeness the script that I run is as follows:

    #!/bin/bash

    #portrait (left)

    xrandr -o left xinput set-prop "HID 27c0:0818" --type=float "Coordinate Transformation Matrix" 0 -1 1 1 0 0 0 0 1

    – funkypitt Jun 04 '20 at 07:46
  • and the steps I followed were:

    $ sudo nano /etc/systemd/system/flip.service book@book-fitlet2:~$ sudo nano /usr/local/bin/flip.sh book@book-fitlet2:~$ sudo chmod 744 /usr/local/bin/flip.sh book@book-fitlet2:~$ sudo chmod 664 /etc/systemd/system/flip.service book@book-fitlet2:~$ sudo systemctl daemon-reload book@book-fitlet2:~$ sudo systemctl enable flip.service Created symlink /etc/systemd/system/default.target.wants/flip.service → /etc/systemd/system/flip.service.

    – funkypitt Jun 04 '20 at 07:47

0 Answers0