LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 01-13-2011, 10:00 AM   #1
von.hake
LQ Newbie
 
Registered: Sep 2010
Location: Ukraine
Distribution: Debian Squeeze
Posts: 13

Rep: Reputation: 0
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.
 
Old 01-13-2011, 09:08 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,324
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
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.
 
Old 01-14-2011, 04:11 AM   #3
von.hake
LQ Newbie
 
Registered: Sep 2010
Location: Ukraine
Distribution: Debian Squeeze
Posts: 13

Original Poster
Rep: Reputation: 0
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?
 
Old 01-14-2011, 04:26 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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.
 
Old 01-14-2011, 04:37 AM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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.
 
Old 01-17-2011, 04:29 AM   #6
von.hake
LQ Newbie
 
Registered: Sep 2010
Location: Ukraine
Distribution: Debian Squeeze
Posts: 13

Original Poster
Rep: Reputation: 0
That's it! Thank you.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Lost disk space after deleting files, trash, hidden trash, etc. themacguy Ubuntu 7 06-06-2012 02:51 AM
Deleting files from command line goes to trash? HSN Linux - Enterprise 1 02-18-2007 11:38 PM
How to start midnight commander in GUI sofasurfer Linux - Software 11 03-02-2004 02:48 PM
Renaming files in Midnight Commander Josnap Linux - Software 2 09-02-2003 04:24 AM
localized fonts in rxvt & midnight commander / mandrake 9.1 2dope Linux - Newbie 0 07-25-2003 09:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 12:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration