if I delete a file with nautilus, it gets placed in my “~/.config/local/share/Trash” directory.
Afterwards, if I want to look at my Trash in nautilus, it shows “Trash is Empty”, because this accesses the “~/.local/share/Trash” folder. This is because the files was not placed there.
So my nautilus Trash is empty although I deleted something with nautilus!
If I place the file manually in “~/.local/share/Trash/files”, nautilus sees the files. So, how can I change the Trash path of nautilus or why is that as misconfigured as it is?
I already tried reinstalling nautilus to no avail.
I could symlink the folder in “~/.config” to the one in “~/.local” but that would merely be a quick-fix in my opinion.
Please someone help me with this, it’s really annoying.
Could you quickly create a new user and see if the issue persists? That’ll tell us if it’s a configuration error someplace or whether it’s a system wide nautilus bug, and we can take it from there.
Also, can you please mention the versions of Fedora and nautilus that you are using?
I’m actually setting that path myself, but I do not remember why. Nevertheless, if I remove that export XDG_DATA_HOME = ... command now, will other programs with their data in the “wrong” folder be misconfigured? e.g. flatpak, nvim etc.?
Can I simply remove that export and overwrite the files in “~/.local/share” with the files from the “wrong” folder?
Or can I somehow configure nautilus to actually look at the “wrong” folder? Maybe symlink the right Trash folder in “~/.local/share/Trash” to the “wrong” one at “~/.config/local/share/Trash”?
That was what I was expecting. It seems that you have set the $XDG_DATA_HOME variable, even though this is not set automatically on recent versions of Fedora.
What I suppose it happens is that Nautilus has the Trash folder mapped to $HOME/.local/share, however, the delete (move to trash) action follows the XDG base directory specification, and moves the deleted files to $XDG_DATA_HOME/Trash.
In case you find out why $XDG_DATA_HOME was set up in the first place and presuming you can delete it, upon removing the variable and reboot, all should be working.
If you would like to keep it, I suggest making a bookmark to the actual Trash folder in Nautilus. The fact that the mapped Trash folder in Nautilus doesn’t follow the $XDG_DATA_HOME/Trash path could indicate that it might be hard-coded.
Do you see any data under $XDG_DATA_HOME, except for Trash?
If not, you should be fine removing it. If other apps have already created data there, you could simply back it up and move the data to $HOME/.local/share, remove the variable and then open the affected apps one by one and check if they recognize the existing moved data.
If you’re reserved about making the move, then symlinking the Trash folder might do the trick.
Just to update: I’ve removed my export of XDG_DATA_HOME and backup’d the data from $HOME/.local/share and copied the files from the old XDG_DATA_HOME to $HOME/.local/share, overwriting the files. I’ve tested the applications with files in my “new” XDG_DATA_HOME and so far everything works, especially the Nautilus Trash
I’m keeping the backup for now but will delete it in a month or so, if everything continues to work as expected.