How to disable trash can in Thunar/XFCE?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
7
down vote

favorite
1












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?










share|improve this question

















  • 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










  • 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















up vote
7
down vote

favorite
1












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?










share|improve this question

















  • 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










  • 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













up vote
7
down vote

favorite
1









up vote
7
down vote

favorite
1






1





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?










share|improve this question













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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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







  • 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













  • 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










  • 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








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











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:



  1. Use Shift + del to bypass the trash bin and immediately delete something for real.


  2. use cron to clean the trash every now and then.


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






share|improve this answer



























    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.






    share|improve this answer



























      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.






      share|improve this answer



























        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.






        share|improve this answer




















        • 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










        Your Answer








        StackExchange.ready(function()
        var channelOptions =
        tags: "".split(" "),
        id: "106"
        ;
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function()
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled)
        StackExchange.using("snippets", function()
        createEditor();
        );

        else
        createEditor();

        );

        function createEditor()
        StackExchange.prepareEditor(
        heartbeatType: 'answer',
        convertImagesToLinks: false,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: null,
        bindNavPrevention: true,
        postfix: "",
        imageUploader:
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        ,
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        );



        );













         

        draft saved


        draft discarded


















        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






























        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:



        1. Use Shift + del to bypass the trash bin and immediately delete something for real.


        2. use cron to clean the trash every now and then.


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






        share|improve this answer
























          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:



          1. Use Shift + del to bypass the trash bin and immediately delete something for real.


          2. use cron to clean the trash every now and then.


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






          share|improve this answer






















            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:



            1. Use Shift + del to bypass the trash bin and immediately delete something for real.


            2. use cron to clean the trash every now and then.


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






            share|improve this answer












            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:



            1. Use Shift + del to bypass the trash bin and immediately delete something for real.


            2. use cron to clean the trash every now and then.


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







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Mar 20 '13 at 2:46









            Kevin Bowen

            3051418




            3051418






















                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.






                share|improve this answer
























                  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.






                  share|improve this answer






















                    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.






                    share|improve this answer












                    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.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Sep 5 '16 at 14:28









                    Caleb Gray

                    1211




                    1211




















                        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.






                        share|improve this answer
























                          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.






                          share|improve this answer






















                            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.






                            share|improve this answer












                            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.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Aug 23 '17 at 19:07









                            dolik.rce

                            1




                            1




















                                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.






                                share|improve this answer




















                                • 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














                                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.






                                share|improve this answer




















                                • 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












                                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.






                                share|improve this answer












                                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.







                                share|improve this answer












                                share|improve this answer



                                share|improve this answer










                                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
















                                • 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

















                                 

                                draft saved


                                draft discarded















































                                 


                                draft saved


                                draft discarded














                                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













































































                                Popular posts from this blog

                                How to check contact read email or not when send email to Individual?

                                Displaying single band from multi-band raster using QGIS

                                How many registers does an x86_64 CPU actually have?