I know that getting your touchpad disabled is as easy as toggling the on/off button in System Settings, but unfortunately it only works for the current session. After a reboot, the touchpad is back on.
I know that getting your touchpad disabled is as easy as toggling the on/off button in System Settings, but unfortunately it only works for the current session. After a reboot, the touchpad is back on.
The command to disable touchpad
The command to disable touchpad is:
for 14.04:
for 15.04 +:
Add it to Startup Applications
The most pragmatic (and simple) solution then is to add the command to Startup Applications.
Like in many cases when commands involve screen,
xrandr
, keyboard or touchpad settings, You will need to add a small break however to prevent possible local procedures to overrule the command, so it should be:for 14.04:
for 15.04+:
Open Dash > Startup Applications > Add. Add the command above, according to your Ubuntu version.
Now shortly after login (within 15 seconds) your touchpad is disabled automatically.
Of course you can play with the 15 seconds a bit to optimize for your system.
Edit
From your comment, it turns out the touchpad is (re-) enabled after a while, which means some process is enabling the touchpad.
Usually, it is extremely difficult to find out which process is causing this kind of changes. Even if you could, it would not be sure you could eliminate the cause.
The good news however is that
gsettings
(which is used to check/control the touchpad) is extremely "low on juice". That means that it will be no burden to your system whatsoever to have a background script keep an eye on the current state, immediately disabling the touchpad again if it is enabled somehow by some process.If you run 14.04
If you use 15.04+
To use it
no_touchpad.py
Add the following command to Startup Applications:
I am afraid the only alternative is to disconnect the touchpad physically, as mentioned by Serg.
Bellow are 3 possible approaches, advantages and disadvantages discussed. There could be others, but these are most bulletproof and simple.
Dconf approach
First approach is by using
dconf
(and this is my prefered approach, since it survives reboots at least on my 14.04 LTS system ) , more specifically this command:To finalize it , run
dconf update
.Very nice approach, doesn't require root access, survives reboots, simple to script.
Blacklisting the driver
If a driver ( in Linux terminology - module ) is blacklisted, the device won't be used - that's a simple idea. The specific module that we need is
pmouse
.Open the file
/etc/modprobe.d/blacklist.conf
with root privileges, for example withsudo nano /etc/modprobe.d/blacklist.conf
(command line editor) or withgksu gedit /etc/modprobe.d/blacklist.conf
(gui editor). Add the following line at the end:Save, exit, reboot, and now your touch pad will be prevented from use. For the record, wireless usb mouses still will be active - I am currently typing that on my laptop with touchpad module removed, while using a usb wireless mouse.
Small disadvantage of this method is need for root access, but overall it is a simple and effective approach.
xinput
Final one, is
xinput --disable ID
, where ID is theid=
number from thexinput
(notice no arguments) of the device. Now how do we make that autostart every time we log in to GUI ?Make a script and add it to Startup Applications menu :
Now every time you log in , this will run. Slightly more verbose, more steps. However, this has advantage when you use any GUI that relies on X server. But only those that use
dconf
will work with thedconf
method (obviously), for example Unity or Gnome.Hardware solution:
This might be obvious, but if you want to 100 % disable a touchpad, open the laptop and disconnect a ribbon connector that goes from touchpad to the motherboard.
There's a really cool utility called
touchpad-indicator
which shows an icon in the top bar about the status of the touchpad. The important thing is that it also allows you do to the following:touchpad-indicator
starts.I will show you how to install and set it up so that it disables the touchpad on startup.
First we need to install it, open up a terminal and type in the following:
After you have installed it, start it by looking for
Touchpad-Indicator
in the Dash menu.You will see a new icon (see picture below) show up at the top right of your screen. Click on it and select Preferences.
You will be presented with this window:
Go to the General Options tab.
Tick the box that says Autostart.
Now go to the Actions tab.
Tick on the box that says Disable touchpad when Touchpad-Indicator starts.
(Optionally) Set any other conditions you like in the Actions tab.
Done.
You can now close that window (by clicking on OK).
Enjoy.
The following command will disable your touchpad, provided that you replace "XX" with the id of your touchpad.
To find your touchpad's id, run:
For instance, my touchpad look like this:
So my touchpad's id is 15.
So, using this command, I am able to turn my touchpad off:
And back on:
This is the same command issued by your enable/disable touchpad hotkey on your keyboard, so you'll still be able to turn the touchpad back on at any time if you need it.
So now, all that's left is to make this command run whenever you turn your computer on. Probably the easiest way to do this this is to add the command to your startup applications. In Unity, just search for Startup Applications in the dash. If you're using Mate, the tool is under "System -> Preferences -> Personal -> Startup Applications."
Using the startup applications method to run the command, the touchpad will still be active on the login screen and on the profiles of other user accounts. If you want to make the command run system-wide during startup, this question has some helpful answers to get you started.
Other sources: http://wpkg.org/Disable_/_enable_keyboard_and_mouse_in_Linux