Skip navigation.

File types and icons

strict warning: Only variables should be passed by reference in /home/tal/rox/htdocs/desktop/modules/book/book.module on line 559.

How does the filer decide what icon to show for a file, and which program to use to open it?

For each file, the filer starts by working out its MIME-Type, as follows:

  • If the file's user.mime_type extended attribute it set, then that is its MIME type.
  • If the file's name matches a pattern in one of the globs file (usually, /usr/share/mime/globs) then the line in that file gives the type.
  • If the contents of the file match a pattern in one of the magic files (usually, /usr/share/mime/magic) then that gives the type.
  • Otherwise, it is text/plain (looks like text), application/x-executable (marked as executable) or application/x-octet-stream (doesn't look like UTF-8 text).

Do not edit the globs and magic files directly, as they are generated from some XML files by the update-mime-database command. If the filer isn't getting the right type for a file, you can use MIME-Editor to change the rules.

Choosing an icon

Having decided on the type, the filer now finds an icon using the Icon spec. By default, this results in loading an icon from ~/.icons/ROX. You can also override the icons using the filer's Set Icon... menu item. See the Theming page for details.

Finding a program to open a file

ROX-Filer looks in your ~/.config/ directory, and tries to run the program with the same name as the MIME type. The easiest way to set a type is by choosing Set Run Action from the menu.

If no program is found various fallbacks are tried: just the first part of the MIME type, and some other configuration directories. See the basedir spec for details.

Syndicate content