While trying to find out the icon used for a mimetype, I noticed that gnome and oxygen icon themes on my Arch Linux and Ubuntu 14.04 had the following folder structures:

apps  mimetypes

apps  mimetypes
actions  apps  categories  devices  emblems  emotes  mimetypes  places  status

actions  animations  apps  categories  devices  emblems  emotes  mimetypes  places  special  status

Sizes first, then types in them.

In Xubuntu's default themes (elementary-xfce*), the ordering was reversed:

128  16  22  24  32  48  64  96  symbolic

128  16  22  24  32  48  64

128  16  22  24  32  48  64  96  symbolic

128  16  22  24  32  48  64  96  symbolic

128  16  22  24  32  48  64  symbolic

128  16  22  24  32  48  64  symbolic

Presumably both work. Are there two standard ways to organise icon themes? If not, which is the standard way?

The specification on freedesktop.org only says:

In the theme directory are also a set of subdirectories containing image files. Each directory contains icons designed for a certain nominal icon size, as described by the index.theme file. The subdirectories are allowed to be several levels deep, e.g. the subdirectory "48x48/apps" in the theme "hicolor" would end up at $basedir/hicolor/48x48/apps.

The pseudocode given doesn't seem to make a distinction, unless I missed something. However, the part about applications adding their own icons favours one way:

So, you're an application author, and want to install application icons so that they work in the KDE and Gnome menus. Minimally you should install a 48x48 icon in the hicolor theme. This means installing a PNG file in $prefix/share/icons/hicolor/48x48/apps. Optionally you can install icons in different sizes. For example, installing a svg icon in $prefix/share/icons/hicolor/scalable/apps means most desktops will have one icon that works for all sizes. You might even want to install icons with a look that matches other well known themes so your application will fit in with some specific desktop environment.

Is it anything goes? Or are the Xubuntu icon themes buggy?

  • They both work as the standard only requires the presence of index.theme (this is where you actually specify how your directories are organised). So basically, anything goes as long as you specify which is what in your index.theme. I would say that the gnome/oxygen way is the proper way though (that's how most icon sets are organised anyway). – don_crissti Dec 26 '15 at 15:20
  • So an end-user or third party attempting to find a suitable location must parse index.theme? I guess that answers this question, then. – muru Dec 26 '15 at 16:07
  • Yes, something like that. Also (just in case you are dealing with several index.theme that are placed in different location but define the same theme) note that, per the spec, the first index.theme that is found will be used. – don_crissti Dec 26 '15 at 20:25
  • @don_crissti I wasn't.. I was trying to answer askubuntu.com/a/712230/158442, and was going to suggest looking in <theme>/*x*/mimetypes, when I noticed that Xubuntu's themes have mimes instead of mimetypes and the order reversed. – muru Dec 26 '15 at 20:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.