28

I am attempting to remove bookmarks from the Places sidebar in Nautilus 3.6. Specifically, I would like to remove the "Pictures" item.

I have found answers for older versions in which one can remove or edit entries in ~/.config/user-dirs.dirs. However, this does not seem to work in 3.6. I am running Ubuntu 12.10 with Gnome.

Removing things in the bookmarks menu does not seem to change anything and the option to remove by right clicking is grayed out.

Thanks!

0

4 Answers 4

24

You need to comment out entries in the following file:

~/.config/user-dirs.dirs 
5
  • And how do I convert a functional line into a comment?
    – Lucio
    May 2, 2013 at 21:25
  • Using a #, as the explanation lines above.
    – Lode
    May 3, 2013 at 17:19
  • 8
    Rather than commenting out the entries, I simply edited them to point to folders I actually use and want in the list (in my case, in my Dropbox). For example: XDG_DOCUMENTS_DIR="$HOME/Dropbox" and XDG_MUSIC_DIR="$HOME/Dropbox/Music" Worked great! (This was on 13.10.) Jan 14, 2014 at 2:53
  • 4
    Doesn't work. Try this instead: askubuntu.com/a/348112/111115 (just point all entires to $HOME instead of $HOME/something). I tried commenting out; pointing them to a non-existing path, but only pointing them to $HOME removes them.
    – Luc
    Jul 23, 2015 at 12:58
  • May also have to edit /etc/xdg/user-dirs.defaults and restart computer. See Mrnatural's answer for more details.
    – dinosaur
    Sep 29, 2016 at 18:54
10

This answer is also something of a tutorial for newbies. Ugh. Just looked down. It reformatted my nice, readable outline. #$!

IMHO space in File windows' "Places" sidebars is valuable. You can use them to add quick jumps to where YOU need to go frequently, so I wanted to ditch some of the defaults to make more room. I decided I didn't need Music, Pictures, and Videos. The folders are still there in my home folder if I need to use them. I'm just not big on multimedia. In Raring (13.04; with the default "Unity" desktop) I ran into several challenges;

  • User-added "Places items can be removed using the pop-up menu you get by right-clicking the item, but that option is grayed out for the system's default items.
  • The real answer lies in Geekdom (this is still Linux, after all, although wonderfully slick nowadays.) It involves editing a couple of configuration files, but there seem to be several levels of defaults that tend to restore the status quo behind your back.

What I eventually had to do to accomplish my goal was:

  1. edit the file at ~/.config/user-dirs.dirs
    1. save a backup copy in the same folder under a recognizably altered name
    2. edit our target file
      • delete the unwanted lines
      • save the modified file
  2. edit /etc/xdg/user-dirs.defaults
    1. cd /etc/xdg/
    2. sudo cp user-dirs.defaults user-dirs.defaults.orig # backup copy
    3. sudo -H gedit user-dirs.defaults
      • delete the offending lines
      • save the modified file
  3. reboot

Notes: with added explanations for newbies...

  1. it should work smoothly if you do both edits in one session, but if you try to do it piecemeal starting with just modifying ~/.config/user-dirs.dirs it won't work (it'll be automatically restored) and you'll have to do it again after fixing /etc/xdg/user-dirs.defaults. I know this from personal experience. :o) these actions are easily performed with normal GUI applications like Files and Text Editor. ~/ is shell (Terminal) shorthand for your home directory (a folder in the file system: the absolute path is something like /Home/YOURUSERNAME/ .)

    1. not absolutely necessary, but a good habit to cultivate
    2. it should be obvious which ones, depending on what you want to eliminate. Also the first time I commented them off with leading '#'s, which didn't seem to work initially due to the auto-restores, but it actually probably will work.
  2. this is a tip I got from Kubuntuforums.net It's basically the same procedure as step 1, except that it's a different file, and one that belongs to the system at that. All of these commands are entered in a Terminal window following the $ prompt. They have to be letter-perfect, except that you can change the second parameter of the cp command, the backup file name.

    1. the sudo's are necessary because users don't have security "permission" to modify these resources, so you give your password when asked (you are an administrator, aren't you? Original users are by default) and proceed to pretend you're "root" (the "superuser" but be careful -- you could break something if you mess around.)
    2. this brings up a normal-looking instance of the Text Editor but with the necessary permissions so the "Save" doesn't fail. Also see note 1.2.
  3. the changes don't take effect until you reboot, but it's OK to do what else you need to immediately do in the meantime.

  4. if you ARE a newbie and you get this under your belt, congratulations! You're well on your way to Geekhood.
3
  • 3
    Could you please edit your post following the markdown? I noticed you have several nested numbered list with references, and I don't want to mess them up.
    – Braiam
    Aug 14, 2013 at 5:11
  • Outlines with numberings other than numeric are not supported in markdown
    – guntbert
    Aug 15, 2013 at 21:26
  • Difficult to read, sure; but apart from that I wonder why this answer was downvoted... Apr 8, 2014 at 17:44
0

Open Nautilus, go to your User folder, press Control + H, to show hidden files, then open the file called with .bookmarks-gtk. You can remove the unneeded lines from that file. You could also right click the menu bar, and remove them that way, but that's what I did in the past. Hope my answer helps.

1
  • 3
    At least in Ubuntu 13.10, that file is named .gtk-bookmarks, and does not contain any of the "Places" bookmarks, only ones you have made yourself.
    – IQAndreas
    Oct 21, 2013 at 5:32
-2

Right click on each item and select Remove! You can manage them from bookmarks menu too.

Edit: For Places you can delete/rename the folder from home directory. I have removed Music from home folder and now it is not in left list.

5
  • 4
    The remove option is grayed out. Thoughts?
    – Eric Marsh
    Mar 5, 2013 at 14:06
  • 3
    Also, strangely, removing items from the bookmarks menu doesn't change the Places list.
    – Eric Marsh
    Mar 5, 2013 at 14:08
  • Edited my answer ;) Mar 5, 2013 at 14:17
  • 1
    Unfortunately I tried that. I deleted the ~/Documents directory and it was recreated when I restarted. Note that I have successfully replaced those directories with symlinks, but I have not gotten rid of them altogether.
    – Eric Marsh
    Mar 5, 2013 at 14:25
  • May be hardcoded in Nautilus, like the keyboard indicator not being able to be disabled at all with >1 keyboards without hex-editing the executable. Jun 13, 2013 at 15:32

Not the answer you're looking for? Browse other questions tagged .