Disable the TinkPad touch screen in Ubuntu

Originally having a touch screen is a fun thing, but the screen is cracked, causing frequent automatic clicks and affecting normal use. After installing Ubuntu, I searched for a long time and finally found a working solution. The main idea is to use ***xinput to disable the driver to solve ***, the disadvantage is that it fails after shutdown.

The environment used here:

xinput

1. Type xinput in the terminal

Find the name of the touch screen in the list of input devices listed. Here is SYNAPTICS Synaptics Touch Digitizer V04 and its id: 14.

note:

2、 Set the enabled attribute of the touch screen to 0, disable the touch screen###

xinput set-prop 14"Device Enabled"0

3、 View the list of touch screen attributes###

xinput list-props 14

Configure automatic execution at boot##

It is obviously very troublesome to configure the above settings manually every time you start it. At this time, we can completely set it up automatically by writing a shell script and loading it on boot.

Create sh script###

Created here in the /home/windcoder/documents/ss directory

vi disableTouch.sh

Enter in the file:

#! /bin/bash

# Disable desktop touch screen

DESKTOP_DEV='SYNAPTICS Synaptics Touch Digitizer V04'

HAVE_DISKTOP_TOUCH=`xinput list | grep "$DESKTOP_DEV"`if["$HAVE_DISKTOP_TOUCH"!=""];
then
 echo "The touch screen starts to turn off"if[`xinput list-props "$DESKTOP_DEV" | grep "Device Enabled" | awk  -F ':' '{print $2}'`==1]; 
 then
  echo "The touch screen is turning off"
  xinput set-prop "$DESKTOP_DEV"'Device Enabled'0
  echo "The touch screen is turned off successfully!"else
  echo "Shutdown failed. . ."
 fi
else
 echo "Program closed"
fi
echo "Completely over"

The echo statement in the script can be deleted, and it is only added here to test the script.

Configure boot

Use in the terminal:

sudo vi /etc/profile

Add at the end:

. /home/windcoder/documents/sh/disableTouch.sh

Save and exit, and finally execute the following:

source /etc/profile

Restart at this time to find that the corresponding driver has been automatically disabled.

References##

How to disable the ASUS S550C touch screen in Ubuntu

Recommended Posts

Disable the TinkPad touch screen in Ubuntu
The locate file search command in Ubuntu16.04
Docker those things in the Ubuntu environment
How to make the ubuntu virtual machine in vmware display in full screen
How to open the ubuntu system in win10
The consequences of uninstalling python in ubuntu, very
Introduction to the use of Hanlp in ubuntu
Mount the disk in a directory under Ubuntu 18.04
The difference between CentOS and Ubuntu in Linux system
Resolve the problems encountered in the linux environment under ubuntu
Install mysql-pytho in Ubuntu
Nagios3 in ubuntu serve
Use supervisor in ubuntu
Ubuntu Touch environment setup
Install python in Ubuntu
Install JDK in Ubuntu19.10
Ubuntu 12.04 disable guest session
How to control the ubuntu system in win10 through ssh
Mac uses vnc to remotely log in to the ubuntu16.04 desktop
Detailed steps to automatically set the line number in ubuntu16.04
Encountered in the process of building a virtual environment in ubuntu