Disable trash - how to? Mint 9 Fluxbox

Forum rules
Before you post please read this

Disable trash - how to? Mint 9 Fluxbox

Postby daquirm on Wed Sep 08, 2010 6:46 pm

Dear all,

I hate trash bin in Thunar, never really got it why it even exists in Linux. Is there a way how to disable it completely? My problem is that I use a NFS storage based on Freenas as a primary source of any multimedia, when I decide to delete something it keeps moving the files to trash which in case of a network storage takes unacceptable long period of time.
Or is there a way how to assign the DEL key to deleting a file?

Thanks for your replies.

D.
daquirm
Level 2
Level 2
 
Posts: 56
Joined: Wed Sep 08, 2010 1:11 pm
Location: Prague, CZ

Linux Mint is funded by ads and donations.
 

Re: Disable trash - how to? Mint 9 Fluxbox

Postby shane on Wed Sep 08, 2010 6:58 pm

Why not use Shift+Del?
User avatar
shane
Level 6
Level 6
 
Posts: 1300
Joined: Sun Feb 25, 2007 11:15 pm

Re: Disable trash - how to? Mint 9 Fluxbox

Postby daquirm on Wed Sep 08, 2010 7:33 pm

For some reason SHIFT+DEL doesn't work as like in other systems!
daquirm
Level 2
Level 2
 
Posts: 56
Joined: Wed Sep 08, 2010 1:11 pm
Location: Prague, CZ

Re: Disable trash - how to? Mint 9 Fluxbox

Postby ju1ius on Thu Sep 09, 2010 11:37 am

Why not use a Thunar action ?
I had the same problem deleting files on very old and slow usb devices, so I wrote this script:
Code: Select all
#!/bin/bash

################################################################
# This script is meant to be called from a Thunar custom action:
# /path/to/rmrf %F
################################################################

############################## i18n #############################
title="WARNING !"
question="<b>THIS OPERATION IS IRREVERSIBLE !</b>\nDo You really want to erase:\n"
case $LANG in
  ######## french ########
  fr* )
    title="ATTENTION !"
    question="<b>CETTE OPÉRATION EST IRRÉVERSIBLE !</b>\nVoulez-vous vraiment supprimer:\n"
  ;;
  # Add your translations here...
esac

######################### Zenity Interface ########################
question=$(
  echo $question;
  for f in "$@"; do echo $f; done
)

if zenity --question --title="$title" --text="$question"
then
  rm -rf "$@"
fi

Saved it as ~/bin/rmrf
and added this action to ~/.config/Thunar/uca.xml
Code: Select all
 <action>
    <icon>gtk-no</icon>
    <name>rmrf</name>
    <command>~/bin/rmrf %F</command>
    <description>rmrf selected files</description>
    <patterns>*</patterns>
    <directories/>
    <audio-files/>
    <image-files/>
    <other-files/>
    <text-files/>
    <video-files/>
  </action>

Now you can select files/folders, right-click and rmrf !! :wink:
ju1ius
Level 1
Level 1
 
Posts: 35
Joined: Wed Jul 29, 2009 11:40 am
Location: Marseille, France

Re: Disable trash - how to? Mint 9 Fluxbox

Postby daquirm on Thu Sep 09, 2010 12:11 pm

Thanks for your help julius, this feature is implemented as default in linux mint 9 fluxbox, but from the point of view of a user:
pressing DEL = one step = 1 sec
pressing right button, finding in the menu, pressing left button = 3 steps = 3 sec = discomfort!

Could any workaround work just by pressing SHIFT+DEL, or DEL somehow?

Every time I try to delete something I'm throwing my time into waste, mainly I choose Mint Fluxbox, because of the speed even if I'm using relatively well configured PC.
daquirm
Level 2
Level 2
 
Posts: 56
Joined: Wed Sep 08, 2010 1:11 pm
Location: Prague, CZ


Return to Others

Who is online

Users browsing this forum: No registered users and 2 guests