File types and icons
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 freedesktop.org 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/rox.sourceforge.net/MIME-types 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 freedesktop.org basedir spec for details.
- Printer-friendly version
- Login to post comments
Recent comments
2 years 8 weeks ago
2 years 17 weeks ago
3 years 1 week ago
3 years 5 weeks ago
3 years 9 weeks ago
3 years 10 weeks ago
3 years 10 weeks ago
3 years 14 weeks ago
3 years 14 weeks ago
3 years 15 weeks ago