How does the Trash Can work, and where can I find official documentation, reference, or specification for it?

Solution 1:

GNOME is using .Trash correctly as far as I understand - if you look in gio/glocalfile.c source you'd see that it does make an attempt to use the .Trash directory if it exists. Do note though that the directory has to have the correct permissions for users to be able to safely store trash files in it (and in safely here, I mean that other users won't be able to recover user's trashed files). For this GNOME requires that the .Trash directory must have the sticky bit set on it - see Trash Directories,note (1) in FreeDesktop.Org's Trash specification.

The main problem with the above approach, is that most r/w removable media you find is FAT, which doesn't support the sticky bit so the only way to handle this safely is to use a per user trash directory.

Regarding root Trash - I can't reproduce the problem you describe, it seems to work well for me.

Regarding /etc/fstab - I'm not sure what is the problem there: you should need to mess around with fstab, unless you want full control over where an external file system is mounted. Normally removable media is mounted automatically upon detection in /media for the user that is currently active, but it is then inaccessible to any other user. If you want a different setup then you should mess with the configuration file. I don't see how that relates to trash, though.

Solution 2:

A bit late this, but if anyone is interested: , I had the same problem but, on advice I downloaded Dolphin. I then ran Dolphin through sudo dolphin in terminal.

Now, right clicking on the Wastebin and selecting Empty Wastebin clears the files rather than producing an error.

This does not really relate to your question, but is simply a work around.