1. Home
  2. Linux
  3. Disable the touchpad on linux

How to disable the touchpad on Linux

Touchpads on laptop computers have gotten pretty good over the years. Still, not everyone likes them, and they can get in the way a lot. If you’re tired of dealing with your touchpad and want to turn it off, we can help. Follow along in this guide as we go over how to disable the touchpad on Linux.

Command-line

It is possible to disable the touchpad right from the command-line by making use of the xinput tool. To start, open up a terminal window by pressing Ctrl + Alt + T or Ctrl + Shift + T on the keyboard.

Once a terminal window is open, and ready, run the xinput list command to view all of the input devices on your Linux laptop.

Note: Xinput likely will not work with Wayland desktop environments. Please follow desktop-centric instructions to disable your touchpad instead.

xinput list

Running the xinput list command will print out a list of input devices in the terminal. Look through this list for your touchpad. Be sure also to find the Id number of your touchpad. In this example, the touchpad’s Id is “10”. Yours will differ.

After you’ve figured out the name of your touchpad and its ID in the Xinput list, it’s time to use the xinput tool to disable it with the command below.

Note: Please change 10 in the command example below to the Id number of your touchpad as outlined in the Xinput list.

xinput set-prop 10 "Device Enabled" 0

As soon as the xinput set-prop command is run in a terminal window, your touchpad should stop functioning, and effectively be disabled. At any time, if you’d like to re-enable the touchpad, run the following command:

xinput set-prop 10 "Device Enabled" 1

Gnome Shell

To turn off the touchpad in Gnome Shell, you must have Gnome extensions set up on your system. The reason that an extension is necessary is that Gnome Shell does not offer this setting by default. To enable Gnome extensions, follow this guide here.

Once Gnome extension support is enabled on your Linux PC, head over to the Gnome extensions website and install the Touchpad Indicator extension.

With Touchpad Indicator installed, you can easily disable the touchpad on your laptop by clicking on the Touchpad Indicator in the top-bar, and setting the “Touchpad” slider to the off position.

To re-enable the touchpad in Gnome Shell, set the “Touchpad” slider to the “on” position.

KDE Plasma 5

The KDE Plasma 5 desktop environment cannot shut off the touchpad permanently. Instead, it can be shut off when an external mouse is connected to the system, as well as while typing.

To gain access to the KDE Plasma 5 touchpad settings, start by pressing Win on the keyboard. Then, type “touchpad” in the search box. Click on the “Touchpad” icon in the search results.

Inside of the KDE Plasma 5 touchpad settings, click on the “Enable/Disable Touchpad” tab. Then, in the “Enable/Disable Touchpad” tab, find the “Disable touchpad while typing” box, and check it. Then, check the “Disable touchpad when mouse is plugged in” box.

Don’t want the touchpad to shut off while you’re typing or while a mouse is plugged in? Go back into the KDE Plasma 5 touchpad settings and uncheck the boxes checked earlier.

Cinnamon

To disable the touchpad in the Cinnamon desktop environment, you must access the “Mouse and Touchpad” settings. To do that, press Win, and type “touch” in the search box. “Mouse and Touchpad” should show up as a search result.

Inside of the “Mouse and Touchpad” window on the Cinnamon desktop, look for the “Touchpad” button, and click it with the mouse to go to Cinnamon’s touchpad settings.

In the “Touchpad” area of “Mouse and Touchpad,” click the slider to disable the touchpad. To re-enable the touchpad, click the slider again.

Mate

Using the Mate desktop environment and looking to disable the touchpad on it? You must open up the Mate “Mouse Preferences” window. To do that, press the Alt + F2 keyboard combination. Then, run the command below in the quick-launcher to access Mate’s “Mouse Preferences.”

mate-mouse-properties

Inside of the Mate “Mouse Preferences” window, there are two columns: “Mouse,” and “Touchpad.” Click on the “Touchpad” tab to access Mate’s touchpad settings. Then, uncheck the box next to “Enable touchpad” to shut off your laptop’s Touchpad.

To re-enable it, check the box again.

XFCE4

To disable the touchpad outright in the XFCE4 desktop environment, open up the mouse settings window. To do this, press Alt + F2 on the keyboard, then type:

xfce4-mouse-settings

Once the mouse settings window is open and ready to use, find the “Devices” tab, and click on it. From there, click on the drop-down menu and select your touchpad.

After selecting your touchpad in the device menu, click the slider button right next to it to disable the touchpad. To re-enable the touchpad, click the slider again.

1 Comment

  1. This is really useful, thanks. Is there a way to fix the device number? I made an alias to turn the pad on and off, but after a reboot it disabled the wrong device