How to disable trash can in Thunar/XFCE?
Clash Royale CLAN TAG#URR8PPP
up vote
7
down vote
favorite
I found myself always holding Shift when I delete a file with Thunar (the XFCE file manager).
When I was using Windows I was always disabling "recycle bin" immediately after installation. I've looked for similar option in Thunar settings but had no luck finding it.
Do you happen to know a way?
xfce thunar file-management
add a comment |Â
up vote
7
down vote
favorite
I found myself always holding Shift when I delete a file with Thunar (the XFCE file manager).
When I was using Windows I was always disabling "recycle bin" immediately after installation. I've looked for similar option in Thunar settings but had no luck finding it.
Do you happen to know a way?
xfce thunar file-management
2
Since I assume that XFCE conforms to the FreeDesktop.org Trash Specification, a workaround would be to run a cron job every minute callingtrash-empty
(from the packagetrash-cli
).
â Marco
Oct 14 '12 at 18:23
Looks like an ugly "crutch" of a kind for me on first sight but may be a nice compromise at the same time: at least I will be able to restore a file during some time after deletion if I realize I've done it by a mistake (happened to me about 5 times during 20 years - had to use special undeletion utilities to restore).
â Ivan
Oct 14 '12 at 18:27
1
It definitely is! If you want finer control of what is deleted and when, I would suggest having a look at the packageautotrash
. Calling it from a user crontab I would consider a clean solution. It however does not answer your question, that's why I leave it as a comment.
â Marco
Oct 14 '12 at 18:34
add a comment |Â
up vote
7
down vote
favorite
up vote
7
down vote
favorite
I found myself always holding Shift when I delete a file with Thunar (the XFCE file manager).
When I was using Windows I was always disabling "recycle bin" immediately after installation. I've looked for similar option in Thunar settings but had no luck finding it.
Do you happen to know a way?
xfce thunar file-management
I found myself always holding Shift when I delete a file with Thunar (the XFCE file manager).
When I was using Windows I was always disabling "recycle bin" immediately after installation. I've looked for similar option in Thunar settings but had no luck finding it.
Do you happen to know a way?
xfce thunar file-management
xfce thunar file-management
asked Oct 14 '12 at 18:16
Ivan
5,619196597
5,619196597
2
Since I assume that XFCE conforms to the FreeDesktop.org Trash Specification, a workaround would be to run a cron job every minute callingtrash-empty
(from the packagetrash-cli
).
â Marco
Oct 14 '12 at 18:23
Looks like an ugly "crutch" of a kind for me on first sight but may be a nice compromise at the same time: at least I will be able to restore a file during some time after deletion if I realize I've done it by a mistake (happened to me about 5 times during 20 years - had to use special undeletion utilities to restore).
â Ivan
Oct 14 '12 at 18:27
1
It definitely is! If you want finer control of what is deleted and when, I would suggest having a look at the packageautotrash
. Calling it from a user crontab I would consider a clean solution. It however does not answer your question, that's why I leave it as a comment.
â Marco
Oct 14 '12 at 18:34
add a comment |Â
2
Since I assume that XFCE conforms to the FreeDesktop.org Trash Specification, a workaround would be to run a cron job every minute callingtrash-empty
(from the packagetrash-cli
).
â Marco
Oct 14 '12 at 18:23
Looks like an ugly "crutch" of a kind for me on first sight but may be a nice compromise at the same time: at least I will be able to restore a file during some time after deletion if I realize I've done it by a mistake (happened to me about 5 times during 20 years - had to use special undeletion utilities to restore).
â Ivan
Oct 14 '12 at 18:27
1
It definitely is! If you want finer control of what is deleted and when, I would suggest having a look at the packageautotrash
. Calling it from a user crontab I would consider a clean solution. It however does not answer your question, that's why I leave it as a comment.
â Marco
Oct 14 '12 at 18:34
2
2
Since I assume that XFCE conforms to the FreeDesktop.org Trash Specification, a workaround would be to run a cron job every minute calling
trash-empty
(from the package trash-cli
).â Marco
Oct 14 '12 at 18:23
Since I assume that XFCE conforms to the FreeDesktop.org Trash Specification, a workaround would be to run a cron job every minute calling
trash-empty
(from the package trash-cli
).â Marco
Oct 14 '12 at 18:23
Looks like an ugly "crutch" of a kind for me on first sight but may be a nice compromise at the same time: at least I will be able to restore a file during some time after deletion if I realize I've done it by a mistake (happened to me about 5 times during 20 years - had to use special undeletion utilities to restore).
â Ivan
Oct 14 '12 at 18:27
Looks like an ugly "crutch" of a kind for me on first sight but may be a nice compromise at the same time: at least I will be able to restore a file during some time after deletion if I realize I've done it by a mistake (happened to me about 5 times during 20 years - had to use special undeletion utilities to restore).
â Ivan
Oct 14 '12 at 18:27
1
1
It definitely is! If you want finer control of what is deleted and when, I would suggest having a look at the package
autotrash
. Calling it from a user crontab I would consider a clean solution. It however does not answer your question, that's why I leave it as a comment.â Marco
Oct 14 '12 at 18:34
It definitely is! If you want finer control of what is deleted and when, I would suggest having a look at the package
autotrash
. Calling it from a user crontab I would consider a clean solution. It however does not answer your question, that's why I leave it as a comment.â Marco
Oct 14 '12 at 18:34
add a comment |Â
4 Answers
4
active
oldest
votes
up vote
3
down vote
According to the Xfce FAQ, you cannot disable the Trash.
They provide three suggestions, two of which which are also mentioned in the comments above:
Use Shift + del to bypass the trash bin and immediately delete something for real.
use cron to clean the trash every now and then.
or create custom action for permanent delete(like in gnome) with action: rm %f then in context menu you'll have button âÂÂpermanent deleteâÂÂ
Personally, I use the a cron job that runs every 24 hours that calls trash-empty
. You can simply call the command by itself, or give an option(in days) to remove files that have been in the trash longer than that specified number of days.
add a comment |Â
up vote
2
down vote
If you haven't used the concept of "Trash" since Windows 3.1, like me, you could use:
chmod 0 /home/username/.local/share/Trash/files
While this throws an error when you just use DEL, at least that error reminds you to press Shift+DEL.
add a comment |Â
up vote
0
down vote
I found this thread while looking for the solution of the same problem as OP. Later I found there is a simpler workaround. Pressing DEL will behave as real delete when you disable gvfs-trash command, e.g. by creating no-op command somewhere on PATH:
sudo ln -s /usr/bin/true /usr/local/bin/gvfs-trash
Then you can also hide the trashcan from desktop and from left pane in Thunar using GUI configuration and everything will look like it never existed.
add a comment |Â
up vote
0
down vote
I don't like using a wastebasket, and I don't understand why they usually aren't optional with Linux DE's/file managers.
Anyway whatever, here's a stupid but functional workaround with whatever DE. You'll need inotifywait
, which is in the inotify-tools
package on Arch and Debian:
#/bin/bash
# Once at the start for good measure
rm -rf .local/share/Trash/files/*
while [ true ]
do
inotifywait ~/.local/share/Trash/files
# Don't get stuck in a CPU-melting loop if something goes wrong
if [ $? -ne 0 ]
then
exit $?
fi
# Good riddance
rm -rf .local/share/Trash/files/*
done
Save this as a script somewhere, make it executable (chmod +x script.sh
) and have it run on startup (Settings > Session and Startup > Application Autostart in XFCE). All it does is wait until anything happens inside your trash directory, then nukes everything in there. So it will still say 'send to trash' in context menus and so on, but anything that goes in there will suffer a mysterious disappearance.
Ha, I just accidentally deleted everything in my home directory including all the hidden files not 10 minutes after posting this and running the script. Karma is brutal. Sorry wastebasket. I trashed you, so you trashed my files.
â bewilderex63
1 min ago
add a comment |Â
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
According to the Xfce FAQ, you cannot disable the Trash.
They provide three suggestions, two of which which are also mentioned in the comments above:
Use Shift + del to bypass the trash bin and immediately delete something for real.
use cron to clean the trash every now and then.
or create custom action for permanent delete(like in gnome) with action: rm %f then in context menu you'll have button âÂÂpermanent deleteâÂÂ
Personally, I use the a cron job that runs every 24 hours that calls trash-empty
. You can simply call the command by itself, or give an option(in days) to remove files that have been in the trash longer than that specified number of days.
add a comment |Â
up vote
3
down vote
According to the Xfce FAQ, you cannot disable the Trash.
They provide three suggestions, two of which which are also mentioned in the comments above:
Use Shift + del to bypass the trash bin and immediately delete something for real.
use cron to clean the trash every now and then.
or create custom action for permanent delete(like in gnome) with action: rm %f then in context menu you'll have button âÂÂpermanent deleteâÂÂ
Personally, I use the a cron job that runs every 24 hours that calls trash-empty
. You can simply call the command by itself, or give an option(in days) to remove files that have been in the trash longer than that specified number of days.
add a comment |Â
up vote
3
down vote
up vote
3
down vote
According to the Xfce FAQ, you cannot disable the Trash.
They provide three suggestions, two of which which are also mentioned in the comments above:
Use Shift + del to bypass the trash bin and immediately delete something for real.
use cron to clean the trash every now and then.
or create custom action for permanent delete(like in gnome) with action: rm %f then in context menu you'll have button âÂÂpermanent deleteâÂÂ
Personally, I use the a cron job that runs every 24 hours that calls trash-empty
. You can simply call the command by itself, or give an option(in days) to remove files that have been in the trash longer than that specified number of days.
According to the Xfce FAQ, you cannot disable the Trash.
They provide three suggestions, two of which which are also mentioned in the comments above:
Use Shift + del to bypass the trash bin and immediately delete something for real.
use cron to clean the trash every now and then.
or create custom action for permanent delete(like in gnome) with action: rm %f then in context menu you'll have button âÂÂpermanent deleteâÂÂ
Personally, I use the a cron job that runs every 24 hours that calls trash-empty
. You can simply call the command by itself, or give an option(in days) to remove files that have been in the trash longer than that specified number of days.
answered Mar 20 '13 at 2:46
Kevin Bowen
3051418
3051418
add a comment |Â
add a comment |Â
up vote
2
down vote
If you haven't used the concept of "Trash" since Windows 3.1, like me, you could use:
chmod 0 /home/username/.local/share/Trash/files
While this throws an error when you just use DEL, at least that error reminds you to press Shift+DEL.
add a comment |Â
up vote
2
down vote
If you haven't used the concept of "Trash" since Windows 3.1, like me, you could use:
chmod 0 /home/username/.local/share/Trash/files
While this throws an error when you just use DEL, at least that error reminds you to press Shift+DEL.
add a comment |Â
up vote
2
down vote
up vote
2
down vote
If you haven't used the concept of "Trash" since Windows 3.1, like me, you could use:
chmod 0 /home/username/.local/share/Trash/files
While this throws an error when you just use DEL, at least that error reminds you to press Shift+DEL.
If you haven't used the concept of "Trash" since Windows 3.1, like me, you could use:
chmod 0 /home/username/.local/share/Trash/files
While this throws an error when you just use DEL, at least that error reminds you to press Shift+DEL.
answered Sep 5 '16 at 14:28
Caleb Gray
1211
1211
add a comment |Â
add a comment |Â
up vote
0
down vote
I found this thread while looking for the solution of the same problem as OP. Later I found there is a simpler workaround. Pressing DEL will behave as real delete when you disable gvfs-trash command, e.g. by creating no-op command somewhere on PATH:
sudo ln -s /usr/bin/true /usr/local/bin/gvfs-trash
Then you can also hide the trashcan from desktop and from left pane in Thunar using GUI configuration and everything will look like it never existed.
add a comment |Â
up vote
0
down vote
I found this thread while looking for the solution of the same problem as OP. Later I found there is a simpler workaround. Pressing DEL will behave as real delete when you disable gvfs-trash command, e.g. by creating no-op command somewhere on PATH:
sudo ln -s /usr/bin/true /usr/local/bin/gvfs-trash
Then you can also hide the trashcan from desktop and from left pane in Thunar using GUI configuration and everything will look like it never existed.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
I found this thread while looking for the solution of the same problem as OP. Later I found there is a simpler workaround. Pressing DEL will behave as real delete when you disable gvfs-trash command, e.g. by creating no-op command somewhere on PATH:
sudo ln -s /usr/bin/true /usr/local/bin/gvfs-trash
Then you can also hide the trashcan from desktop and from left pane in Thunar using GUI configuration and everything will look like it never existed.
I found this thread while looking for the solution of the same problem as OP. Later I found there is a simpler workaround. Pressing DEL will behave as real delete when you disable gvfs-trash command, e.g. by creating no-op command somewhere on PATH:
sudo ln -s /usr/bin/true /usr/local/bin/gvfs-trash
Then you can also hide the trashcan from desktop and from left pane in Thunar using GUI configuration and everything will look like it never existed.
answered Aug 23 '17 at 19:07
dolik.rce
1
1
add a comment |Â
add a comment |Â
up vote
0
down vote
I don't like using a wastebasket, and I don't understand why they usually aren't optional with Linux DE's/file managers.
Anyway whatever, here's a stupid but functional workaround with whatever DE. You'll need inotifywait
, which is in the inotify-tools
package on Arch and Debian:
#/bin/bash
# Once at the start for good measure
rm -rf .local/share/Trash/files/*
while [ true ]
do
inotifywait ~/.local/share/Trash/files
# Don't get stuck in a CPU-melting loop if something goes wrong
if [ $? -ne 0 ]
then
exit $?
fi
# Good riddance
rm -rf .local/share/Trash/files/*
done
Save this as a script somewhere, make it executable (chmod +x script.sh
) and have it run on startup (Settings > Session and Startup > Application Autostart in XFCE). All it does is wait until anything happens inside your trash directory, then nukes everything in there. So it will still say 'send to trash' in context menus and so on, but anything that goes in there will suffer a mysterious disappearance.
Ha, I just accidentally deleted everything in my home directory including all the hidden files not 10 minutes after posting this and running the script. Karma is brutal. Sorry wastebasket. I trashed you, so you trashed my files.
â bewilderex63
1 min ago
add a comment |Â
up vote
0
down vote
I don't like using a wastebasket, and I don't understand why they usually aren't optional with Linux DE's/file managers.
Anyway whatever, here's a stupid but functional workaround with whatever DE. You'll need inotifywait
, which is in the inotify-tools
package on Arch and Debian:
#/bin/bash
# Once at the start for good measure
rm -rf .local/share/Trash/files/*
while [ true ]
do
inotifywait ~/.local/share/Trash/files
# Don't get stuck in a CPU-melting loop if something goes wrong
if [ $? -ne 0 ]
then
exit $?
fi
# Good riddance
rm -rf .local/share/Trash/files/*
done
Save this as a script somewhere, make it executable (chmod +x script.sh
) and have it run on startup (Settings > Session and Startup > Application Autostart in XFCE). All it does is wait until anything happens inside your trash directory, then nukes everything in there. So it will still say 'send to trash' in context menus and so on, but anything that goes in there will suffer a mysterious disappearance.
Ha, I just accidentally deleted everything in my home directory including all the hidden files not 10 minutes after posting this and running the script. Karma is brutal. Sorry wastebasket. I trashed you, so you trashed my files.
â bewilderex63
1 min ago
add a comment |Â
up vote
0
down vote
up vote
0
down vote
I don't like using a wastebasket, and I don't understand why they usually aren't optional with Linux DE's/file managers.
Anyway whatever, here's a stupid but functional workaround with whatever DE. You'll need inotifywait
, which is in the inotify-tools
package on Arch and Debian:
#/bin/bash
# Once at the start for good measure
rm -rf .local/share/Trash/files/*
while [ true ]
do
inotifywait ~/.local/share/Trash/files
# Don't get stuck in a CPU-melting loop if something goes wrong
if [ $? -ne 0 ]
then
exit $?
fi
# Good riddance
rm -rf .local/share/Trash/files/*
done
Save this as a script somewhere, make it executable (chmod +x script.sh
) and have it run on startup (Settings > Session and Startup > Application Autostart in XFCE). All it does is wait until anything happens inside your trash directory, then nukes everything in there. So it will still say 'send to trash' in context menus and so on, but anything that goes in there will suffer a mysterious disappearance.
I don't like using a wastebasket, and I don't understand why they usually aren't optional with Linux DE's/file managers.
Anyway whatever, here's a stupid but functional workaround with whatever DE. You'll need inotifywait
, which is in the inotify-tools
package on Arch and Debian:
#/bin/bash
# Once at the start for good measure
rm -rf .local/share/Trash/files/*
while [ true ]
do
inotifywait ~/.local/share/Trash/files
# Don't get stuck in a CPU-melting loop if something goes wrong
if [ $? -ne 0 ]
then
exit $?
fi
# Good riddance
rm -rf .local/share/Trash/files/*
done
Save this as a script somewhere, make it executable (chmod +x script.sh
) and have it run on startup (Settings > Session and Startup > Application Autostart in XFCE). All it does is wait until anything happens inside your trash directory, then nukes everything in there. So it will still say 'send to trash' in context menus and so on, but anything that goes in there will suffer a mysterious disappearance.
answered 27 mins ago
bewilderex63
211
211
Ha, I just accidentally deleted everything in my home directory including all the hidden files not 10 minutes after posting this and running the script. Karma is brutal. Sorry wastebasket. I trashed you, so you trashed my files.
â bewilderex63
1 min ago
add a comment |Â
Ha, I just accidentally deleted everything in my home directory including all the hidden files not 10 minutes after posting this and running the script. Karma is brutal. Sorry wastebasket. I trashed you, so you trashed my files.
â bewilderex63
1 min ago
Ha, I just accidentally deleted everything in my home directory including all the hidden files not 10 minutes after posting this and running the script. Karma is brutal. Sorry wastebasket. I trashed you, so you trashed my files.
â bewilderex63
1 min ago
Ha, I just accidentally deleted everything in my home directory including all the hidden files not 10 minutes after posting this and running the script. Karma is brutal. Sorry wastebasket. I trashed you, so you trashed my files.
â bewilderex63
1 min ago
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f51840%2fhow-to-disable-trash-can-in-thunar-xfce%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
2
Since I assume that XFCE conforms to the FreeDesktop.org Trash Specification, a workaround would be to run a cron job every minute calling
trash-empty
(from the packagetrash-cli
).â Marco
Oct 14 '12 at 18:23
Looks like an ugly "crutch" of a kind for me on first sight but may be a nice compromise at the same time: at least I will be able to restore a file during some time after deletion if I realize I've done it by a mistake (happened to me about 5 times during 20 years - had to use special undeletion utilities to restore).
â Ivan
Oct 14 '12 at 18:27
1
It definitely is! If you want finer control of what is deleted and when, I would suggest having a look at the package
autotrash
. Calling it from a user crontab I would consider a clean solution. It however does not answer your question, that's why I leave it as a comment.â Marco
Oct 14 '12 at 18:34