How to Disable the Touchpad When a Mouse Is Connected in Linux GNOME Shell


The vast majority of laptops come with a built-in touchpad as the primary input device for controlling the on-screen cursor. However, most users prefer to use an external mouse as it is easier to use than the touchpad. In this case it is useful to disable the touchpad so that you don’t accidentally touch it while typing.

Although GNOME Shell provides a way to turn off the touchpad completely in the “Mouse & Touchpad” settings, it can be tedious to fiddle with the settings every time you need to turn the touchpad on or off. It’s possible to configure GNOME to automatically disable the touchpad when your mouse is connected and enable it again when you don’t have your mouse nearby.


As usual, there’s an extension for that.


If you’ve never installed a GNOME Shell extension before, you need to install the “GNOME Shell Integration” browser extension and native host connector.

Here are the links to install the Gnome Shell Integration browser extension in Firefox and Google Chrome.

The way to install the native host connector depends on your distribution.

You can install the connector directly from the Ubuntu repos if you are on Ubuntu 17.04 and later:

sudo apt-get install chrome-gnome-shell

If you are on Ubuntu 16.10 or earlier, you need to add the following PPA to your software sources before installing the package.

Open your terminal and type in the following commands:

sudo add-apt-repository ppa:ne0sight/chrome-gnome-shell
sudo apt-get update
sudo apt-get install chrome-gnome-shell

Other distro users can find installation instructions on this page.

Once you have installed both the browser extension and native host connector, you may proceed with the instructions below.

1. Open this link in your browser to install the Touchpad Indicator extension.


2. Toggle the Off switch to “On.”

3. Click the install button to confirm installation.


If you see a new touchpad icon on the top bar, it means Touchpad Indicator is now installed on your computer.


Now you need to configure it so that it automatically detects when a mouse is connected so that it can switch the touchpad off and on as needed.

1. Click the touchpad icon on the top bar, and then select “Indicator Preferences.”


2. Select the “Auto Switch” tab and set “Automatically switch Touchpad On/Off” to “On.”

3. If you want to receive a notification when the touchpad is disabled or enabled, you can toggle “Show Notification” On as well.


That’s it! Now your touchpad will be automatically disabled and enabled as needed. If you know other methods to get this behaviour in GNOME Shell, perhaps without using an extension, let us know in the comments below.

Ayo Isaiah
Ayo Isaiah

Ayo Isaiah is a freelance writer from Lagos who loves everything technology with a particular interest in open-source software. Follow him on Twitter.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox