I've solved this by making an executable script which I added to my startup applications.
The first thing we should know is that the file with your default folders is ~/.config/user-dirs.dirs
, which is where you can indicate the directories of the folders you want to have listed under "Computer" in Nautilus.
Step 1
Create the correct user-dirs.dirs file with all your desired default folders and their locations. I only had to edit two entries so I opened the original (in Terminal: gedit ~/.config/user-dirs.dirs
), edited it to the correct folders and "saved as" in another location (namely ~/Documents/Miscellaneous/
).
Step 2
Open up your preferred text editor, like gedit. First we want to remove the original and incorrect user-dirs.dirs file: rm ~/.config/user-dirs.dirs
. Then, we want to take the correct file we created and copy it into the ~/.config folder: cp ~/FolderWithCorrectFile/user-dirs.dirs ~/.config/
. Make sure to add &&
between the two. In my case it came out like this: rm ~/.config/user-dirs.dirs && cp ~/Documents/Miscellaneous/user-dirs.dirs ~/.config/
I saved this file in the same folder as the correct user-dirs.dirs file, but you can put it anywhere.
Step 3
Now we have to allow the file we just created to be executed as a program. The easiest way to do this is to right click on the file, go to its properties → permissions. There, check the execute tick box. Then run the file to check if it works by verifying the original user-dirs.dirs file has been replaced by your new, correct version.
Step 4
If everything worked, go to "Startup Applications". Browse and add the file we created. Next time you boot your computer all your default folders will be there.