Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Clipboard Package/Widget Removal

Graphical Environments, Managers, Multimedia & Desktop questions.
Post Reply
Message
Author
SubZero
Posts: 22
Joined: 2022-07-13 04:00

Clipboard Package/Widget Removal

#1 Post by SubZero »

In Debian 11 KDE, is it possible to remove “Clipboard” package/widget? I can’t find a package by either using dpkg or apt. But I did find it using Discover Software Center, and it appears to be part of the KDE Plasma Desktop. However, when I try to remove the Clipboard widget, it wants to remove a whole bunch of other packages like KDE Plasma Desktop – [All Widgets], kde-plasma-desktop, kinfocenter, Breeze etc… Is there a way just to remove the Clipboard package/widget?

Thank you.

steve_v
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 1418
Joined: 2012-10-06 05:31
Location: /dev/chair
Has thanked: 80 times
Been thanked: 191 times

Re: Clipboard Package/Widget Removal

#2 Post by steve_v »

SubZero wrote: 2022-08-20 05:26it appears to be part of the KDE Plasma Desktop
Indeed it is. The clipboard plasmoid (/usr/share/plasma/plasmoids/org.kde.plasma.clipboard) is not a standalone package, it's part of plasma-workspace-data.
As far as I am aware there's no way (at least within apt) to forbid installation of specific files within a package, only whole packages. So without rebuilding/repackaging plasma-workspace-data, you get whatever is in it.

In Gentoo we have the INSTALL_MASK footgu... er, "variable" for this, if there's an equivalent for Debian I'm all ears.

The bigger question of course is _why_ you want to remove the files. If you don't want a clipboard manager in the system-tray, why not simply disable it?
You could of course nuke the relevant files manually, but that may well break other things in plasma, and if you try it you will get to keep all the pieces.
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: Clipboard Package/Widget Removal

#3 Post by L_V »

plasma-workspace: /usr/bin/klipper

/usr/share/applications/org.kde.klipper.desktop :

Code: Select all

Exec=klipper
You cannot remove it, but you can remove the icon from the taskbar.
Last edited by L_V on 2022-08-21 09:55, edited 1 time in total.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Clipboard Package/Widget Removal

#4 Post by Head_on_a_Stick »

I think the recommended approach is to add this line to the .desktop file:

Code: Select all

Hidden=true
Desktop Entry Specification wrote:Hidden should have been called Deleted. It means the user deleted (at his level) something that was present (at an upper level, e.g. in the system dirs). It's strictly equivalent to the .desktop file not existing at all, as far as that user is concerned.
steve_v wrote:In Gentoo we have the INSTALL_MASK footgu... er, "variable" for this, if there's an equivalent for Debian I'm all ears.
I think dpkg-divert(1) can be used for that but it would be on a per-package basis rather than a system-wide flag.
deadbang

steve_v
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 1418
Joined: 2012-10-06 05:31
Location: /dev/chair
Has thanked: 80 times
Been thanked: 191 times

Re: Clipboard Package/Widget Removal

#5 Post by steve_v »

Head_on_a_Stick wrote: 2022-08-20 10:45I think dpkg-divert(1) can be used for that but it would be on a per-package basis rather than a system-wide flag.
Thanks, filed for future reference. I completely forgot about diversions TBH, but that would indeed do much the same trick, at least for the package in question.

My oldest gripe with Debian is probably the scattering (and often duplication) of functionality between apt, apt-foo, dpkg, dpkg-foo, and all the semi-randomly named packaging helpers... Or at least I'll use that as an excuse for my forgetfulness anyway. :P
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

SubZero
Posts: 22
Joined: 2022-07-13 04:00

Re: Clipboard Package/Widget Removal

#6 Post by SubZero »

Thanks everyone for your responses. Sorry that I'm responding a bit late, been pretty busy. Anyways, to answer the question is to why I want to remove it, it's very simple. I see this widget more of a vulnerability than a feature, not to mention I won't be using it anyway. It's a vulnerability due to it's function, as in this day and age, we use password managers and other tools that require to copy/paste sensitive information and this Clipboard stores all of the data in it for anyone to see of they get either logical of physical access to the system. If I disable the Clipboard widget, will it still store the data but won't appear in the system tray or it will not function at all?

L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: Clipboard Package/Widget Removal

#7 Post by L_V »

If klipper is not started, it will be disabled for sure.
The safest method to disable it is to modify /usr/share/applications/org.kde.klipper.desktop
Replace

Code: Select all

Exec=klipper
by

Code: Select all

Exec=true
!! But don't forget that each plasma-workspace package update will reset this change.

SubZero
Posts: 22
Joined: 2022-07-13 04:00

Re: Clipboard Package/Widget Removal

#8 Post by SubZero »

Thanks L_V for detailed info on how to prevent Clipboard from running. Much appreciated!

SubZero
Posts: 22
Joined: 2022-07-13 04:00

Re: Clipboard Package/Widget Removal

#9 Post by SubZero »

Didn't meant to bring up the old thread, but thought that it'll be better than starting a new one... After taking sometime to aggregate all of the information needed, I began the work on building a Debian primary system. Now that I had the chance to implement this workaround, unfortunately it did not work. I've edited /usr/share/applications/org.kde.klipper.desktop file and changed "Exec=true", then rebooted the system. After logging back in, icon was still in the System Tray and fully functional.

I've also tried a method recommended by "Head_on_a_Stick"; edited same file, but added

Code: Select all

Hidden=true
and still got the same results after the reboot.

Did I miss a step? Is there another way to disable functionality of the Clipboard Widget?

bin
Posts: 59
Joined: 2019-03-07 12:02
Been thanked: 7 times

Re: Clipboard Package/Widget Removal

#10 Post by bin »

As I recall in Plasma you can right click on the system tray area - you may have to try several times to get the target - but eventually you'll get a Configure or Preferences option. In there you can disable various widgets. Sorry - cannot be exact as I dropped KDE quite quickly but did find that way to reduce the number of widgets and thingies in the system tray through that route.

L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: Clipboard Package/Widget Removal

#11 Post by L_V »

@SubZero
Really really weird.
If it worked fine, and doesn't few days later, something has changed.
Can you show this again ?

Code: Select all

grep Exec /usr/share/applications/org.kde.klipper.desktop
+ also replace Exec=klipper by Exec=true in '/etc/xdg/autostart/klipper.desktop'
Or try this one, more radical:

Code: Select all

mv /usr/bin/klipper /usr/bin/klipper.bak
ln -s /usr/bin/true /usr/bin/klipper

SubZero
Posts: 22
Joined: 2022-07-13 04:00

Re: Clipboard Package/Widget Removal

#12 Post by SubZero »

L_V,

I've verified "Exec=true" in /usr/share/applications/org.kde.klipper.desktop file and then made that change in /etc/xdg/autostart/klipper.desktop file. Afterwards, used "grep" command listed above for both files to verify that "Exec=true", then rebooted the system. Upon system reboot, Clipboard widget was still active and functional. Then I've tried the other suggestion:

Code: Select all

mv /usr/bin/klipper /usr/bin/klipper.bak
ln -s /usr/bin/true /usr/bin/klipper
Which unfortunately, believe it or not still did not disable that widget.

@bin
Thank you for your suggestion, but I'm not sure if disabling the icon from the System Tray will actually disable the widget. I'm looking for a solution that permanently disables/removes that widget so it doesn't collect copy/paste information in its database.

L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: Clipboard Package/Widget Removal

#13 Post by L_V »

@SubZero
It worked. It doesn't few days later. How can you/we explain ?
No more binary, but still 'normally' active.

->> are you sure you see a kde klipper widget icon ? (and not another clipboard widget ?)

->> is the clipboard normally working ? Or just a useless icon which is not harmful (no clipboard history) ?
+

Code: Select all

grep '[kc]lip' ~/.config/plasmashellrc
More radical solution...: backup and delete /usr/share/plasma/plasmoids/org.kde.plasma.clipboard/ folder.
+

Code: Select all

mv /usr/share/plasma/shells/org.kde.plasma.desktop/contents/updates/klipper_clear_config.js{,.bak}

SubZero
Posts: 22
Joined: 2022-07-13 04:00

Re: Clipboard Package/Widget Removal

#14 Post by SubZero »

L_V,

It never worked. I took a screenshot of the Clipboard widget so you can see what I'm referring to. On the screenshot you can see highlighted in red the icon of the Clipboard in the System Tray and copied text that it saved.
Screenshot.png
Screenshot.png (135.66 KiB) Viewed 1827 times
Is this the same Clipboard widget that you were thinking or completely something else?

L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: Clipboard Package/Widget Removal

#15 Post by L_V »

SubZero wrote: 2022-08-25 05:50 Thanks L_V for detailed info on how to prevent Clipboard from running. Much appreciated!
.../...
2022-09-09 : It never worked
How many weeks do you need to clearly report if it works or not. Quite confusing.
Did you really remove /usr/share/plasma/plasmoids/org.kde.plasma.clipboard/ folder, and still have klipper active with everything disabled everywhere ?
+ feedback of

Code: Select all

ls -l /usr/bin/klipper

SubZero
Posts: 22
Joined: 2022-07-13 04:00

Re: Clipboard Package/Widget Removal

#16 Post by SubZero »

L_V,

As you can see in my reply, I did mention that I was initially aggregating the information to begin the deployment and it took sometime to get things ready. In other words I've documented your recommendation and only tried it once I've deployed Debian on my primary computer which took sometime to get it running with Nvidia drivers, SecureBoot, Network Configuration etc...
SubZero wrote: 2022-09-08 04:47 ...After taking sometime to aggregate all of the information needed, I began the work on building a Debian primary system. Now that I had the chance to implement this workaround, unfortunately it did not work....
With that out of the way. I held off of deleting the /usr/share/plasma/plasmoids/org.kde.plasma.clipboard until I was sure that we're talking about the same Clipboard widget as you've described that action as "More radical solution". I'm new to Debian and Linux in general and learning as I go. To avoid potentially wasting tens of hours of current deployment (creating MOK certs, signing drivers, importing certs into Secure Boot, setting up network, troubleshooting/configuring Sound Card, etc...), I needed to make sure we are in fact talking about the same Clipboard Widget.

Now that it's confirmed, I've deleted /usr/share/plasma/plasmoids/org.kde.plasma.clipboard folder, reboot the system and Clipboard Windget is finally gone.

Thanks for your help.

Post Reply