Enable and Disable TouchPad

This post is to enable or disable touch pad in your laptop/netbook etc…

First install xinput module with following command

$ sudo apt-get install xinput

Now get details of your touch pad

$ egrep -i 'synap|alps|etps' /proc/bus/input/devices


N: Name=”SynPS/2 Synaptics TouchPad”

In above example your TouchPad name is “SynPS/2 Synaptics TouchPad“, depending on your hardware your touch pad name my differ form this.

To disable touch pad use following commad

$ xinput --set-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 0

To enable touch pad command is

$ xinput --set-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 1

I think it will be hard to remember above commands. The best way is to configure alias for both commands in your .bashrc.

Just add following 2 lines in your .bashrc

alias touchpaddisable='xinput --set-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 0'

alias touchpadenable='xinput --set-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 1'

Now compile your bashrc as shown below.

$ . .bashrc

After updating .bashrc you can use touchpaddisable to disable touch pad and touchpadenable to enable touch pad.


8 comments on “Enable and Disable TouchPad

  1. Thank you — not only do your instructions solve the problem, but they are also crystal-clear! As a technical writer and devoted (though non-technical) Debian Linux user, I only wish that everyone discussing Linux wrote as well as you do.

    The only problem I’m having is that in order to get your solution to work consistently, I have to open a root terminal and re-compile .bashrc every time I wish to employ your solution. Is there any way I can permanently enable/disable the touchscreen? Is my problem simply that I’m not re-compiling correctly?

    I’d greatly appreciate your help on this. Thank you.


    • Idge,

      It wont require any root permissions.
      Just add above commands in your users .bashrc on in root .bashrc
      To permanently disable add following line in users .bashrc and compile it with “. .bashrc”
      xinput –set-prop “SynPS/2 Synaptics TouchPad” “Device Enabled” 0

      It will will automatically disables touch once you opened terminal/konsole.

      I hope this will helps you.

  2. Thank you so much, this is exactly what I was looking for. All the solutions I had found were GUI-based, but you can’t enable your touchpad with a GUI when you don’t have your mouse, i.e. when you need to enable your touchpad.

    I didn’t exactly follow the procedure though, I wrote the aliases in the .bash_aliases file as it was advised in the .bashrc

  3. Heh, that bashrc script addition was a nice touch. I know the Debian forums all scream “READ THE MAN FILES, RAWR”, but heck, I didn’t realize bashrc could do anything with a touchpad.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s