5

I'd like to add folders to the nautilus "Places" menu with custom vector icons. There are a few solutions out there but they all address Ubuntu 13.10 and aren't easily ported to 14.04. Ideally I want to be able to:

  1. Delete "Recent"(under Places)
  2. Set custom icons for the folders

Please don't suggest adding a Bookmark.

3
  • 1
    Every one suggesting adding bookmarks.I did that before by using ctrl+D. I gained some knowledge too of adding book marks via the sourcefile so plus one for everyone for your efforts. I hope @Roman Raguet can answer this question :-) Sep 13, 2014 at 0:55
  • The best way to add additional information to your question is by editing it, with the edit button. It is better visible that way, and comments are mainly for secondary, temporary purposes. Comments are removed under a variety of circumstances. Anything important to your question should be in the question itself.
    – guntbert
    Sep 21, 2014 at 19:53
  • It is easy to do with KDE. May be you could install Dolphin file browser. Oct 10, 2014 at 21:01

4 Answers 4

12
+25

As of a long time, the Places list and Recents is hardcoded into Nautilus. There is nothing you can do about it at all.

You could theoretically modify the source code, but that is very problematic. You could theoretically use another file manager (Nemo seems good), but that seems to be your only choice if you do not want to modify source code. Or, you could just use Bookmarks like the rest of us.

If you want to try using the source code, tell me. I will post instructions here for your ease.

1
  • 2
    Thanks. So disappointing. Perhaps someone who knows the process will could either create a gnome bugzilla issue or point us to an existing one, where people who stumble across this roadblock could express their interests and uses cases for this issue to the developers, and follow feedback or progress. And a pointer to the source code process (ala askubuntu.com/a/351533/6130) would indeed be great.
    – nealmcb
    Feb 16, 2015 at 22:48
10

I don't enjoy saying this, but customizing Nautilus is not high on the list of priorities of GNOME devs at the moment. If you're unwilling to modify the source code of Nautilus, I very strongly recommend that you consider installing Nemo. Nemo is everything that Nautilus was, and more.

Installing Nemo is easy: search in the Software Centre (where it's called files) or -

sudo apt-get install nemo

In Nemo, there's only a single combined list for Places and Bookmarks:

nemo screenshot Therefore, adding an entry to the Places menu is exactly the same as adding an entry to the Bookmarks. Adobe's answer covers the configuration file, but any other method (CtrlD, dragging-and-dropping, etc.) works just as well.

For example, here's my file:

$ cat .config/gtk-3.0/bookmarks
file:///home/muru/Downloads Downloads
file:///home/muru/Documents
file:///home/muru/Music
file:///home/muru/Pictures
file:///home/muru/Videos
file:///home/muru/Templates
sftp://laptop/home/muru laptop
sftp://mars/muru mars

There's a distinction in the dialog box shown for opening files in most applications:

enter image description here

I think the entries for the home folder, Desktop folder and filesystems are hardcoded. They can't be removed, at any rate (the option is disabled for them, but enabled for the others).

Nemo uses the same icon for a folder in both the sidebar and the main view. It's called an emblem (the icon next to the name):

enter image description here

You can set any image here: enter image description here

In this case, the icon for the Templates folder is a 1.4MB wallpaper.

0
8

I don't know if it still applies to unity, but once in a while one would make a ~/.gtk-bookmarks file with something like the below to get a custom list of places:

file:///home/boris/bks bks
file:///home/boris/box box
file:///home/boris/dwn dwn
file:///home/boris/cmp cmp
file:///home/boris/pcs pcs
file:///home/boris/msc msc
file:///home/boris/pst pst
file:///home/boris/scl scl
file:///home/boris/trn trn
file:///home/boris/vds vds
file:///home/boris/wrk wrk

Here the first column are places, and the second one are how you want them appear in nautilus.

Edit:

Here it said that the ~/.gtk-bookmarks is replaced with ~/.config/gtk-3.0/bookmarks (but the syntax is the same). And here it is said that the list is found at ~/.config/user-dirs.dirs and one also had to add enabled=false in ~/.config/user-dirs.conf.

6
  • Use plain language. I'm a starter to ubuntu Aug 28, 2014 at 4:34
  • 1
    Does this work for Nautilus' Places as well? Or does it only do bookmarks? Or does it work for Nemo?
    – Kaz Wolfe
    Sep 12, 2014 at 23:23
  • root@xxx:/home/umar# ~/.gtk-bookmarks bash: /root/.gtk-bookmarks: No such file or directory root@xxx:/home/umar# ~/.config/gtk-3.0/bookmarks bash: /root/.config/gtk-3.0/bookmarks: No such file or directory root@xxx:/home/umar# /.config/user-dirs.conf bash: /.config/user-dirs.conf: No such file or directory root@xxx:/home/umar# Sep 13, 2014 at 0:31
  • 1
    @AUmarMukthar if the file ~/.config/gtk-3.0/bookmarks doesn't exist, create it (and any folders needed).
    – muru
    Sep 13, 2014 at 0:40
  • 1
    Tested, this only works for bookmarks. Not places.
    – Kaz Wolfe
    Sep 16, 2014 at 20:01
5

The answer by Adobe works for me on Ubuntu 14.04, but it is only for bookmarks

Very simply

Open a terminal and type

gedit ~/.config/gtk-3.0/bookmark

You will have a file listing like that in Adobe's answer.

Add a line to the file to show what you want.

2
  • 1
    I think this only edits bookmarks.
    – Kaz Wolfe
    Sep 12, 2014 at 23:20
  • @Whaaaaaat Yes! it is :-( Sep 13, 2014 at 0:52

You must log in to answer this question.

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