Re: [kde] controlling location of trash on per-filesystem basis?
- Date: Thu, 12 May 2016 09:08:21 +0000 (UTC)
- From: Duncan <1i5t5.duncan@xxxxxxx>
- Subject: Re: [kde] controlling location of trash on per-filesystem basis?
D. R. Evans posted on Wed, 11 May 2016 15:33:13 -0600 as excerpted:
> System: debian jessie; KDE 4.14.2.
> Typically, I have about 20 filesystems of various kinds mounted on my
> desktop system.
> How do I control, per filesystem, whether files sent to trash from that
> filesystem go to a .Trash-<nnnn> directory located on that same
> filesystem or whether they go to the home trash located at
> For some of the filesystems it makes a lot of sense to send the files to
> a trash directory located on the filesystem; but for other filesystems
> it makes much more sense to send the file to the home trash.
> (Right now, the behaviour seems to be always to create and use a trash
> directory on the filesystem of the file being trashed.)
FWIW I've all but disabled trash here (it's set to warn at 0.001%, the
smallest possible setting and a few KiB on most of my filesystems, in
case I ever accidentally use it) as I normally prefer to really delete
files when I want to delete them, but I will occasionally use "trash" for
a temporary rename/move, say for testing, and then simply pull whatever
back out of the trash when I'm done.
So I don't actually use trash much here and am not the ideal person to
I believe I read somewhere, and it makes sense, that the trash mechanism
will try to create that .Trash dir at the root of whatever filesystem,
and will use it if it can do so.
But if permissions at the root of that filesystem are such that the trash
dir can't be created there, the location in $XDG_DATA_HOME (~/.local/
share being the default location if the var isn't set) will be used
If that is indeed the case, all you need to do to on filesystems you
don't want trash dirs to appear on is arrange for the filesystem root dir
to be owned by some other user, say root, and set read-only for the
normal user(s) that would otherwise be creating and trashing files on
that filesystem, so they can't create their trash dirs. Then the default
$XDG_DATA_HOME location should be used.
Alternatively, if you want the filesystem's root dir to be owned by root
and not writable by the users, but still want them to be able to put
their trash there, pre-create the trash dirs and chown them to the
As I said, I don't normally use the trash subsystem and am not sure on
the above, but it does make sense, and is the first thing that I'd test
were I to be trying to control trash locations like that, here.
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
This message is from the kde mailing list.
Account management: https://mail.kde.org/mailman/listinfo/kde.
More info: http://www.kde.org/faq.html.