[Wine] Can someone help me write an update-binfmts script for binfmt-support?
Colin Watson
cjwatson at ubuntu.com
Thu Apr 5 15:40:19 BST 2007
On Wed, Apr 04, 2007 at 01:42:53AM -0700, Scott Ritchie wrote:
> Right now, we get this annoying error message when double clicking
> an .exe with Wine installed:
> http://tuzakey.com/~scott/wine_without_mime.png
>
> MIME suport for .exe's was removed, under the theory that binfmt-support
> can be configured to run them. See, eg, this bug:
> https://bugs.launchpad.net/ubuntu/+source/wine/+bug/24829
>
> From reading the report, it seems like the proper solution is to have
> binfmt-misc support rather than MIME types for executables. The trouble
> is, this is currently broken, and I really am not sure how to use it.
>
> I'm a bit worried about doing it wrong too. Update-binfmts looks like a
> very easy way to break a lot of things if not set perfectly right,
Only really if you configure it such that you can't run update-binfmts
itself without going through a binfmt interpreter, or if you do
something silly like setting a binfmt interpreter for ELF. Otherwise it
hasn't historically been much of a source of problems.
> and I'm not sure if we want all .exe files to always open with Wine -
> folding at home for linux, for example, has an ELF binary with a ".exe"
> extension in its name.
The binfmt file already in the wine package correctly keys off the "MZ"
magic, not the .exe extension.
> There's an entire man page for update-binfmts, but what I'd really
> like to see is an example.
>
> So, can someone point me to a package that uses this script already?
Try the mono-common package, which already has code to arrange to be
invoked only for certain types of MZ-magic files; you can very likely
just use that with small tweaks. The code in mono was written in
consultation with me (the binfmt-support author).
Cheers,
--
Colin Watson [cjwatson at ubuntu.com]
More information about the ubuntu-devel
mailing list