[Mono-list] Running EXE's without "Mono" preamble

Alexandre Miguel Pedro Gomes alexmipego at gmail.com
Thu Jun 1 10:27:20 EDT 2006


Then you can see that your machine's kernel has binfmt loaded, since
modprobe told you there was no such modules, the binfmt support is buildin
in the kernel.

>From my experience, I build my own kernels, but I keep binfmt enabled and my
distro kernel also comes with binfmt enabled by default, I only need to do:
echo ':CLR:M::MZ::/usr/bin/mono:' > /proc/sys/fs/binfmt_misc/register

If you make sure your .exe files as execute permission (either using
nautilus properties for that file or by doing chmod +x my.exe) you should be
able to run those .Net exe files without the need to call mono my.exe

If you are developing software and/or deplying it, having the user to
configure binfmt is not a good option. The better is to create a simple
script, for instance called myapp and inside that script you simply call
mono myapp.exe




On 6/1/06, Lee <lee at datatrakpos.com> wrote:
>
>
>
> Hi Alexandre,
>
> From that command, I get:
>
> nodev   sysfs
> nodev   rootfs
> nodev   bdev
> nodev   proc
> nodev   sockfs
> nodev   binfmt_misc
> nodev   usbfs
> nodev   usbdevfs
> nodev   futexfs
> nodev   tmpfs
> nodev   pipefs
> nodev   eventpollfs
> nodev   devpts
>         ext2
> nodev   ramfs
> nodev   hugetlbfs
>         iso9660
> nodev   relayfs
> nodev   mqueue
>         ext3
> nodev   rpc_pipefs
> nodev   autofs
>
>
> Lee
>
>         A cat /proc/filesystems would be better to check that.
>
>
>         On 6/1/06, Lee <lee at datatrakpos.com> wrote:
>
>
>
>                 David,
>
>                 Thank you for responding, I appreciate the help.  I am
> running CentOS 4.3x
>                 and that command (which I have become all too familiar
> with,
> LOL) produces
>                 the following:
>
>                 mount: binfmt_misc already mounted or
> /proc/sys/fs/binfmt_misc busy
>                 mount: according to mtab, none is already mounted on
>                 /proc/sys/fs/binfmt_misc
>
>                 Thank you,
>
>                 Lee
>
>                 > This could be a kernel config issue, if you build your
> own
>                 > kernels check that you have BINFMT_MISC - (under
> 'Executable
>                 > file formats' in
>                 > menuconfig) set to be build either as a module, or built
> into
>                 > the kernel.
>                 >
>                 > If you are using a stock kernel, check if the command
>                 >
>                 >       mount binfmt_misc -t binfmt_misc
> /proc/sys/fs/binfmt_misc
>                 >
>                 > runs, if so you have it built into your kernel already,
> and
>                 > can proceed to the next step.
>                 >
>                 > David.
>                 >
>                 >
>                 > Lee wrote:
>                 > >
>                 > > Hello,
>                 > >
>                 > > But when running
>                 > >
>                 > > Modprobe binfmt
>                 > >
>                 > > I get "FATAL Module binfmt not found" and I cannot go
> further.
>                 > >
>                 > > Any assistance would be greatly appreciated.
>                 > >
>                 > > Warm Regards,
>                 >
>                 >
>
>                 _______________________________________________
>                 Mono-list maillist  -  Mono-list at lists.ximian.com
>                 http://lists.ximian.com/mailman/listinfo/mono-list
>
>
>
>
>
>         --
>         Alexandre Gomes, Portugal
>
>
>


-- 
Alexandre Gomes, Portugal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20060601/7a30f0b3/attachment.html


More information about the Mono-list mailing list