2 added 53 characters in body
source | link

1: run gvfs-gio info -a standard::symbolic-icon file to see the corresponding symbolic icon names (on older setups replace gio info with gvfs-info)

1: run gvfs-info -a standard::symbolic-icon file to see the corresponding symbolic icon names

1: run gio info -a standard::symbolic-icon file to see the corresponding symbolic icon names (on older setups replace gio info with gvfs-info)

1
source | link

This was hardcoded in Nautilus as per the devs decision to only show basic type information in the Type column by default, so that sorting by type would group type families.
The basic types are defined in nautilus-file.c based on generic (symbolic) icon names1:

struct {
        const char *icon_name;
        const char *display_name;
} mime_type_map[] = {
    { "application-x-executable", N_("Program") },
    { "audio-x-generic", N_("Audio") },
    { "font-x-generic", N_("Font") },
    { "image-x-generic", N_("Image") },
    { "package-x-generic", N_("Archive") },
    { "text-html", N_("Markup") },
    { "text-x-generic", N_("Text") },
    { "text-x-generic-template", N_("Text") },
    { "text-x-script", N_("Program") },
    { "video-x-generic", N_("Video") },
    { "x-office-address-book", N_("Contacts") },
    { "x-office-calendar", N_("Calendar") },
    { "x-office-document", N_("Document") },
    { "x-office-presentation", N_("Presentation") },
    { "x-office-spreadsheet", N_("Spreadsheet") },
};

Types that do not fall in the above categories are shown as Unknown:

if (basic_type == NULL) {
    basic_type = g_strdup (_("Unknown"));

As a result, a file with mime type application/x-myokit (with a corresponding symbolic icon name application-x-generic) will be listed as Unknown in the Type column while a file with mime type text/x-myokit (with a corresponding symbolic icon name text-x-generic) will be listed as Text in the Type column (see also various system files like *.so files under /usr/lib or *.mo files in /usr/share/locale - they're all listed as Unknown but if you select one of them and hit Alt+Enter you get detailed, accurate information).


You can make Nautilus list something else if you use generic-icon name in your xml file. Though your options are limited to the above mentioned categories. So, e.g. if you wanted each of your *.mmt files to be listed as Program in the Type column you would edit your x-myokit.xml like this:

<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
    <mime-type type="application/x-myokit">
        <comment>Myokit model definition</comment>
        <generic-icon name="text-x-script"/>
        <glob pattern="*.mmt"/>
    </mime-type>
</mime-info>

Don't forget to update the mime database with:

update-mime-database ~/.local/share/mime

If you need more useful informations you could enable/check the MIME type column in Nautilus preferences (or with dconf/gsettings: add mime_type to org.gnome.nautilus.list-view default-visible-columns).

1: run gvfs-info -a standard::symbolic-icon file to see the corresponding symbolic icon names