Nautilus — Documents folder

So… When I was first setting my new laptop up several months ago, I accidentally deleted the Documents folder (it was empty). I made a new one, but it was not given its folder icon by Nautilus, it was registered like any old folder. Is there any way to give the folder the appropriate icon manually?

Yes, the new folder has exactly the same name as the original one.

What distro? I would check the folder permissions with ls -l ~, and/or you could reinstall nautilius

Can you not just right-click it, go into the properties and adjust the icon manually there?

Look for a file named user-dirs.dirs. It’s located at ~/.config/user-dirs.dirs for me.

You’ll see a line XDG_DOCUMENTS_DIR=...

Set this accordingly :slight_smile:

4 Likes

The distribution is irrelevant, but it’s Ubuntu Focal. The permissions are fine as it is in my home directory (I’m the only user of the laptop). I don’t think that trying to reinstall Nautilus would go down well with the package manager.

Nope. Besides marking a folder as the documents folder not being possible, there is no dialogue for custom folder icons of any kind (I wonder if the dialogue is still present in Windows 10).

The line containing XDG_DOCUMENTS_DIR was set to $HOME/, which was odd. After changing the line accordingly, I saw no change in Nautilus. As I saw that there was an user-dirs.dirs.md5sum file, I was not surprised to see no effect take place. Then I read the commented-out header of the file, it mentions xdg-user-dirs-update. After looking at its manual page, I came across this wonderful line:

[…] Additionally, any configured directories that point to non-existing locations are reset by pointing then to the users home directory. This typically happens when the users removed the directory, so they likely don’t want to use it anymore.

Lovely… Anyways, I took a chance and just ran xdg-user-dirs-update and that did the trick! I know that this will sound quite strange, but I feel an enormous sense of joy from finally having my documents folder marked as such. It like that final piece of the puzzle finally coming into place.

pFtpr, thank you for the tip and thanks to everybody for devoting a piece of their time to try and help me!


Post Scriptum

I originally set pFtpr’s reply as the solution, but after thinking about it, I thought that the actual solution needed to be set as such. Still, without pFtpr, I wouldn’t have gotten anywhere.

2 Likes