This blog has moved to www.nongeekperspective.com. There you will find new posts

Tuesday, July 25, 2006

 

Configuring a Trash Bin for Xubuntu

If you have read the "Xubuntu Desktop Guide" you know that "Xubuntu does not currently feature a trash bin. Deleted files can not be restored". And after a quick scan to the changelog for xfce4.4 beta2 I think that we have to wait a little more. However, there are a hack for that and I extended it to be used in Thunar.

The Basics

The original hack may result inconvenient for some users: it can be used only in the terminal. For convenience I quote the interesting thing:

Currently, Xubuntu doesn’t have an option to move files to the trash. You can, however, recreate it in the terminal:

First, create a file named /usr/bin/del:

sudo mousepad /usr/bin/del

Copy and paste the following into the file:

#!/bin/bash
mv -vi -- "$@" $HOME/.Trash

Save, exit, and make the file executable. Run sudo chmod -v 755 /usr/bin/del.


Using the hack in Thunar

To use the trash bin in Thunar we just need to create a new custom action. That's easy:

  1. Follow all the steps described in the previous section.
  2. Open Thunar and select "configure custom actions..." in the Edit menu.
  3. Add a new action by pressing the "+" button.
  4. In the dialog, set the options like shown in the figure. Name it like you want. I named it "Move to trash".
  5. In the "appearance conditions" tab leave pattern as "*" and select all the check boxes. See second figure.
Finally, you get the Move to Trash option in the popup menu:



Notice that you must create manually a folder named .Trash in your home folder and that there is no restore option. If you want to restore a file you have to move it from the .Trash folder to the original location.

This can be improved, of course. I wait for your comments.

Add to: del.cio.us | digg | furl | blinklist | netvouz
This blog has moved to www.nongeekperspective.com. There you will find new posts
Comments:
Anonymous Anonymous said:
Hi, Author,
is there any email-account available, will not talk here, just a blogger question?
 
Anonymous Anonymous said:
Great tip. I've bookmarked it for future reference.
 
Post a Comment



<< Home