Prevent Nautilus / Nemo from creating .Trash-1000 folder in mounted devices












14















Both Nautilus and Nemo create hidden folders called .Trash-1000 in any mounted device, apparently to manage their Trash folder. This is mighty confusing in network drives that are mounted by other users, that may be using other operating systems or programmes that do not recognise this folder as a trash bin.



Moreover, this folder expands with the number of files deleted and can not be erased from Ubuntu:



$ sudo rm -rf ./.Trash-1000
rm: cannot remove './.Trash-1000/files': Directory not empty


To free space in such mounted volumes the .Trash-1000 folder must be deleted from a different system.



Is there any way to prevent Nemo or Nautilus from creating this folder in network drives? I can naturally simply not use them, but they are handy in many situations.










share|improve this question




















  • 1





    @LuísdeSousa Now, I've provided an answer as to current state of affairs, that is currently it is not possible to have such feature. However, I would ask you to remain patient for next week or so, and I might return with a better solution. OK ?

    – Sergiy Kolodyazhnyy
    Feb 25 at 9:27











  • As a workaround, you can create an empty .Trash-1000 folder yourself, and use chmod 000 .Trash-1000 and/or sudo chattr +i .Trash-1000 to prevent Nautilus from populating it. (I haven't actually tried this, but I would if I had this problem.)

    – pts
    Feb 25 at 10:50













  • pts this is similar to the traditional workaround on thumb drives - create an empty file (not folder) called .Trash-1000 this confuses gnome enough to stop it.

    – don bright
    Feb 26 at 1:53











  • @pts This will keep other users confused about it. Moreover, in Samba drives Linux permissions have no meaning.

    – Luís de Sousa
    Feb 26 at 7:35











  • @LuísdeSousa: For Samba shares, do the chmod or chattr on the Samba server (samba.org). I undertstand that each solution and workaround has its tradeoffs. Nevertheless, it's better to know about a workaround and its tradeoff than not to know. Hence I posted it as a comment.

    – pts
    Feb 26 at 8:20


















14















Both Nautilus and Nemo create hidden folders called .Trash-1000 in any mounted device, apparently to manage their Trash folder. This is mighty confusing in network drives that are mounted by other users, that may be using other operating systems or programmes that do not recognise this folder as a trash bin.



Moreover, this folder expands with the number of files deleted and can not be erased from Ubuntu:



$ sudo rm -rf ./.Trash-1000
rm: cannot remove './.Trash-1000/files': Directory not empty


To free space in such mounted volumes the .Trash-1000 folder must be deleted from a different system.



Is there any way to prevent Nemo or Nautilus from creating this folder in network drives? I can naturally simply not use them, but they are handy in many situations.










share|improve this question




















  • 1





    @LuísdeSousa Now, I've provided an answer as to current state of affairs, that is currently it is not possible to have such feature. However, I would ask you to remain patient for next week or so, and I might return with a better solution. OK ?

    – Sergiy Kolodyazhnyy
    Feb 25 at 9:27











  • As a workaround, you can create an empty .Trash-1000 folder yourself, and use chmod 000 .Trash-1000 and/or sudo chattr +i .Trash-1000 to prevent Nautilus from populating it. (I haven't actually tried this, but I would if I had this problem.)

    – pts
    Feb 25 at 10:50













  • pts this is similar to the traditional workaround on thumb drives - create an empty file (not folder) called .Trash-1000 this confuses gnome enough to stop it.

    – don bright
    Feb 26 at 1:53











  • @pts This will keep other users confused about it. Moreover, in Samba drives Linux permissions have no meaning.

    – Luís de Sousa
    Feb 26 at 7:35











  • @LuísdeSousa: For Samba shares, do the chmod or chattr on the Samba server (samba.org). I undertstand that each solution and workaround has its tradeoffs. Nevertheless, it's better to know about a workaround and its tradeoff than not to know. Hence I posted it as a comment.

    – pts
    Feb 26 at 8:20
















14












14








14


3






Both Nautilus and Nemo create hidden folders called .Trash-1000 in any mounted device, apparently to manage their Trash folder. This is mighty confusing in network drives that are mounted by other users, that may be using other operating systems or programmes that do not recognise this folder as a trash bin.



Moreover, this folder expands with the number of files deleted and can not be erased from Ubuntu:



$ sudo rm -rf ./.Trash-1000
rm: cannot remove './.Trash-1000/files': Directory not empty


To free space in such mounted volumes the .Trash-1000 folder must be deleted from a different system.



Is there any way to prevent Nemo or Nautilus from creating this folder in network drives? I can naturally simply not use them, but they are handy in many situations.










share|improve this question
















Both Nautilus and Nemo create hidden folders called .Trash-1000 in any mounted device, apparently to manage their Trash folder. This is mighty confusing in network drives that are mounted by other users, that may be using other operating systems or programmes that do not recognise this folder as a trash bin.



Moreover, this folder expands with the number of files deleted and can not be erased from Ubuntu:



$ sudo rm -rf ./.Trash-1000
rm: cannot remove './.Trash-1000/files': Directory not empty


To free space in such mounted volumes the .Trash-1000 folder must be deleted from a different system.



Is there any way to prevent Nemo or Nautilus from creating this folder in network drives? I can naturally simply not use them, but they are handy in many situations.







nautilus trash nemo network-drive






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 26 at 7:32







Luís de Sousa

















asked Feb 25 at 8:35









Luís de SousaLuís de Sousa

9,2451752104




9,2451752104








  • 1





    @LuísdeSousa Now, I've provided an answer as to current state of affairs, that is currently it is not possible to have such feature. However, I would ask you to remain patient for next week or so, and I might return with a better solution. OK ?

    – Sergiy Kolodyazhnyy
    Feb 25 at 9:27











  • As a workaround, you can create an empty .Trash-1000 folder yourself, and use chmod 000 .Trash-1000 and/or sudo chattr +i .Trash-1000 to prevent Nautilus from populating it. (I haven't actually tried this, but I would if I had this problem.)

    – pts
    Feb 25 at 10:50













  • pts this is similar to the traditional workaround on thumb drives - create an empty file (not folder) called .Trash-1000 this confuses gnome enough to stop it.

    – don bright
    Feb 26 at 1:53











  • @pts This will keep other users confused about it. Moreover, in Samba drives Linux permissions have no meaning.

    – Luís de Sousa
    Feb 26 at 7:35











  • @LuísdeSousa: For Samba shares, do the chmod or chattr on the Samba server (samba.org). I undertstand that each solution and workaround has its tradeoffs. Nevertheless, it's better to know about a workaround and its tradeoff than not to know. Hence I posted it as a comment.

    – pts
    Feb 26 at 8:20
















  • 1





    @LuísdeSousa Now, I've provided an answer as to current state of affairs, that is currently it is not possible to have such feature. However, I would ask you to remain patient for next week or so, and I might return with a better solution. OK ?

    – Sergiy Kolodyazhnyy
    Feb 25 at 9:27











  • As a workaround, you can create an empty .Trash-1000 folder yourself, and use chmod 000 .Trash-1000 and/or sudo chattr +i .Trash-1000 to prevent Nautilus from populating it. (I haven't actually tried this, but I would if I had this problem.)

    – pts
    Feb 25 at 10:50













  • pts this is similar to the traditional workaround on thumb drives - create an empty file (not folder) called .Trash-1000 this confuses gnome enough to stop it.

    – don bright
    Feb 26 at 1:53











  • @pts This will keep other users confused about it. Moreover, in Samba drives Linux permissions have no meaning.

    – Luís de Sousa
    Feb 26 at 7:35











  • @LuísdeSousa: For Samba shares, do the chmod or chattr on the Samba server (samba.org). I undertstand that each solution and workaround has its tradeoffs. Nevertheless, it's better to know about a workaround and its tradeoff than not to know. Hence I posted it as a comment.

    – pts
    Feb 26 at 8:20










1




1





@LuísdeSousa Now, I've provided an answer as to current state of affairs, that is currently it is not possible to have such feature. However, I would ask you to remain patient for next week or so, and I might return with a better solution. OK ?

– Sergiy Kolodyazhnyy
Feb 25 at 9:27





@LuísdeSousa Now, I've provided an answer as to current state of affairs, that is currently it is not possible to have such feature. However, I would ask you to remain patient for next week or so, and I might return with a better solution. OK ?

– Sergiy Kolodyazhnyy
Feb 25 at 9:27













As a workaround, you can create an empty .Trash-1000 folder yourself, and use chmod 000 .Trash-1000 and/or sudo chattr +i .Trash-1000 to prevent Nautilus from populating it. (I haven't actually tried this, but I would if I had this problem.)

– pts
Feb 25 at 10:50







As a workaround, you can create an empty .Trash-1000 folder yourself, and use chmod 000 .Trash-1000 and/or sudo chattr +i .Trash-1000 to prevent Nautilus from populating it. (I haven't actually tried this, but I would if I had this problem.)

– pts
Feb 25 at 10:50















pts this is similar to the traditional workaround on thumb drives - create an empty file (not folder) called .Trash-1000 this confuses gnome enough to stop it.

– don bright
Feb 26 at 1:53





pts this is similar to the traditional workaround on thumb drives - create an empty file (not folder) called .Trash-1000 this confuses gnome enough to stop it.

– don bright
Feb 26 at 1:53













@pts This will keep other users confused about it. Moreover, in Samba drives Linux permissions have no meaning.

– Luís de Sousa
Feb 26 at 7:35





@pts This will keep other users confused about it. Moreover, in Samba drives Linux permissions have no meaning.

– Luís de Sousa
Feb 26 at 7:35













@LuísdeSousa: For Samba shares, do the chmod or chattr on the Samba server (samba.org). I undertstand that each solution and workaround has its tradeoffs. Nevertheless, it's better to know about a workaround and its tradeoff than not to know. Hence I posted it as a comment.

– pts
Feb 26 at 8:20







@LuísdeSousa: For Samba shares, do the chmod or chattr on the Samba server (samba.org). I undertstand that each solution and workaround has its tradeoffs. Nevertheless, it's better to know about a workaround and its tradeoff than not to know. Hence I posted it as a comment.

– pts
Feb 26 at 8:20












1 Answer
1






active

oldest

votes


















15














After looking at Nautilus's source code and Michael Stumpfl's answer it becomes clear that trash folder creation, is something hard-coded in Nautilus's source code itself and is part of how libgio works - the library behind file manipulations in Gtk/GNOME applications. Therefore disabling such behavior is currently not possible without recompiling either the file manager itself or altering source code of the library ( which I wouldn't recommend doing, since other applications rely on it, so changes may affect other applications' behavior ).



Probably the best solution is to propose a feature request to Nautilus developers and wait until it is fixed. One could also resort to permanent deletion of files via Shift+Delete short cut or using command-line utilities such as mv (move to user's trash folder on / filesystem) or rm. Otherwise - switch to using different file manager for the time being.






share|improve this answer





















  • 1





    If this is hard coded in libgio would it make a difference to use an alternative file manager?

    – Luís de Sousa
    Feb 25 at 10:43






  • 4





    @LuísdeSousa Not every file manager relies on libgio. Dolphin for example doesn't. Command-line file manager such as midnight-commander doesn't. In general, those applications that don't rely on Gtk toolkit don't come in contact with libgio. Of course, there could be exceptions.

    – Sergiy Kolodyazhnyy
    Feb 25 at 10:47












Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
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',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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%2faskubuntu.com%2fquestions%2f1121039%2fprevent-nautilus-nemo-from-creating-trash-1000-folder-in-mounted-devices%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









15














After looking at Nautilus's source code and Michael Stumpfl's answer it becomes clear that trash folder creation, is something hard-coded in Nautilus's source code itself and is part of how libgio works - the library behind file manipulations in Gtk/GNOME applications. Therefore disabling such behavior is currently not possible without recompiling either the file manager itself or altering source code of the library ( which I wouldn't recommend doing, since other applications rely on it, so changes may affect other applications' behavior ).



Probably the best solution is to propose a feature request to Nautilus developers and wait until it is fixed. One could also resort to permanent deletion of files via Shift+Delete short cut or using command-line utilities such as mv (move to user's trash folder on / filesystem) or rm. Otherwise - switch to using different file manager for the time being.






share|improve this answer





















  • 1





    If this is hard coded in libgio would it make a difference to use an alternative file manager?

    – Luís de Sousa
    Feb 25 at 10:43






  • 4





    @LuísdeSousa Not every file manager relies on libgio. Dolphin for example doesn't. Command-line file manager such as midnight-commander doesn't. In general, those applications that don't rely on Gtk toolkit don't come in contact with libgio. Of course, there could be exceptions.

    – Sergiy Kolodyazhnyy
    Feb 25 at 10:47
















15














After looking at Nautilus's source code and Michael Stumpfl's answer it becomes clear that trash folder creation, is something hard-coded in Nautilus's source code itself and is part of how libgio works - the library behind file manipulations in Gtk/GNOME applications. Therefore disabling such behavior is currently not possible without recompiling either the file manager itself or altering source code of the library ( which I wouldn't recommend doing, since other applications rely on it, so changes may affect other applications' behavior ).



Probably the best solution is to propose a feature request to Nautilus developers and wait until it is fixed. One could also resort to permanent deletion of files via Shift+Delete short cut or using command-line utilities such as mv (move to user's trash folder on / filesystem) or rm. Otherwise - switch to using different file manager for the time being.






share|improve this answer





















  • 1





    If this is hard coded in libgio would it make a difference to use an alternative file manager?

    – Luís de Sousa
    Feb 25 at 10:43






  • 4





    @LuísdeSousa Not every file manager relies on libgio. Dolphin for example doesn't. Command-line file manager such as midnight-commander doesn't. In general, those applications that don't rely on Gtk toolkit don't come in contact with libgio. Of course, there could be exceptions.

    – Sergiy Kolodyazhnyy
    Feb 25 at 10:47














15












15








15







After looking at Nautilus's source code and Michael Stumpfl's answer it becomes clear that trash folder creation, is something hard-coded in Nautilus's source code itself and is part of how libgio works - the library behind file manipulations in Gtk/GNOME applications. Therefore disabling such behavior is currently not possible without recompiling either the file manager itself or altering source code of the library ( which I wouldn't recommend doing, since other applications rely on it, so changes may affect other applications' behavior ).



Probably the best solution is to propose a feature request to Nautilus developers and wait until it is fixed. One could also resort to permanent deletion of files via Shift+Delete short cut or using command-line utilities such as mv (move to user's trash folder on / filesystem) or rm. Otherwise - switch to using different file manager for the time being.






share|improve this answer















After looking at Nautilus's source code and Michael Stumpfl's answer it becomes clear that trash folder creation, is something hard-coded in Nautilus's source code itself and is part of how libgio works - the library behind file manipulations in Gtk/GNOME applications. Therefore disabling such behavior is currently not possible without recompiling either the file manager itself or altering source code of the library ( which I wouldn't recommend doing, since other applications rely on it, so changes may affect other applications' behavior ).



Probably the best solution is to propose a feature request to Nautilus developers and wait until it is fixed. One could also resort to permanent deletion of files via Shift+Delete short cut or using command-line utilities such as mv (move to user's trash folder on / filesystem) or rm. Otherwise - switch to using different file manager for the time being.







share|improve this answer














share|improve this answer



share|improve this answer








edited Feb 25 at 9:26

























answered Feb 25 at 9:21









Sergiy KolodyazhnyySergiy Kolodyazhnyy

74.7k9155325




74.7k9155325








  • 1





    If this is hard coded in libgio would it make a difference to use an alternative file manager?

    – Luís de Sousa
    Feb 25 at 10:43






  • 4





    @LuísdeSousa Not every file manager relies on libgio. Dolphin for example doesn't. Command-line file manager such as midnight-commander doesn't. In general, those applications that don't rely on Gtk toolkit don't come in contact with libgio. Of course, there could be exceptions.

    – Sergiy Kolodyazhnyy
    Feb 25 at 10:47














  • 1





    If this is hard coded in libgio would it make a difference to use an alternative file manager?

    – Luís de Sousa
    Feb 25 at 10:43






  • 4





    @LuísdeSousa Not every file manager relies on libgio. Dolphin for example doesn't. Command-line file manager such as midnight-commander doesn't. In general, those applications that don't rely on Gtk toolkit don't come in contact with libgio. Of course, there could be exceptions.

    – Sergiy Kolodyazhnyy
    Feb 25 at 10:47








1




1





If this is hard coded in libgio would it make a difference to use an alternative file manager?

– Luís de Sousa
Feb 25 at 10:43





If this is hard coded in libgio would it make a difference to use an alternative file manager?

– Luís de Sousa
Feb 25 at 10:43




4




4





@LuísdeSousa Not every file manager relies on libgio. Dolphin for example doesn't. Command-line file manager such as midnight-commander doesn't. In general, those applications that don't rely on Gtk toolkit don't come in contact with libgio. Of course, there could be exceptions.

– Sergiy Kolodyazhnyy
Feb 25 at 10:47





@LuísdeSousa Not every file manager relies on libgio. Dolphin for example doesn't. Command-line file manager such as midnight-commander doesn't. In general, those applications that don't rely on Gtk toolkit don't come in contact with libgio. Of course, there could be exceptions.

– Sergiy Kolodyazhnyy
Feb 25 at 10:47


















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1121039%2fprevent-nautilus-nemo-from-creating-trash-1000-folder-in-mounted-devices%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Probability when a professor distributes a quiz and homework assignment to a class of n students.

Aardman Animations

Are they similar matrix