Bypass the Trash when using Delete key

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
JerryF
Level 16
Level 16
Posts: 6570
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

Bypass the Trash when using Delete key

Post by JerryF »

Hello all,

In Preferences for Thunar (Xfce's File Manager), there's no option to bypass the trash when using the delete key.

I know that Shift+Del will bypass the trash, but using Shift+Del prompts to make sure you want to delete which I'd like to avoid.

Is there any way to change Del so that it will just permanently delete?

Thanks.

Code: Select all

inxi -Fxz
System:    Host: HP-EliteBook-8460p Kernel: 4.15.0-34-generic x86_64 bits: 64 gcc: 7.3.0
           Desktop: Xfce 4.12.3 (Gtk 2.24.31) Distro: Linux Mint 19 Tara
Machine:   Device: laptop System: Hewlett-Packard product: HP EliteBook 8460p v: A0001D02 serial: N/A
           Mobo: Hewlett-Packard model: 161C v: KBC Version 97.4E serial: N/A
           BIOS: Hewlett-Packard v: 68SCF Ver. F.65 date: 04/06/2017
Battery    BAT0: charge: 36.6 Wh 84.6% condition: 43.3/43.3 Wh (100%)
           model: Hewlett-Packard Primary status: Charging
CPU:       Dual core Intel Core i5-2520M (-MT-MCP-) arch: Sandy Bridge rev.7 cache: 3072 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 9977
           clock speeds: max: 3200 MHz 1: 841 MHz 2: 798 MHz 3: 856 MHz 4: 816 MHz
Graphics:  Card: Intel 2nd Generation Core Processor Family Integrated Graphics Controller bus-ID: 00:02.0
           Display Server: x11 (X.Org 1.19.6 ) drivers: modesetting (unloaded: fbdev,vesa)
           Resolution: 1600x900@59.90hz
           OpenGL: renderer: Mesa DRI Intel Sandybridge Mobile version: 3.3 Mesa 18.0.5 Direct Render: Yes
Audio:     Card Intel 6 Series/C200 Series Family High Definition Audio Controller
           driver: snd_hda_intel bus-ID: 00:1b.0
           Sound: Advanced Linux Sound Architecture v: k4.15.0-34-generic
Network:   Card-1: Intel 82579LM Gigabit Network Connection driver: e1000e v: 3.2.6-k port: 4060 bus-ID: 00:19.0
           IF: enp0s25 state: down mac: <filter>
           Card-2: Intel Centrino Advanced-N 6205 [Taylor Peak] driver: iwlwifi bus-ID: 24:00.0
           IF: wlo1 state: up mac: <filter>
Drives:    HDD Total Size: 320.1GB (31.8% used)
           ID-1: /dev/sda model: Hitachi_HTS72323 size: 320.1GB
Partition: ID-1: / size: 30G used: 10G (36%) fs: ext4 dev: /dev/sda1
           ID-2: /home size: 177G used: 78G (47%) fs: ext4 dev: /dev/sda7
           ID-3: swap-1 size: 8.59GB used: 0.00GB (0%) fs: swap dev: /dev/sda5
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 50.0C mobo: 0.0C
           Fan Speeds (in rpm): cpu: N/A
Info:      Processes: 224 Uptime: 1:04 Memory: 1916.2/7886.6MB Init: systemd runlevel: 5 Gcc sys: 7.3.0
           Client: Shell (bash 4.4.191) inxi: 2.3.56 
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.
richyrich

Re: Bypass the Trash when using Delete key

Post by richyrich »

Shift-Delete , then the Enter key. :)
DAMIEN1307

Re: Bypass the Trash when using Delete key

Post by DAMIEN1307 »

hi jerry...just click on "files/home" envelope, then click the tab marked "edit", then click "preferences", then click tab marked "behaviour" scroll down to "trash" UNTIC the box that says something like "ask before emptying the trash or deleting files", and then tic the boxes that say something like "include a delete command that bypasses trash", and "bypass the trash when delete key is pressed"...that should do it...DAMIEN
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: Bypass the Trash when using Delete key

Post by rene »

JerryF wrote: Sat Sep 15, 2018 1:10 pm In Preferences for Thunar (Xfce's File Manager), there's no option to bypass the trash when using the delete key. I know that Shift+Del will bypass the trash, but using Shift+Del prompts to make sure you want to delete which I'd like to avoid. Is there any way to change Del so that it will just permanently delete?
Not through standard configuration, no: https://wiki.xfce.org/faq#file_manager

If you're at all into perverted hacks you can also install inotify-tools and add the following "Empty Trash" application to Settings -> Session and Startup -> Application Autostart to immediately delete anything appearing in the trash:

Code: Select all

/bin/bash -c 'TRASH=${XDG_DATA_HOME:=~/.local/share}/Trash && /usr/bin/inotifywait --quiet --event create "$TRASH/info" --format %f --monitor | while read INFO; do rm -f "$TRASH/info/$INFO" "$TRASH/files/${INFO%%.trashinfo}"; done'
[EDIT] Added "--quiet for inotifywait so as to get only the actual creation events.
Last edited by rene on Sat Sep 15, 2018 5:16 pm, edited 1 time in total.
DAMIEN1307

Re: Bypass the Trash when using Delete key

Post by DAMIEN1307 »

OOOOPS, my bad, im using Nemo File Manager...DAMIEN
User avatar
JerryF
Level 16
Level 16
Posts: 6570
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

Re: Bypass the Trash when using Delete key

Post by JerryF »

richyrich wrote: Sat Sep 15, 2018 2:34 pm Shift-Delete , then the Enter key. :)
Thanks richy, but as I said in my OP, I'd like to avoid that. :wink:
User avatar
JerryF
Level 16
Level 16
Posts: 6570
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

Re: Bypass the Trash when using Delete key

Post by JerryF »

rene wrote: Sat Sep 15, 2018 3:48 pm Not through standard configuration, no: https://wiki.xfce.org/faq#file_manager

If you're at all into perverted hacks you can also install inotify-tools and add the following "Empty Trash" application to Settings -> Session and Startup -> Application Autostart to immediately delete anything appearing in the trash:

Code: Select all

/bin/bash -c 'TRASH=${XDG_DATA_HOME:=~/.local/share}/Trash && /usr/bin/inotifywait --quiet --event create "$TRASH/info" --format %f --monitor | while read INFO; do rm -f "$TRASH/info/$INFO" "$TRASH/files/${INFO%%.trashinfo}"; done'
[EDIT] Added "--quiet for inotifywait so as to get only the actual creation events.
rene, thank you for that!
User avatar
JerryF
Level 16
Level 16
Posts: 6570
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

Re: Bypass the Trash when using Delete key

Post by JerryF »

DAMIEN1307 wrote: Sat Sep 15, 2018 3:53 pm OOOOPS, my bad, im using Nemo File Manager...DAMIEN
Thanks anyway Damien.
Locked

Return to “Xfce”