#!/bin/sh export DISPLAY=:0 # rotate the screen # xrandr -o left xrandr -o right # xrandr -o inverted # This is to invert the touch panel for the touchscreen to work as intented !! # https://askubuntu.com/questions/368317/rotate-touch-input-with-touchscreen-and-or-touchpad # https://wiki.ubuntu.com/X/InputCoordinateTransformation # I used the idea from the 1st link and adjusted for the "Right rotate" in the 2nd. xinput set-prop 9 --type=float "Coordinate Transformation Matrix" 0 1 0 -1 0 1 0 0 1