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.

On a fresh Ubuntu, you usually have these default (empty) folders:

  • Downloads
  • Documents
  • Music
  • Videos
  • ...

all with special emblems.

BUT, where are these Emblems coming from?, what's telling Nautilus to display these emblems? Now that Nautilus has dropped Emblems support, I am unable to inspect or change these emblems via GUI. Just being curious here...

Update

As I posted as comment to Uri's answer: everyone here, is right: I was confusing emblems with folder-specific icons in this case. But: let me rephrase my question:

Why does, for example, Nautilus know that it has to apply a special icon for these directories? Is there some flag on the actual dir, a metadata field in GVFS or is this hard-coded into Nautilus?

(running Ubuntu 12.04.1)

share|improve this question
1  
I know it does not answer the question but I assumed you would be more interested in adding emblems back into Nautilus ;) –  Rinzwind Jan 1 '13 at 21:21
2  
I'm pretty sure you're confusing emblems with just the Icon identifying the Folder. –  Uri Herrera Jan 1 '13 at 21:32
add comment

4 Answers

up vote 2 down vote accepted

Those are not emblems, in the image below you can see that the emblems are located in the lower right part of the Item (in this case is a symlink/shortcut).

The Icons for the user folders usually have a little representation of what that folder is all about. Those folders are "special" and are different from the rest of the folders on your system. In this example the folder is Shared/Public stuff, next to this is a regular folder.

Icons are located in two locations:

  1. ~/.icons
  2. /usr/share/icons

Depending on the the icon theme, they will placed in different categories (most are in /places).

This will help you understand it better:

Image


Why does, for example, Nautilus know that it has to apply a special icon for these directories? Is there some flag on the actual dir, a metadata field in GVFS or is this hard-coded into Nautilus?

It's a standard set by the freedesktop organization called xdg-user-dirs.

From the site:

xdg-user-dirs is a tool to help manage "well known" user directories like the desktop folder and the music folder. It also handles localization (i.e. translation) of the filenames.

The way it works is that xdg-user-dirs-update is run very early in the login phase.

This program reads a configuration file, and a set of default directories. It then creates localized versions of these directories in the users home directory and sets up a config file in $(XDG_CONFIG_HOME)/user-dirs.dirs (XDG_CONFIG_HOME defaults to ~/.config) that applications can read to find these directories.

You can read more about the XDG Base Directory Specification here.

share|improve this answer
    
You, as everyone here, is right: I was confusing emblems with folder-specific icons here. But: let me rephrase my question: Why does, for example, Nautilus know that it has to apply a special icon for these directories? Is there some flag on the actual dir, a metadata field in GVFS or is this hard-coded into Nautilus? –  isync Jan 2 '13 at 1:41
    
The part about xdg-user-dirs answered the question. –  isync Jan 22 '13 at 13:57
add comment

At least in 13.04, they are emblems, and they can be changed. Changing the icon gets rid of the folder, which for me wasn't what was desired.

I only had a handful of folders I wanted to do this to, so I didn't feel I needed the gui tools. Also, none of them worked for me in 13.04 (which I realize isn't what you have). The below did.

gvfs-set-attribute -t stringv file_name metadata::emblems emblem_name default

You can find the possible short names and the images that are applied with them in /usr/share/icons/Humanity/emblems (if you are using the default icon theme, otherwise look in your custom icon theme.)

For example, I did:

gvfs-set-attribute -t stringv ~/Sites metadata::emblems marketing art
share|improve this answer
    
Icons, emblems... Seems to have changed over versions. Anyway, what you describe works to "emblemize" folders from cli. Thanks! –  isync Oct 13 '13 at 12:45
add comment

You can use the Emblemize script to edit and inspect emblems (works with 11.10 and 12.04)

Installation

sudo add-apt-repository ppa:dr3mro/nautilus-actions-extra
sudo apt-get update
sudo apt-get install nautilus-actions nautilus-actions-extra nautilus-gksu

Re-start Nautilus...

nautilus -q

Result:

enter image description here

share|improve this answer
add comment

The icons are determined by the desktop-theme you are using- you can find them under /usr/share/icons/<ThemeName>/places

With Humanity that would then be /usr/share/icons/Humanity/places

share|improve this answer
add comment

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.