Skip to main content

Disable touchpad in Linux

One of the first thing I do whenever I install a new OS is to disable the annoying touchpad on the laptop. I  don't know about other people, but my touchpad never lets me type a single sentence without moving the cursor to someplace I don't want.

The following works on Arch Linux. If your are using something else, your mileage may vary.

1) Find out the name of your touchpad device. Mine is "Elantech Touchpad".

bash $ xinput --list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ RAPOO RAPOO 5G Wireless Device id=11 [slave pointer (2)]
⎜ ↳ ETPS/2 Elantech Touchpad id=15 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Video Bus id=8 [slave keyboard (3)]
↳ Sleep Button id=9 [slave keyboard (3)]
↳ RAPOO RAPOO 5G Wireless Device id=10 [slave keyboard (3)]
↳ USB 2.0 UVC VGA WebCam id=12 [slave keyboard (3)]
↳ Asus WMI hotkeys id=13 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=14 [slave keyboard (3)]

2) Replace "Your touchpad here" in the following script with the name of your touchpad device.

#!/bin/bash
if [ $(xinput --list-props "Your touchpad here" | grep Enabled | gawk -F ':' '{ print $2 }') -eq 1 ]; then
xinput --set-prop "Your touchpad here" "Device Enabled" 0
else
xinput --set-prop "Your touchpad here" "Device Enabled" 1
fi

3) Make the bash script executable, run it and add it to your autostart list.
 
chmod +x trackpad-toggle.sh

4) Note that it is a toggle script. You can also assign a specific key binding to toggle touchpad on or off.

Comments

Popular posts from this blog

Open Documents Formats in MS Office

Open Document Format (ODF) is an open standard file format OpenOffice.org and others use. File extensions include .odt (text), .ods (spreadsheet), and .odp (presentation). By default, Microsoft Office does not open these file formats; however, it is possible with a plugin. For office 2003 users If you have Office 2003, Download and install the Sun ODF Plugin should just work.You can download the Sun ODF Plugin from here. P For office 2007 users First you need to Install Service Pack 1 for Office 2007. Install Sun ODF Plugin for Microsoft Office . Open ODT document via File > Open, or by double-clicking the ODT file and when prompted for the application to open it with, choose Word. If you don’t have administrator privileges to install software, you can try an online converter such as Zamzar or Media Convert . You can also upload ODT documents to Google Docs or Zoho Writer . If you want to open ODT documents locally but want to stay away from MS Office, try the lightweig...

Command Line SMS

Send SMS to any number in India via way2sms. https://github.com/samueljohnson/smsindia compile with: g++ smsindia.cxx -o smsindia -lcurl Not tested under windows! Update: The SMS API does not seem to work now a days!

Remove cftmon.exe permanently

Have you got MS Office installed? If so you may have noticed a little program in the task manager, under processes called cftmon.exe. Have you ever asked yourself....what the hell is it or...... have you removed it only to find it's back again..... It is a relatively easy removal and it will stay gone, just follow these steps. This pesky little program is related to speech recognition in MS Office. - Just open up Add/Remove programs from Control panel. - locate MS Office and click on Change - Click on Add/Remove features (and check mark "advanced customizations of features") - Expand Excel tab - Click on "text to speech" and select "Not Available" - Expand "Office Shared Features" - Click on "Alternative User Input" and select "Not Available" (this should remove both Speech and Handwriting) - Expand "Proofing Tools" under "Office Shared Features" and select under both French and Spanish "English - ...