xdg-mime defualt is inconsistent with xdg-open
Submitted by tezeb
Assigned to Portland Bugs
Description
Steps to reproduce:
-
DE set to gnome3
-
unset XDG_DATA_HOME
-
have multiple valid pdf applications installed(ie. gimp, evince)
-
assume no custom settings for handlers
-
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
-
run: xdg-mime default /usr/share/applications/evince.desktop application/pdf Again, debug shows: Updating /home/user/.local/share/applications/mimeapps.list
-
run: xdg-mime query default application/pdf It displays '/usr/share/applications/evince.desktop' as expected.
-
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.
Version: 1.1.0 rc3