r/kde•
RealNC

What's the proper way to have trash icon on the desktop?

Question

Currently, my ~/Desktop/Trash.deskop file is:

[Desktop Entry]
EmptyIcon=trash-empty-symbolic
Icon=user-trash-full-symbolic
Name[en_US]=Trash
Name=Trash
Type=Link
URL[$e]=trash:/

It works, except for one issue. When emptying the trash, half of the time the icon doesn't get updated and the trash icon looks like it's not empty. It seems to be random.

Am I doing something wrong?

Posted Feb 14, 2022, 6:19 AM UTC

159
AaronTechnic:fedora:•

Why are you doing this? Just drag the trash icon from dolphin to the desktop.

9
RealNCOP•

OK, I just tried that, and it has the same issue :-/

I guess it's a bug then.

5
bugseforuns:arch:•

Yeah, it's a bug. Can confirm on both Arch Linux and neon unstable. I have not reported it because I do not know the exact steps to reproduce yet. As you said, it's a random (and old) bug. If you find the exact steps to reproduce, please file a bug on bugs.kde.org, select frameworks-kio product and then Trash component. Here is a direct link to frameworks-kio product:
https://bugs.kde.org/enter_bug.cgi?product=frameworks-kio

7
AlexVie•

Because it does exactly what you did manually - it just creates a .desktop entry.

There is a trashcan widget though, maybe that works better. I do not use it though.

0
RealNCOP•

Because it does exactly what you did manually - it just creates a .desktop entry.

But the desktop entry has two icon fields in it. One for when there's files in the trash, and one for when it's empty.

1
AlexVie•

Yes, so maybe there is a bug that prevents the Trash can from using the proper icon depending on its state (empty / full).

I can actually reproduce it, the icon rarely updates with the trashcan's filling state.

But the plasmoid/widget Trashcan works fine. It shows a "bloated" trashcan, unless it's empty.

1
starvaldD•

i don't think its ever worked properly, i deleted it off the desktop years ago.

1
[deleted]•

[deleted]

1
RealNCOP•

There is, but it's not good. For example if I double click it, it open the trash folder twice. It also ignores icon positioning. It's like this alien thing that sits on the desktop but doesn't belong there.

2
[deleted]•

[deleted]

1
[deleted]•

[deleted]

-10
[deleted]•

I think it is for drag-and-drop function. Yet I find the trash icon paradigm as popularized elsewhere to be accident-prone. Quite the many files have been sent to the shadow realm.

2