[Mono-docs-list] Question about EXE binaries and kernels?

Aaron Weber aaron@ximian.com
Tue, 06 Apr 2004 16:48:17 -0400


--=-NgrrZfjcYZLzacd/Qjup
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Is the following true? If so, what does it mean-- what will happen if I
fail to "make the EXE binaries compatible with the kernel?"


You can make your mono .exe files executable by following these steps:


     1. Enabling binfmt in your kernel.
     2. Adding the line below to your fstab: 
        
        binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc none
        
     3. On boot run the command below: 
        
        echo ':CLR:M::MZ::/usr/bin/mono:' >
        /proc/sys/fs/binfmt_misc/register
        
     4. chmod +x foobar.exe

Another way to accomplish the above is to wrap the 
mono .exe file it in a shell script, like this: 

#!/bin/sh
/usr/bin/mono "$@"


If you installed mono to a different location, substitute that
for /usr/bin/mono. You can check with the "which mono" command.


--=-NgrrZfjcYZLzacd/Qjup
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.1.11">
</HEAD>
<BODY>
Is the following true? If so, what does it mean-- what will happen if I fail to &quot;make the EXE binaries compatible with the kernel?&quot;<BR>
<BR>
<BR>
You can make your mono .exe files executable by following these steps:<BR>
<BR>
<OL TYPE=1>
    <LI TYPE=1 VALUE=1>Enabling binfmt in your kernel.
    <LI TYPE=1 VALUE=2>Adding the line below to your fstab: <BR>
<PRE>
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc none
</PRE>
    <LI TYPE=1 VALUE=3>On boot run the command below: <BR>
<PRE>
echo ':CLR:M::MZ::/usr/bin/mono:' &gt;
/proc/sys/fs/binfmt_misc/register
</PRE>
    <LI TYPE=1 VALUE=4>chmod +x foobar.exe
</OL>
Another way to accomplish the above is to wrap the <BR>
mono .exe file it in a shell script, like this: 
<PRE>
#!/bin/sh
/usr/bin/mono &quot;$@&quot;
</PRE>
<BR>
If you installed mono to a different location, substitute that for /usr/bin/mono. You can check with the &quot;which mono&quot; command.<BR>
<BR>
</BODY>
</HTML>

--=-NgrrZfjcYZLzacd/Qjup--