Disable trash - how to? Mint 9 Fluxbox

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
daquirm

Disable trash - how to? Mint 9 Fluxbox

Post by daquirm »

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.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
shane
Level 5
Level 5
Posts: 940
Joined: Sun Feb 25, 2007 11:15 pm
Contact:

Re: Disable trash - how to? Mint 9 Fluxbox

Post by shane »

Why not use Shift+Del?
daquirm

Re: Disable trash - how to? Mint 9 Fluxbox

Post by daquirm »

For some reason SHIFT+DEL doesn't work as like in other systems!
ju1ius

Re: Disable trash - how to? Mint 9 Fluxbox

Post by ju1ius »

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:
daquirm

Re: Disable trash - how to? Mint 9 Fluxbox

Post by daquirm »

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.
Locked

Return to “Software & Applications”