Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
    
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 :-) –  A Umar Mukthar Sep 13 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 at 19:53
    
It is easy to do with KDE. May be you could install Dolphin file browser. –  Barafu Albino Oct 10 at 21:01

4 Answers 4

up vote 4 down vote accepted
+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.

share|improve this answer

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.

share|improve this answer
    
Use plain language. I'm a starter to ubuntu –  A Umar Mukthar Aug 28 at 4:34
1  
Does this work for Nautilus' Places as well? Or does it only do bookmarks? Or does it work for Nemo? –  Whaaaaaat Sep 12 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# –  A Umar Mukthar Sep 13 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 at 0:40
    
Actually it is there but i have to call some text editor like gedit. Now it opens.. –  A Umar Mukthar Sep 13 at 0:43

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.

share|improve this answer

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.

share|improve this answer
1  
I think this only edits bookmarks. –  Whaaaaaat Sep 12 at 23:20
    
@Whaaaaaat Yes! it is :-( –  A Umar Mukthar Sep 13 at 0:52

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.