How to get rid of 1 of the 2 clipboards (Clipboard and Klipper) in system tray in Plasma?

I have 2 identical icons in the system tray in Plasma. When I click one of them it shows “Clipboard” (with clipboard history only) and the other one shows “Klipper - Clipboard tool” which seems a more feature rich program as it shows additional menu entries when clicked. However right clicking on each of the icons shows similar options for configuration.

So I am wondering - why do I have two programs doing the same thing, which one should I get rid of and how? (I just don’t see the need to have 2 programs doing the same thing)

FWIW I have a shell script which does some useful things with clipboard contents (I need it to fill some particular forms for a custom thing). It inserts particular clipboard entries which I need for something custom with a line like:

qdbus org.kde.klipper /klipper setClipboardContents "$line" >/dev/null

so I suppose that to keep the script working I would rather have to keep Klipper? Or maybe modify the script somehow (in case “Clipboard” is the recommended program to keep)?

Well, you basically have two options:

  • don’t run klipper in the first place (or quit it) :wink:
  • you can disable the applet like any other system tray applet, in the “System Tray Settings”

Both are just different GUI frontends to the same service btw…

The problem is that it seems to start automatically at certain point. I don’t know when exactly but after working for some time I notice that there are already 2 icons. I am not running it explicitly .

you can disable the applet like any other system tray applet, in the “System Tray Settings”

I have been looking for a way to do this but I can’t find it. Can you help?

Both are just different GUI frontends to the same service btw…

I supposed that. Makes sense. Thanks for confirming.

You mean it isn’t there when you login, but appears after a while?

Well, you need to find out what runs it then…
That definitely doesn’t happen out of the blue.

I have been looking for a way to do this but I can’t find it. Can you help?

Right-click on the system tray (either an empty space, or the up-arrow), and choose “System Tray Settings” in the context menu.
It should be on the “General” tab, below “Additional Entries”.

Yes.

Well, you need to find out what runs it then…
That definitely doesn’t happen out of the blue.

Unfortunately I have no idea how to do that. I will try to pay closer attention. So far I was thinking that it may be related somehow to the fact that I have been upgrading this system since 13.2, i.e. that it may be some leftover from KDE4. Is that possible?

Right-click on the system tray (either an empty space, or the up-arrow), and choose “System Tray Settings” in the context menu.
It should be on the “General” tab, below “Additional Entries”.

Thanks. For some reason here “Additional Entries” is called “Extra Items”. I don’t know why.

No.

It probably could be if klipper would automatically started on login, but not misterically later on…

In any case, you should find out what triggers it, and that’s nothing I could help with, as it doesn’t happen here and I don’t know what you are doing exactly.

For some reason here “Additional Entries” is called “Extra Items”. I don’t know why.

Because I’m using the german language, and translated back to english myself instead of switching the language.
I.e. it would probably be called “Extra Items” here too…

Thanks wolfi. I will keep an eye on it.

I found the culprit.

In the script I use there is an explicit call starting klipper:


#!/bin/bash
...
# Start klipper if it is not running
SERVICE='klipper'

if ! (( $(pgrep $SERVICE) )) > /dev/null; then
  notify-send "Starting $SERVICE"
  klipper &
  notify-send "$SERVICE started."
fi

# Wait for klipper to get started and insert the clipboard content
sleep 1
qdbus org.kde.klipper /klipper setClipboardContents "${!1}" >/dev/null

If I remove the line “klipper &” it does not start it but the script no long inserts in the Clipboard the content which it is supposed to.

Is there way to make the script work with Clipboard instead?

Yes, because the applet does (did) not register the “klipper” DBUS service:
https://forum.kde.org/viewtopic.php?f=66&t=127184

This has been added in August though:
https://cgit.kde.org/plasma-workspace.git/commit/?id=6fb7ed2384dbee0f4da34ac200c9ea38fc25b0eb

So it should work since Plasma 5.11.0.

Is there way to make the script work with Clipboard instead?

On Leap 42.3 (which comes with Plasma 5.8.7) only if you upgrade to a newer Plasma version via additional repos.
(of course you could also upgrade to Leap 15.0, which is still beta currently, or Tumbleweed)

Probably easier to stick to klipper for now I suppose, unless you want to have the latest Plasma (and Qt5/KF5) anyway.

Thanks wolfi.

If it is fixed in Leap 15 - I can simply wait till it is out of beta :slight_smile:

PS: if you disable the applet, you’d probably want to start klipper automatically at login (which would also make the manual start in your script unnecessary).
Actually that should happen automatically if you leave it running on logout (unless you disabled that).

But klipper itself has an option to auto-start it on login as well (so it doesn’t depend on the session management), just quit it and it will ask whether you want to run it on login or not.

Thanks.

How do I re-enable a disabled applet? (e.g. that Clipboard?) I suppose I would have to do it at certain point when I upgrade to the non-beta Leap 15?

Also you said before:

What is wrong with klipper and why is it replaced with Clipboard? IOW: what is the difference between these 2 fronends and why it is not only one frontend?

Exactly as you’d disable it, in the “System Tray Settings”.

I suppose I would have to do it at certain point when I upgrade to the non-beta Leap 15?

You don’t have to do it, you could also keep on using klipper if you prefer.
(or both, but your original question was how to get rid of one of the 2…)

What is wrong with klipper and why is it replaced with Clipboard?

It is not being replaced really. Both frontends are shipped with plasma-workspace.
And nothing’s “wrong” with it either.

IOW: what is the difference between these 2 fronends and why it is not only one frontend?

The main difference is that one is a Plasmoid (Plasma Applet/Widget) that can only be used with Plasma, the other one is a stand-alone application that can be used on any desktop.

Apparently klipper does have some drawbacks though that are caused by the fact that i’s “GUI” basically consists of only a system tray context menu. One particular limitation is that you can perform certain actions like “Edit” on the current history item only although it should be possible on each one.

See also Next Generation Klipper – Martin's Blog