How to disable middle mouse button click paste on Ubuntu 20.04 Focal Fossa Linux

The objective of this article is to disable the middle mouse button click paste on Ubuntu 20.04 Focal Fossa Linux GNOME desktop.

In this tutorial you will learn:

  • How to disable middle mouse button click paste

Disable middle mouse button click paste on Ubuntu 20.04 Focal Fossa GNOME desktop

Disable middle mouse button click paste on Ubuntu 20.04 Focal Fossa GNOME desktop

Software Requirements and Conventions Used

Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Installed Ubuntu 20.04 or upgraded Ubuntu 20.04 Focal Fossa
Software N/A
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user

Disable middle mouse button click paste on Ubuntu 20.04 step by step instructions

Graphical User Interface

  1. First, step is to install Gnome Tweaks
  2. Open Gnome Tweaks and navigate to Keyboard & Mouse and turn of the switch for Middle Click Paste.
    Disable middle mouse button click paste on Ubuntu 20.04 Focal Fossa GNOME desktop

    Disable middle mouse button click paste on Ubuntu 20.04 Focal Fossa GNOME desktop



Command Line

To disable disable middle mouse button click paste from the command line execute:

$ gsettings set org.gnome.desktop.interface gtk-enable-primary-paste false

To re-enable the middle mouse button click paste run:

$ gsettings set org.gnome.desktop.interface gtk-enable-primary-paste true