# Clipboard managers and how to use them
Seth Kenlon

You probably copy and paste snippets of text multiple times a day on your computer without ever thinking about it.
You may well take it for granted, because it's [older than UNIX itself](http://www.nomodes.com/Larry_Tesler_Consulting/Retrospective/Pages/CHI_Retrospective.html#18), with the earliest implementation of it being through macros or manual repetition of line editor commands.
While the process has largely remained the same over the past 15 years, there's a side to copy and paste that many users never see: the clipboard manager.

The *clipboard* is an [usually invisible] place in memory that holds the contents of whatever you have copied or cut.
It is generally global, meaning that it has access to whatever you copy or cut across your entire operating system, regardless of what application you are using.
In fact, it's because the clipboard is global that you can copy from one application to another application, even though those applications were probably developed by two different developers.
Long ago, early UNIX desktops introduced the concept of a *clipboard manager*: a GUI application meant to track the history of what you copy and cut so that you can paste not only the most recent item, but any of the most recent 10 or 20 things you copied.

In other words, during a session with your mundane desktop, assume you copy the word "zero" from one text file, and then the word "one".
Normally, the word "one" would replace whatever was in your clipboard (the word "zero", in this example) so that when you paste, you see the word "one".
That's how normal desktop copy and paste works, and it seems to be good enough for most users.

With a clipboard manager, though, you can copy "zero" and then "one" and then "penguin" and then anything else you like, and each one gets stored in your clipboard manager's history.

![](clipboard-history.jpg)

That's how the Linux desktop works, and has worked since before the days of even [CDE](https://sourceforge.net/projects/cdesktopenv/).
It might seem strange at first, but once you get used to it, you find it hard to live without.
Here's how to enable a clipboard manager on your desktop.

## KDE

If you're using the KDE Plasma Desktop, you already have a clipboard manager enabled.
It's called ``Klipper``, and it's fully functional by default in any KDE install.

![](klipper.jpg)

KDE is famous for being configurable, so it's no surprise that you can configure Klipper to suit your unique workflow.
It's easy to move your mouse over to the Klipper icon in the KDE system tray, click it, and select the content you want to paste.
However, if you're looking for greater efficiency, you can configure Klipper to open, at the position of your mouse, with a custom keyboard shortcut.
You can also configure custom actions that get triggered when specific content types are copied, and much more.

As is common for KDE, the clipboard manager appears simple, but is actually a robust, scriptable, and customizable suite of useful utilities.
Thanks to the modularity of Plasma widgets ("plasmoids" as they used to be called), Klipper can be run as a system tray element in any desktop or window manager, such as Fluxbox, LXQT, i3, and so on.

## GNOME

The GNOME desktop tends to favour minimalism, and one of the things that got swept under the rug is the clipboard manager.
Luckily, a clipboard manager is available as a GNOME extension.

You can access GNOME extensions in two different ways: through a Firefox browser add-on or through the **GNOME Tweaks** package.
Since you usually need to find extensions on the Internet, it makes a lot of sense to use an Internet browser to help manage them.
If you use [some other open source browser](https://opensource.com/article/19/7/open-source-browsers) aside from Firefox, you can install **Gnome Tweaks** instead.

## Firefox GNOME Extensions

To enable GNOME extension management in Firefox, click the hamburger menu in the upper right corner of Firefox and select **Add-ons**.
In the **Add-ons** tab, click on the **Extensions** category in the left column.
In the **Search on addons.mozilla.org** field, enter ``gnome``.
Find the add-on called **GNOME Shell integration** and click to navigate to its page.

In the **GNOME Shell integration** page that opens, click the **Add to Firefox** button and then follow the prompts to install the add-on.

Once the add-on has been installed, it appears in your Firefox toolbar in the shape of a footprint.

### Installing the clipboard manager

To manage GNOME extensions, click the footprint icon in your Firefox toolbar.
This navigates to ``extensions.gnome.org`` and displays a list of GNOME extensions available for install.
Search for ``clipboard`` in the text field on the page to filter the list, and then look for the **Clipboard Indicator** extension.
Click on the title to open its page.

The **Clipboard Indicator** page features a link to its source code, a brief description of what it does, and a toggle to activate or deactivate it on your desktop.

![](gnome-extension-toggle.jpg)

Click the toggle button to activate it.

Follow the prompts to allow Firefox to download the GNOME extension to the appropriate location on your hard drive (they're stored in ``~/.local/share/gnome-shell/extensions/``, for the record), and to activate the extension.
As soon as it's downloaded and activated, you have a new icon in the top right of your GNOME desktop.

Try copying some text from Firefox, and then click the clipboard icon to see it in your clipboard history.

If you want your clipboard manager to *stop* recording the history of your copy and paste activities at any time, click the clipboard icon and select **Private mode**.

You can configure your clipboard manager with the **Settings** option.
Available options include whether to display a notification when something is copied (you probably want this *off* if you copy and paste often), how far back you want your history to go before items are replaced with new ones, and what keyboard shortcuts you use to display the menu and to move through items in the menu.


## Gnome Tweaks

The **GNOME Tweaks** application is casually known as the configuration panel that GNOME forgot to include.
It has many powerful features and choices, but for this article the only one that matters is the ability to activate or deactivate extensions.
You can install **Gnome Tweaks** through your package manager or in your software installer of choice.

For example, on Fedora, CentOS, or RHEL:

```
$ sudo dnf install gnome-tweaks
```

On Ubuntu or Debian, use ``apt install`` instead.

Before you can activate an extension, you must install it.

The quickest way to install the **Clipboard Indicator** extension is to use Git to clone the repository into your ``~/.local/share/gnome-shell/extensions`` directory:

```
$ git clone \
https://github.com/Tudmotu/gnome-shell-extension-clipboard-indicator.git \
~/.local/share/gnome-shell/extensions/[email protected]
```

The extension is installed.

Click **Activities** in the top left of your GNOME desktop and launch **GNOME Tweaks**.

In **GNOME Tweaks**, click on **Extensions** in the left column.

![](gnome-tweaks-clipboard.jpg)

Find the **Clipboard Indicator** in the list of extensions, and click the toggle button to activate it.


## Clipboard management

Clipboard managers are powerful convenience tools, and hard to give up when you're using a non-Linux desktop.
Luckily, developers for other operating systems have borrowed the idea of clipboard managers, and so you can often find similar functionality for any OS you happen to be on.
Get started using a clipboard manager on Linux today.
You won't be sorry!