LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   How to force Midnight Commander deleting files&folders to GUI trash? (https://www.linuxquestions.org/questions/linux-desktop-74/how-to-force-midnight-commander-deleting-files-and-folders-to-gui-trash-856099/)

von.hake 01-13-2011 10:00 AM

How to force Midnight Commander deleting files&folders to GUI trash?
 
Hi!
Is it possible to make mc using trash when deleting files and folders in the way defined by FreeDesktop.org Trash Specification ?
I've tried to make an alias for rm command replacing it with trash-put (trash-cli utility), but it didn't help.

frankbell 01-13-2011 09:08 PM

I don't think so. I don't think mc understands GUIs.

I took a look at Gnome Commander. It doesn't seem to have a move to trash option either.

Of course, I may be wrong and, if so, I hope someone corrects me.

von.hake 01-14-2011 04:11 AM

ok, when not GUI trash then can it just move deleted files to some folder called Trash, in order to have a possibility of restoring deleted files during some period of time?

jschiwal 01-14-2011 04:26 AM

Use the search on this site. Someone asked a similar question in the past about aliasing rm to mv. The solution was to intercept the system call for rm so that a move to trash was done instead. Sorry, but I don't remember the details.

jschiwal 01-14-2011 04:37 AM

I think I found the project.
http://freshmeat.net/projects/libtrash

It intercepts system calls such as unlink() and moves the files to a users .Trash folder instead.

von.hake 01-17-2011 04:29 AM

That's it! Thank you.


All times are GMT -5. The time now is 11:12 AM.