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.

I want my touchpad to be disabled when I use my mouse. How can I do that? touchpad-indicator has stopped working on 11.10. It used to work on 11.04. Gnome3 is not a solution as I don't like it and find it buggy.

share|improve this question
1  
Ok, I think touchpad-indicator dev team is going to fix this issue. –  Peng Wu Oct 16 '11 at 1:35
    
possible duplicate of Touchpad not working on Dell XPS L501x –  bodhi.zazen Jun 21 at 1:49

15 Answers 15

up vote 77 down vote accepted

Run the following command in a terminal:

xinput list

You will get an output that looks like this:

⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=12   [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)]
    ↳ Power Button                              id=8    [slave  keyboard (3)]
    ↳ Sleep Button                              id=9    [slave  keyboard (3)]
    ↳ Laptop_Integrated_Webcam_1.3M             id=10   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=11   [slave  keyboard (3)]
    ↳ Dell WMI hotkeys                          id=13   [slave  keyboard (3)]

It displays all the input devices connected. Note that they all have an id. Since 12 is the id for my touchpad, running the following command will disable it.

xinput set-prop 12 "Device Enabled" 0
share|improve this answer
13  
turn off touch pad synclient TouchpadOff=1 turn it back on synclient TouchpadOff=0 This way even better. –  Peng Wu Oct 17 '11 at 10:40
    
sudo apt-get install touchpad-indicator the good new is that touchpad-indicator is worked again in 11.10. –  Peng Wu Nov 10 '11 at 23:47
    
To edit approvers: I made the pending edit a CW answer - see below. –  Takkat Nov 25 '12 at 9:18
    
@PengWu Great work! THanks. been complaining about my touchpad on thinkpad. –  CppLearner Nov 29 '12 at 20:34
3  
"synclient -l | less" to see all available options –  Samus Arin Jul 16 '13 at 2:39

check this link out: How to disable-enable touchpad in ubuntu 11.10

The answer found there is really neat:

sudo add-apt-repository ppa:atareao/atareao
sudo apt-get update
sudo apt-get install touchpad-indicator

After this you will get a switch in your notification area.

The only thing I would wish is to be able to set the switch key to Fn-F8 (which is a touchpad key switch on my keyboard...

share|improve this answer
    
orsome! It once was broken in 11.10. but now it is worked –  Peng Wu Nov 10 '11 at 23:47
    
This repository doesn't have the touchpad-indicator for 12.10 –  Ed Villegas Jan 13 '13 at 16:04
1  
Does work in 12.04. –  viking Feb 20 '13 at 20:06
    
Many tks dude! It worked like a charm! –  rizidoro Mar 6 '13 at 12:30
    
Very cool. The easiest and most attractive solution. –  RobinLovelace Mar 20 '13 at 17:29
  1. Search for mouse
  2. Click on Mouse and Touchpad
  3. Click off/on button to the right of touchpad settings.

step one

enter image description here

share|improve this answer
2  
the big ON|OFF widget there is not available in 12.04, that's one one has to resort to the command line... –  knocte Jan 29 at 10:44

Based on answer given by @Peng Wu I created a bash script that can be used...

#!/bin/bash

declare -i ID
ID=`xinput list | grep -Eo 'TouchPad\s*id\=[0-9]{1,2}' | grep -Eo '[0-9]{1,2}'`

xinput set-prop $ID "Device Enabled" 0

echo 'Touchpad has been disabled.'

You can manually run it or run it on start. Then you can make the script run at boot.

Another bash script to toggle touchpad:

#!/bin/bash

declare -i ID
ID=`xinput list | grep -Eo 'TouchPad\s*id\=[0-9]{1,2}' | grep -Eo '[0-9]{1,2}'`
declare -i STATE
STATE=`xinput list-props $ID|grep 'Device Enabled'|awk '{print $4}'`
if [ $STATE -eq 1 ]
then
    xinput disable $ID
    echo "Touchpad disabled."
else
    xinput enable $ID
    echo "Touchpad enabled."
fi
share|improve this answer

Simply, in a terminal:

synclient TouchpadOff=1

(Taken from a comment from Peng Wu above... This should be an answer, not a comment.)

share|improve this answer
    
+1 This is the easiest way that worked for me. –  I Like to Code Aug 10 at 1:52
    
Easiest solution, thanks. Accidentally touching the touchpad despite "Disable touchpad while typing" was on - was driving me a little crazy. This way I can just use a USB mouse instead and keep the keyboard behaving nicely. –  David Thomas Sep 22 at 23:37

First check if your laptop has enable/disable touchpad keyboard shortcut, by any chance! On my Lenovo Thinkpad T500 it's Fn+F8

share|improve this answer
    
Great solution! And its KISS: Keep it super simple. –  Esteve Feb 5 at 9:49
    
It seems too specific. Not working with my n550jv. Peng Wu comments did the trick. –  louiscoquio Mar 3 at 14:23

This worked for me in 11.10 :

⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=12   [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)]
    ↳ Power Button                              id=8    [slave  keyboard (3)]
    ↳ Sleep Button                              id=9    [slave  keyboard (3)]
    ↳ Laptop_Integrated_Webcam_1.3M             id=10   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=11   [slave  keyboard (3)]
    ↳ Dell WMI hotkeys                          id=13   [slave  keyboard (3)]

It displays all the input devices connected. Note that they all have an id. Since 12 is the id for my touchpad, running the following command will disable it.

xinput set-prop 12 "Device Enabled" 0

and I would put it in .bashrc or whatever except that I'm not sure that device 12 (actually 11 for me) is always the touchpad.

Now if I could just get the up-arrow in nautilius to work and see the .dirs

share|improve this answer
    
no the touchpad utiity won't disable the tp in 11.10 so back to the commandline –  touristguy87 Apr 20 '12 at 17:32
    
run xinput list, get the id of the touchpad then run xinput set-prop (id) "Device Enabled" 0 works like a charm –  touristguy87 Apr 20 '12 at 17:33

install the Jupiter app. You can disable the touchpad with it and is remembered. This has worked effectively for me on both a Lenovo IdeaPad and ThinkPad on 11.04, 11.10, and 12.04.

share|improve this answer

This is how to disable your touchpad automatically on startup This method will disable the pad more safely by name rather than by id. Here is how to get the name of your touchpad:

$ xinput list --name-only | grep -i Touchpad
ETPS/2 Elantech Touchpad

Create a bash script file. I added the file to ubuntu Startup Applications so it runs on every restart. Remember to make the file executable. Here are the contents:

#!/bin/bash
$ xinput disable 'ETPS/2 Elantech Touchpad'
share|improve this answer

I tried using the laptop function key (fn) to disable the pointer and it works. It did not work during my 11.04 days though, so give that a try.

share|improve this answer
    
I do not have that button bro. It is a HP probook 4520s –  Peng Wu Oct 16 '11 at 8:51
    
oh ok. I just found out that the solution I posted is not permanent either, I have to do it every time I restart my machine. –  Fayaz Oct 18 '11 at 12:19

fn+f8 work like a charm on 12.10

share|improve this answer

Define keyboard shortcuts

(this answer was copied from an invalid edit)

Instead of remembering that command every time you wish to enable/disable the touchpad, you can instead add it as a keyboard combination shortcut.

Under preferences in Keyboard Shortcuts click add. Give a name to the shortcut like "Disable Touchpad" or something and add the command you discovered above

xinput set-prop <id> "Device Enabled" 0

and click apply. Then add another shortcut called "Enable Touchpad" or something similar to the first and change the previous command to a 1 at the end

xinput set-prop <id> "Device Enabled" 1

those are the off/on respectivly.

Now that those are added, click on Enable Touchpad's Shortcut column (should say 'disabled') and type the keyboard shortcut you want it to be, I chose Win+1 (Hold Windows Key and press the number 1). Do the same for Disable Touchpad, I chose Win+2.

Now Win+1 enables my touchpad and Win+2 disables it.

share|improve this answer

I have a Medion Akoya notebook model P7812 using Ubuntu 11.10 (64 bit) and the Fn & F6 key combination disables the touchpad. Allen Australia

share|improve this answer

https://bitbucket.org/barseghyanartur/xinput

It's a very tiny code which allows you to disable/enable the touchpad from terminal.

Simply follow the Instructions below:

Install:

$ pip install xinput

Disable touchpad:

$ disable-touchpad

Enable touchpad:

$ enable-touchpad
share|improve this answer

Just add a couple of bash functions to your .bashrc to give you a togggle...

#toggle-touchpad on|off
function touchpadon  { /usr/bin/xinput --enable $(xinput --list | grep -Eo 'TouchPad\s*id\=[0-9]{1,2}' | grep -Eo '[0-9]{1,2}') ; echo "touchpad enabled";}
function touchpadoff  { /usr/bin/xinput --disable $(xinput --list | grep -Eo 'TouchPad\s*id\=[0-9]{1,2}' | grep -Eo '[0-9]{1,2}') ; echo "touchpad disabled";}
share|improve this answer

protected by Community May 25 '12 at 20:50

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

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