Steps to reproduce: 1. DE set to gnome3 2. unset XDG_DATA_HOME 3. have multiple valid pdf applications installed(ie. gimp, evince) 4. assume no custom settings for handlers 5. run: xdg-mime query default application/pdf With XDG_UTILS_DEBUG_LEVEL, it will display multiple paths being checked. It finds gimp.desktop in /usr/share/applications/defaults.list 6. run: xdg-mime default /usr/share/applications/evince.desktop application/pdf Again, debug shows: Updating /home/user/.local/share/applications/mimeapps.list 7. run: xdg-mime query default application/pdf It displays '/usr/share/applications/evince.desktop' as expected. 8. run: xdg-open xxx.pdf It opens gimp.desktop(or whatever was the default). The BUG: Internally xdg-open uses gvfs-open(version 1.30.3 here), which uses ~/.config/ as default XDG_DATA_HOME when the variable is unset, but xdg-mime uses some awk magic and completly different path.
It is even worse than that. reading and setting values does not occur in the same file: $ XDG_UTILS_DEBUG_LEVEL=3 xdg-mime query default text/html Checking /home/gmaudoux/.config/mimeapps.list firefox.desktop $ XDG_UTILS_DEBUG_LEVEL=3 xdg-mime default chromium-browser.desktop text/html make_default_kde: No kde runtime detected make_default_generic chromium-browser.desktop text/html Updating /home/gmaudoux/.local/share/applications/mimeapps.list $ XDG_UTILS_DEBUG_LEVEL=3 xdg-mime query default text/html Checking /home/gmaudoux/.config/mimeapps.list firefox.desktop
Oh, it seems this has been fixed in https://bugs.freedesktop.org/show_bug.cgi?id=95051. A new bugfix release for this ?
ok, closing as dup *** This bug has been marked as a duplicate of bug 95051 ***
Nice try... Still happens with patch from 95051 applied. Have anyone even tested this?!!!! The issue have to do with xdg-open, not only xdg-mime, which is clearly stated in reproduction step #7.
sorry, misinterpreted comment #2 which claims that it is fixed
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xdg/xdg-utils/issues/103.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.