Wastebin auto-delete doesn't work

Hey!

I love the feature that your wastebin empties step by step when it’s full and after an amount of time respectively.

I let a script run that re-encodes a whole lot of data and trashed the raw files, in case something goes wrong, in order to restore them.
However, on a fresh install, I configured the wastebin, let the script run, came back and had 120GB in it, the limit being 10GB.

I emptied it, replicated the issue and it is persistent.

What may cause it? Or at least how could I track it? I don’t quite know how to make or view logfiles for dolphin.

Thanks in advance,
Arokan

With which command do you move the files to trash in your script? Maybe this could be a issue with your CLI tool.

Can you share your script or tell me how you move this files to trash so I can try to reproduce?

If you think this is a KDE specific issue you can file a bug report to https://bugs.kde.org/

I’m not using a script per se, I’m using a function of dolphin.
Screenshot - 23.07.2023 - 21.46.00

I’m moving the files & folders to wastebin via “Move to Wastebin” (dolphin->Right-click) and trash-cli from the debian-repo.

It’s supposed to work as described:
If a file is older than x, then it gets removed.
If the wastebin exceeds Y% of total storage, the oldest or biggest file gets removed.

This worked perfectly on my old setup, but it doesn’t now and it’s a tool I really like and use a lot.
I can’t tell what changed. I don’t know and don’t suspect it’s a KDE-bug, I just don’t know where to start in fixing it. Syslog and Kern.log tell me nothing and I don’t know where to dig deeper.

So I just tried it on my system and it works as you described it without issues.

Some Ideas:

  • could be because we run different versions (your might have a bug). I am on Plasma 5.27.6. What version are you running (or which distri)?

  • you seem to have multiple wastebins? Can you recheck if you configured the correct wastebin?

  • Try kioclient5 from the kde-cli-tools instead of trash-cli
    example: kioclient5 move file trash:/

Sorry it took so long. In the meantime, I wrote a script that does half the job if the dolphin wastebin management, though I’d really like it to work as intended.

  • I’m on Debian Bookworm, kde-plasma-desktop is 5.142, dolphin is 4.22.12.3-1.
  • All are configured correctly
  • It didn’t matter whether I put files to wastebin via right-click or trash-cli, it was working as intended on a former installment; I just can’t figure out what changed.
    As far as I remember, the already too place on a fresh install.

Thanks for reading and thinking!
Arokan.

P.S.: It’s probably, like so often, a minor issue that’s fixed with a one-liner. It’d be helpful if I knew, how to debug dolphin/kde, so I could look into it.

:~$ kshell5 kcm_trash
kdeinit5: preparing to launch ‘/usr/lib/x86_64-linux-gnu/libexec/kf5/klauncher’
kdeinit5: Launched KLauncher, pid = 168261, result = 0
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
kdeinit5: opened connection to :1
kdeinit5: Got SHELL ‘kcm_trash’ from wrapper.
kdeinit5: preparing to launch ‘’
KInit could not launch ‘kcm_trash’.
kdeinit5: PID 168271 terminated.

Does anybody know, what to make of this?

That command fails for me aswell. Not sure if this is supposed to work.

Okay, you were right all along. :smiley:
trash-cli doesn’t trigger the cleanup-process.
I was assuming the wastebin gets checked once every minutes or so.
It does get triggered by kioclient5, “move to trash” in context menu, but alas not trash-cli.

I actually don’t know whether this is a bug, because it’s not aware of the contents of the trashbin, or a feature, because it doesn’t waste unnecessary checks.

Thanks for help! :slight_smile:

1 Like

I launch the trash configuration dialog using kcmshell5 kcm_trash.

There’s no timed check for trash bin limits - it probably would not be a good idea anyway, except waste of checks, it means that you can overflow the trash bin for the duration between checks. Instead the check is done whenever you trash a file. If you use something that isn’t KDE to trash the file - even if it obeys the FreeDesktop.org trash spec - you don’t get the “KDE magic” working.