Ubuntu – How to disable touch screen on Ubuntu 17.10 permanently

touchscreen

My screen is cracked a little. It used to work all good in previous versions by xinput disable command but it did not work in this one.

How do I disable touch screen on Ubuntu 17.10 permanently?

Best Answer

  • You can add the below to one of your startup scripts

    xinput disable `xinput --list | grep -i "touch " | sed 's/id=//g' | cut -f2`
    

    The opposite will re-enable it

    xinput enable `xinput --list | grep -i "touch " | sed 's/id=//g' | cut -f2`
    

    Note that there is a space after "touch". This is to prevent the command from picking up the touchpad on your laptop!