Trash Trouble with Symbolic Links from /home to Separate Disk

One Response · January 8, 2012

I began notic­ing recently that some­times when try­ing to send a file to the trash, I was told that it couldn’t be moved there and that I’d have to delete it entirely to get rid of it. I didn’t really think any­thing of this at first, until I began to sus­pect that it was only hap­pen­ing with files in my /home directory.

My /home direc­tory is on its own par­ti­tion on a stan­dard hard disk. The rest of the file sys­tem is on another par­ti­tion on an SSD. In order to fully reap the speed ben­e­fits of an SSD, I sym­bol­i­cally linked as many non-personal direc­to­ries as I could from /home to /var/jay on the SSD. These included ~/.local, ~/.cache, ~/.gconf, ~/.mozilla, etc.

I didn’t really know much about the way Linux/GNOME han­dles Trash. Files deleted from a third inter­nal hard disk or from USB sticks would be moved to /.Trash-1000 on that device, while appear­ing in “Trash” in Nau­tilus. Files from a user’s home direc­tory, how­ever, don’t go to /home/.Trash-1000, or even /.Trash-1000 — instead, they go to ~/.local/share/Trash. Because in my setup this direc­tory was on the SSD rather than the hard disk with the /home par­ti­tion, GNOME refused to move it there, since that would require copy­ing from one disk to another, which GNOME’s devel­op­ers (smartly, I think) believe would be alarm­ingly time-consuming for some­one who’s just try­ing to delete some files — they shouldn’t expect to see a copy dia­log grind­ing away.

In order to try to fix this, I made ~/.local/share/Trash into a sym­bolic link itself, back to the /home par­ti­tion at ~/Trash. After this change, things were get­ting trashed prop­erly — at least, I wasn’t asked to delete them entirely — but they weren’t show­ing up in Nautilus’s Trash view. I don’t know how Nau­tilus makes itself aware of all the trash fold­ers spread across dif­fer­ent devices, but for what­ever rea­son it wasn’t pick­ing up on this one, even after sev­eral reboot cycles.

Finally I gave up and moved ~/.local back onto the same par­ti­tion as /home, and now everything’s back to nor­mal. But I’d still like to know if it’s pos­si­ble to keep ~/.local on a sep­a­rate disk while retain­ing GNOME’s and Nautilus’s ordi­nary trash behavior.

I just ran into the same prob­lem. Thanks for post­ing. I’m look­ing for a solution.

Richard Ayotte · 8 Mar 2012

Leave a Comment or Subscribe