http://bugs.winehq.org/show_bug.cgi?id=59767 --- Comment #17 from Olivier F. R. Dierick <o.dierick@piezo-forte.be> --- (In reply to Aaron Rainbolt from comment #15)
What happens if you try to 'xdg-open' an EXE file? On my end, this always automatically launches the application, on both Fedora (using WineHQ's RPM package) and Debian (using WineHQ's DEB package), if I'm remembering correctly. I've also seen "Wine Windows Program Loader" as an option in the "Open With..." menus of various file managers when right-clicking an EXE file, something that should only happen if the MIME system recognizes Wine as a file handler for EXE files.
Hello, I only use locally built Wine, no distributed package, that probably makes a difference. Gnome File Roller is the default handler for application/x-ms-dos-executable on Gnome/Debian. If I disable the File Roller handler, 'xdg-open' prints an error message 'Unable to find the default application for this type of content "application/x-ms-dos-executable"' (rough translation from French), and in nautilus it shows a "no application for this file" dialog. I made a few tests with stub desktop files and XDG selects the default in that order (first found becomes the default): - first desktop file specified in the user's mimeapps.list; - first desktop file specified in the system's mimeapps.list; - first desktop file in the user's database directory, in alphabetical order; - first desktop file in the system database directory, in alphabetical order; If you want to prevent Wine from running EXE files without confirmation, you could set the default handler to something else in your mimeapps.list, a desktop file for a custom wrapper script, for example. (In reply to Aaron Rainbolt from comment #16)
The xdg-mime manpage quoted in the original report, which states clearly "Keeping opening and executing separate actions helps with people protecting themselves from malware, the default handler is an opener, not a runner."
That's a security policy. There is no concrete mechanism to enforce it in the implementation. Wine cannot prevent XDG to select it as the default handler, since XDG just uses the first desktop file it finds. Having some way to tell XDG that a handler is not an 'opener' but a 'runner', and enforcing the policy by excluding runners from being selected as default, is a valid feature request to direct at Freedesktop. If they offered such a feature, Wine would use it. Regards. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.