If you get the following error when you are deleting a file within Thunar then it should be the right moment to check few things, if you want it to be fixed:
- check if you have gvfs installed
- check if you have a ~/.local/share/Trash folder (with the file mod 700) on the same volume as the file/folder that you want to delete
I had the following situation:
- the ~/Documents and the ~/Downloads folders that exists in my ~/ are not located physically on the same partition like the rest of the ~/ folder; instead, I keep them on a different partition (which is a logical volume on a stripe-set physical volume) mostly because I want them to move fast:
So anytime I want to delete something within the Documents/Downloads folders I got an error like: "Unable to find or create trash directory".
The error came actually from the gvfs-trash because basically Thunar has gnome-base/gvfs as a dependency, so anytime when you are moving something to Trash can within Thunar, you actually call the command : gvfs-trash .
Anyway, what is worth to remember is that according with Thunar home page:
The trash implementation, which was introduced with the first release candidate of Thunar (0.4.0 RC1), was initially limited to the home trash, and therefore not a fully compliant implementation of the Desktop Trash Can Specification. This release finally adds support for the so-called trashing to "top directories", which means that files can be trashed into special folders on removable volumes to avoid costly copying to the home folder. Xfce is thereby the second desktop which fully complies with the Desktop Trash Can Specification.
This means that if you have Thunar 0.8.0 (or later) you can take the advantage of using a Trash folder at the top level of any volume you might have.
So what I did:
I went to the volume-root directory (mounted at /home/eugen/lvhome/) where I have a folder called /<my-profile> where I keep my Documents/Downloads folders:
and I have created a Trash directory structure with the right permissions inside the <volume-root>/<my-profile>/.local/share:
mkdir -p /home/eugen/lvhome/eugen/.local/share/Trash/{files,info} chmod -R 700 /home/eugen/lvhome/eugen/.local/share/Trash
Now, when I am trying to delete a file/folder that exists on this volume (in Documents/Downloads folder for instance) I don't get anymore an error message but a confirmation message box:
So, problem solved. Happy trashing! ð
Now, if you think that this article was interesting don't forget to rate it. It shows me that you care and thus I will continue write about these things.
Eugen Mihailescu
Latest posts by Eugen Mihailescu (see all)
- Dual monitor setup in Xfce - January 9, 2019
- Gentoo AMD Ryzen stabilizator - April 29, 2018
- Symfony Compile Error Failed opening required Proxies - January 22, 2018
Hi, that's interesting --and should become a more common case (think of SSD market share, chromebooks with awfully limited internal SSDs for ex.). ALso I like how you present the background --for those of us curious as you seem to be 😉 Note that CSS has made his way through your commadn line example.
Am on a live distro (excellent Porteus) as user Ω and have symlinked the Desktop to user's Ø Desktop on my babe's laptop. The two users share a common gid but have different uid. User Ø dirs have a 770 umask.
Created the /user/Trash... dir structure at the root of user Ø's partition, chmod'ed 700 but still cannot delete via Porteus' XFCE GUI. Is that because of the different users?
Cheers!
Kozaki
What version of Thunar do you have? If you have a 0.7.9 or older version then it only supports trash folder inside your home directory and not somewhere else.