LinuxQuestions.org
Help answer threads with 0 replies.
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, 11: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, 10: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: 15,890
Blog Entries: 27

Rep: Reputation: 4671Reputation: 4671Reputation: 4671Reputation: 4671Reputation: 4671Reputation: 4671Reputation: 4671Reputation: 4671Reputation: 4671Reputation: 4671Reputation: 4671
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, 05: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, 05:26 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678
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, 05:37 AM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678
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, 05: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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 03:51 AM
Deleting files from command line goes to trash? HSN Linux - Enterprise 1 02-19-2007 12:38 AM
How to start midnight commander in GUI sofasurfer Linux - Software 11 03-02-2004 03:48 PM
Renaming files in Midnight Commander Josnap Linux - Software 2 09-02-2003 05:24 AM
localized fonts in rxvt & midnight commander / mandrake 9.1 2dope Linux - Newbie 0 07-25-2003 10:38 PM

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

All times are GMT -5. The time now is 08: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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration