I used to just press the Delete key on selected files on Nautilus
, and then it would trash the file(s) without confirmation. That was very convenient.
I later decided that my Trash may contain sensitive files, and thus moved it to the eCryptfs Private
folder, and created the symlink ~/.local/share
in its place.
Thereafter, when I Delete files that are inside eCryptfs
, behavior is as expected, no problems. On the other hand, when I try to delete files in my home directory but outside eCryptfs, I get this message:
The same behavior is seen when deleting items from a different drive...
Is there a workaround to just automatically put it in my encrypted trash anyways even if it belongs to another/unencrypted drive/mount?
If that really cannot be done, then is two Trashes
possible? One for encrypted files and another for unencrypted ones?
When you move files to trash with Nautilus or
gvfs-trash
they are never moved to a different volume. They are “rename
d” to a different directory entry (inside the trash directory) on the same volume. Note that the documentation of that function explains that files cannot be “renamed” onto different volumes or mount points.This means that moving a file to the trash from an encrypted volume (whether by eCryptFS, dm-crypt/LUKS or anything else that requires the kernel to mount something) will never result in the decryption of the file. Hence I don't think it's beneficial to link
~/.local/share/Trash
to something underneath~/Private
. You can test that with the following commands:which should give you something like:
Interestingly the file doesn't turn up in my virtual trash folder:
(While the same works when I do
gvfs-trash ~/foobar.txt
.)For the reason outlined above I think it's impossible with the current implementation of gvfs-trash to have a trash on a different volume than the original volume of the file sent to trash.