Here's Wine's debian/wine.mime file:

application/x-msdos-program; /usr/bin/wine '%s'; description=Windows Executable
application/x-msdownload; /usr/bin/wine '%s'; description=Windows Executable
application/exe; /usr/bin/wine '%s'; description=Windows Executable
application/x-exe; /usr/bin/wine '%s'; description=Windows Executable
application/dos-exe; /usr/bin/wine '%s'; description=Windows Executable
vms/exe; /usr/bin/wine '%s'; description=Windows Executable
application/x-winexe; /usr/bin/wine '%s'; description=Windows Executable
application/msdos-windows; /usr/bin/wine '%s'; description=Windows Executable
application/x-msdos-program; /usr/bin/wine '%s'; description=Windows Executable
application/x-msi; /usr/bin/wine '%s'; description=Windows Installer archive


I believe application/x-exe is equivalent to application/x-executable since 
there's no definition of x-exe in shared-mime-info, but I haven't tested 
switching the two.

Here's the x-executable entry in shared-mime-info:

  <mime-type type="application/x-executable">
    <_comment>executable</_comment>
    <magic priority="40">
      <match type="string" value="\177ELF" offset="0">
        <match type="byte" value="1" offset="5">
          <match type="little16" value="2" offset="16"/>
        </match>
      </match>
      <match type="string" value="\177ELF" offset="0">
        <match type="byte" value="2" offset="5">
          <match type="big16" value="2" offset="16"/>
        </match>
      </match>
      <match type="string" value="MZ" offset="0"/>
      <match type="little16" value="0x521c" offset="0"/>
      <match type="host16" value="0420" offset="0"/>
      <match type="host16" value="0421" offset="0"/>
      <match type="little16" value="0603" offset="0"/>
    </magic>
    <glob pattern="*.exe"/>
  </mime-type>

Here's one of the relevant entries in shared-mime-info for ruby scripts
(there are similar ones for python/shell scripts):

  <mime-type type="application/x-ruby">
    <sub-class-of type="application/x-executable"/>
    <sub-class-of type="text/plain"/>
    <_comment>Ruby script</_comment>
    <magic>
      <match type="string" value="/bin/env ruby" offset="1:16"/>
      <match type="string" value="/bin/ruby" offset="1:16"/>
    </magic>
    <glob pattern="*.rb"/>
  </mime-type>

I'm going to attempt a patch by switching the sub-class-of x-executable
to just duplicate the magic in x-executable and see if it works.  At
this rate, though, it looks like another shared-mime-info bug rather
than a Wine problem.

-- 
wine wants to open shell scripts
https://bugs.launchpad.net/bugs/192122
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to