open_generic() calls open_generic_xdg_mime "$file" In open_generic_xdg_mime(), the existence of the appropriate .desktop file is checked: file="$x/applications/$default" if [ -r "$file" ] ; then This of course resets the $file variable that was originally passed to open_generic_xdg_mime() (referenced by $1 in the function), and if open_generic_xdg_mime() fails then it tries to fallback to run-mailcap or mimeinfo, using $file as the parameter (which now references a .desktop file). Launching via the browser fallback should still work because it uses $1, but $file was used in open_generic() for a reason. Additionally, if the fallback is used, it will open the .desktop file in the default editor instead of failing and passing to the browser-based fallback. Line 395 should declare file as local, or the variable in open_generic_xdg_mime() should be renamed.
Thanks! commited: http://cgit.freedesktop.org/portland/xdg-utils/commit/?id=1a0f10dee6d0414c8f43e19bcfbb29cca91712fb
*** Bug 38047 has been marked as a duplicate of this bug. ***
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.