Comment 18 for bug 1551171

Revision history for this message
In , urpm-tools (urpm-tools) wrote :

It's interesting, g_app_info_get_default_for_type() by itself does take mimeapps.list into account. As an experiment, I have created ~/.local/share/applications/mimeapps.list with the following line:

  inode/directory=kde4-gwenview.desktop;

And used the following sample program:

    g_type_init ();
    GAppInfo *def;
    def = g_app_info_get_default_for_type ("inode/directory", TRUE);
    printf("EXEC: %s\n",g_app_info_get_executable(def));

It prints "gwenview". However, FF doesn't seem to take mimeapps.list into account and uses associations from mimeinfo.cache - e.g., when I click "Open containing folder" menu item for the downloaded file, the folder is opened using Dolphin (which is the default system-wide association), not Gwenview.

I do see g_app_info_get_default_for_type() is called in FF the code, so something strange is going on here, indeed. And this makes FF quite inconvenient for KDE users, since KDE stores file associations in mimeapps.list; as a result, FF doesn't use associations set in the KDE control Center.