How to add a location to "Places" instead of "Bookmarks" in Nautilus/Ubuntu's File Manager? [duplicate]

I want to add a custom bookmark to Nautilus's/Ubuntu's File Manager's sidebar, right under:

Places

As opposed to adding it right under

Bookmarks

enter image description here


Solution 1:

You can't simply add a new location to Places like you add to Bookmarks. This because those locations are hardcoded into Nautilus. You can change the name or location of the directories or you can hide the directories by pointing them to Home by editing ~/.config/user-dirs.dirs file, but you can't add new locations.

So, to add a new location to Places you have to edit the Nautilus source code. You can do this even if you are not a programmer by following carefully all the steps from this answer (many thanks to Roman Raguet for it).