Usually Linux programs store user's settings in ~/.* directories. But unfortunately some developers (of some applications I need) do not follow this rule and don't start their settings storage folders names with a dot. This results in never-user-used folders cluttering (not the right word perhaps, as there are not many, but they annoy anyway) a home directory. Renaming them is not an option, as the applications won't find them in this case (and will create them again).
Is there a way to hide a folder having no dot starting its name from being displayed in common file system browsers (I actually use Thunar of XFCE, alongside with Midnight Commander and Krusader, but wouldn't mind to know about Nautilus too).
Nautilus (Update: This should also work with Thunar now) will hide any file or folder that is listed in the file
.hidden
located in the same directory.There are two ways to hide a folder in Nautilus:
Nautilus script
Save the following code in a new file in your home folder. Name it
Hide
.Run the following command to install the script:
In Nautilus, select one or more files/folders and right click. Select Hide from the Scripts menu:
Reload the current location ( F5 ) and the selected files/folders will be hidden.
Command line
Say you want to hide a folder called "Rick Astley's Greatest Hits", just run the following command:
Open synaptic and search for "nautilus-hide" install it. Logout and login. Now right click on any file or folder. You will now see a "Hide" option in the Context Menu.
It will not modify the name but hide the folder.
I modified Alvin's good script to be (hopefully) more Pythonic (and potentially faster if many files are added, since
.hidden
is opened only once):