Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Is there a way to disable a touchpad using a terminal command?

share|improve this question

3 Answers 3

up vote 16 down vote accepted

turn off touch pad synclient TouchpadOff=1

turn it back on synclient TouchpadOff=0

share|improve this answer
    
Simple but go to the point. –  Ade Malsasa Akbar Oct 2 at 5:24

There are at least two methods (that I know of) you could try.

synclient

If you're laptop is equipped with a Synaptics (or ALPS) touchpad you can indeed use synclient as already mentioned by Shutupsquare. I'm running Ubuntu 14.04 and on my machine it was installed by default.

Test if synclient is installed: synclient -V (it should report the version number)

Turn touchpad ON: synclient TouchpadOff=0

Turn touchpad OFF: synclient TouchpadOff=1

I haven't tested this myself, but if your goal is to not move the mouse when your arms are resting on the touch pad, this might help.

Turn palm detection on: synclient PalmDetect=1

Turn palm detection OFF: synclient PalmDetect=1

In general you can configure any property of your Synaptics touchpad by synclient property=value. Where the property is one of the available properties shown by synclient -l

Links for further reading

ubuntu - comminity help wiki - SynapticsTouchpad

archlinux - wiki - Touchpad Synaptics

ask ubuntu - How do I make my synclient settings stick? - Ubuntu

xinput

If you don't want or can't use synclient, you could also use xinput. The procedure is somewhat similair.

list all xinput devices: xinput

Part of the ouput could look like this:

⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Logitech USB-PS/2 Optical Mouse           id=13   [slave  pointer  (2)]
⎜   ↳ ETPS/2 Elantech Touchpad                  id=17   [slave  pointer  (2)]

It this particular case my touchpad has id=17 and its full name is "ETPS/2 Elantech Touchpad".

The command to set a property is xinput set-prop. The property to enable or disable the touchpad is Device Enabled, so to enable or disable it type:

Turn touchpad ON: xinput set-prop <id> "Device Enabled" 1 (where <id> is your device id, in my case 17)

Turn touchpad OFF: xinput set-prop <id> "Device Enabled" 0

Turn palm detection ON: xinput set-prop <id> "Palm Detection" 1

Turn palm detection OFF: xinput set-prop <id> "Palm Detection" 0

To query available properties: xinput list-props <id> OR xinput list-props <full-name>, this should be quite similair to synclient -l.

Links for further reading

ubuntu - wiki - input

NOTE

When setting properties through either xinput or synclient the properties are not set to the other tool. They are also not set in unity-control-center.

share|improve this answer

fn+f9 if you are just looking for a keyboard shortcut and running ASUS...

(I got here from Google looking for this feature so I know it doesn't address the question being asked but may help all the same).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.