How do I restore a Places folder I accidentally deleted in Nautilus?

6,181

Solution 1

Once you have recreated the Documents folder, make sure your ~/.config/user-dirs.dirs contains something like this:

XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"

You can edit it as needed using any text editor, for example

nano ~/.config/user-dirs.dirs

Then run the command xdg-user-dirs-gtk-update.

Solution 2

On Ubuntu 14.04 running gnome-3.10 I was able to restore it by inserting/editing the following file:

~/.config/gtk-3.0/bookmarks

file:///home/%yourusername%/Documents
file:///home/%yourusername%/Music
file:///home/%yourusername%/Pictures
file:///home/%yourusername%/Videos
file:///home/%yourusername%/Downloads

Hope it works for you as well!

Share:
6,181

Related videos on Youtube

Jeremy
Author by

Jeremy

Updated on September 18, 2022

Comments

  • Jeremy
    Jeremy almost 2 years

    I accidentally deleted my Documents folder and didn't notice it for a couple days. Somewhere in that time, Nautilus auto-updated my list of Places so it no longer includes my Documents folder. I have since restored my Documents folder, but the Places link is still missing. How do I get it back?

    • Jacob Vlijm
      Jacob Vlijm over 9 years
    • Jeremy
      Jeremy over 9 years
      That file doesn't exist. I'm this close to searching through the Nautilus source code to find where it gets the Places from...
    • Mitch
      Mitch over 9 years
    • Jeremy
      Jeremy over 9 years
      Mitch, I hadn't seen that, thanks for the link. I'm not sure if it applies, though. I don't want to add a new folder to the Places menu, I just want to restore what was originally there. If Nautilus can somehow remove deleted folders from the Places menu without recompiling, I should be able to add them back without recompiling, right?
    • Stéphane Gourichon
      Stéphane Gourichon almost 4 years
      This might be the straightforward answer you've been looking for: unix.stackexchange.com/a/606950/19643
  • Jeremy
    Jeremy over 9 years
    Thanks for your help, but that just adds them as bookmarks. It doesn't restore them to the Places menu. Here is what I am seeing after making sure the bookmark entries are there. I want Documents, Pictures, and Music back in the Places menu like they used to be.
  • Admin
    Admin about 2 years
    I also have to $ killall nautilus and then reopen for Nautilus to pick up the changes.