The following shows how to add a trashcan to the default setup provided by antiX-Full. According to its author it"complies with the freedesktop-trash-spec", so should work OK with any other you may have been trialing that also conforms to the same spec.
The original post has been amended. The following sections describe how to set up Trashcan to work seamlessly and interchangeably when using either ROX-Filer (the default file manager for antiX) or SpaceFM. They both use the same Trashcan. In step-by-step form, it covers:
- Getting the files,
- Installing Trashcan,
- Setting up items in the menus of ROX-Filer and SpaceFM,
- Putting Trashcan on the desktop,
GETTING THE FILES
All the required files are contained in trashcan-antix.zip. A link to the file is at the foot of this post. Download it to the root of your home directory (folder).
Extract the contents of the zip archive
- Open Archive Manager (File-Roller)
- Select trashcan-antix.zip-->Click Open
- Archive-->Extract
- Select your home directory-->Click Extract
Note: It is important to select the root of your home directory rather than a sub-directory
trashcan-bin.zip, trashcan-rox-links.zip, trashcan-rox-scripts.zip, trashcan-spacefm-menuitems.tgz, trashcan-spacefm-deletkeytotrashcan.tgz
TRASHCAN
trashcan-bin.zip contains the trashcan executable files. Unzipping this file automatically places them in a hidden directory (folder) within your home directory (.local/bin/Trashcan).
Set up Trashcan
- Open Archive Manager (File-Roller)
- Select trashcan-bin.zip-->Click Open
- Archive-->Extract
- Select your home directory-->Click Extract
Note: It is important to select the root of your home directory (folder) rather than a sub-directory
ROX-FILER
Setting up Trashcan within Rox is done in three steps, creating some scripts, creating some menu items, then assigning icons to them.
Create the scripts
Do this step as root. It will create three files, trashcan-empty.sh, trashcan-restore-all.sh, trashcan-view.sh
- Open Archive Manager (File-Roller)
- Select trashcan-rox-scripts.zip-->Click Open
- Archive-->Extract
- File System-->usr-->local-->bin-->Click Extract
Do this step as your normal user. It will automatically create a link to Trashcan in your home directory (folder) and items in the right-click-->Send To menu of ROX.
- Open Archive Manager (File-Roller)
- Select trashcan-rox-links.zip-->Click Open
- Archive-->Extract
- Select your home directory-->Click Extract
Note: It is important to select the root of your home directory rather than a sub-directory
Assign icons to the menu items
Do this step as your normal user in ROX-Filer. It is easier to do with two open ROX windows. Both of them are hidden directories with your home directory (folder).
Tip: Click on the eye icon in ROX to show hidden files.
- Open a window .local-->bin
- Right-click Trashcan-->Look Inside
- Open a window .config-->rox.sourceforge.net-->SendTo-->Trashcan
- Right-click-->Empty Trashcan-->right-click-->Set Icon
- Select radio button"Only for the file..."
- Drag-and-drop trash-full.png into the Set icon window
- Repeat steps 4 to 6 inclusive for Restore All Trash and View Trash
SPACEFM
Setting up Trashcan within SpaceFM is done in two stages, creating items in the right-click menu, and an optional step of changing the keyboard delete key to point to Trashcan. Do the stages in SpaceFM as your normal user.
If you use only SpaceFM to manage your files and also set up Trashcan for ROX-Filer, there will be a redundant link named Trashcan in your home folder. This may safely be deleted as it is not used in SpaceFM.
Create the menu items
- Plugins-->Copy-->File
- Select trashcan-spacefm-menuitems.tgz-->Click OK
- Close the Copy Plugin dialog box that opens
- In the main panel (lists both files and directories) right-click on white space
- In the box that opens move the cursor over any active item (e.g. Go)
- Right-click again on the active item to close its pop-up menu
- Right-click again on the active item to open a further pop-up menu
- In the pop-up menu-->Click Paste
OPTIONAL STEPS RELATED TO THE KEYBOARD KEYS
Change the action of the delete key on the keyboard
Assign a key combination to the delete key
- In the main panel-->right-click on a file or directory
- In the pop-up menu-->right-click Delete-->left-click Key
- On the keyboard, press CTRL (hold it down) and press Delete
- In the Set Key window-->Click Set
Assign Trashcan to the delete key
- Plugins-->Copy-->File
- Select trashcan-spacefm-deletekeytotrashcan.tgz-->Click OK
- Close the Copy Plugin dialog box that opens
- In the main panel right-click on white space
- In the box that opens move the cursor over any active item (e.g. Go)
- Right-click again on the active item to close its pop-up menu
- Right-click again on the active item to open a further pop-up menu
- In the pop-up menu-->Click Paste
- In the main panel right-click on white space
- In the pop-up menu-->right-click Add To Trashcan-->left-click Key
- On the keyboard, press Delete
- In the Set Key window-->Click Set
TRASHCAN ON THE DESKTOP
To have Trashcan displayed on the desktop, your system must be running ROX Pinboard. This is the default for antiX as shipped. ROX Pinboard manages the icons on your desktop. Using any other application to do this (including SpaceFM) will prevent Trashcan from working on the desktop.
Place Trashcan on the desktop
Tip: Click on the eye icon in ROX to show hidden files.
- Open a ROX-Filer window in your home directory to show the hidden directory .local-->bin
- Drag-and-Drop the Trashcan icon to your desktop
Right-click the the desktop icon to empty or restore all trash.
Left-click the the desktop icon to view trash. In this window a right-click on a single file enables it to be restored or permanently deleted.
Screen shot of the end result.
Aknowledgement: dolphin_oracle