https://bugs.winehq.org/show_bug.cgi?id=28159
--- Comment #9 from Jens Reyer jre.winesim@gmail.com --- One of our users ran into this with html files. However Wine crashed for him, instead of infinite looping. See https://bugs.debian.org/845334. Debian wine 1.8.5-1
I could reproduce this and got an infinite loop, just like the original submitter. Debian wine-development 2.0~rc3-1
Reproduce: ========== To reproduce remove all related content in your mimeapps.list files. Here this was:
~/.config/mimeapps.list text/html=firefox-esr.desktop;chromium.desktop; (if user clicks *in* firefox on "make default") ~/.local/share/applications/mimeapps.list text/html=chromium.desktop (if user clicks *in* chromium on "make default") /usr/share/applications/gnome-mimeapps.list text/html=firefox-esr.desktop;chromium.desktop; (installed by Gnome)
Our user uses no desktop environment, just fvwm. He has no system wide mimeapps.list to set default applications, only his own handcrafted one which doesn't cover html. This would have prevented this problem otherwise.
But if no default application is set the system just checks for available applications. This information is gathered from the installed .desktop files, and made available in a mimeinfo.cache file.
Wine is run by regular users, so it installs its desktop files in $HOME. Since user configuration takes precedence over system configuration the system will usually prefer associations with Wine over those with other applications.
E.g. ~/.local/share/applications/wine-extension-htm.desktop will be preferred to /usr/share/applications/firefox-esr.desktop.
In summary, I assume today this problem doesn't affect many users because most use desktop environments which specify lots of default applications. But unfortunately as soon as no default application is specified the association with Wine will be used in nearly every case, which is very unfortunate.
Patches: ======== I came up with two patches, just attached to this bug, but not submitted at wine-patches.
With each of them Windows applications still know how to use native applications to open a file, or use a new default from Windows (e.g. some Windows app that I installed used the native "evince" to open a pdf, and after I installed it in Wine "Foxit Reader").
Feedback about these patches is very welcome. I'd especially would like something along Don-t-create-native-file-type-associations.patch, but with the ability to create the associations manually. Then I'd be happy to submit it for inclusion in Wine.
We will probably go with Blacklist-some-extensions-for-native-file-type-associatio.patch in Debian for now.