[Mono-list] Registering the MonoRuntime with Kernel

Scott Mohekey scott.mohekey@telogis.com
Tue, 14 Sep 2004 09:14:42 +0000


Some distributions already support this. Gentoo is an example.

Gaurav Vaish wrote:

>Hi,
>
>  How about registering the mono runtime (mono) with the linux kernel
>so that we don't have to write "mono" before executing any executable?
>
>  Ok ok... this is not my idea. I was just reading through dotGNU
>(after a looooong time) and found this:
>
>  http://www.southern-storm.com.au/pnet_faq.html
>
>  The topic is covered under item 3: 3.1, 3.2, 3.3. I have pasted the
>contents below for completeness.
>
>
>
>Happy Hacking,
>Gaurav Vaish
>http://www.mastergaurav.org
>--------------------------------
>
>
>{Note: Pasting in gmail-mailbox may not have preserved the formatting}
>
>------------------------------------------------------------------
>
>3. Using the runtime engine
>3.1. How do I run IL programs?
>IL programs are executed using the "ilrun program, as follows: 
>ilrun hello.exe
>The ".exe" extension is not required: you can rename the program to
>"hello" if you wish.
>If the IL program has command-line options, they can be supplied after
>the name of the IL executable:
>
>ilrun getenv.exe PATH
>
>3.2. Can I avoid typing "ilrun"?
>If your operating system uses the Linux kernel, and you have root
>access, then you can avoid typing "ilrun" to execute programs from the
>command-line.
>You must first register "ilrun" with the Linux kernel, by executing
>the following command as root:
>
>ilrun --register
>
>Then you can run programs as follows: 
>  chmod +x hello.exe
>  ./hello.exe
>This will also work if you rename "hello.exe" to "hello", and then
>place it somewhere on your PATH.
>To unregister "ilrun", execute the following command as root: 
>
>ilrun --unregister
>
>Note: registration will only work with the Linux kernel (versions 2.2
>and later), and when you are logged in as root.
>
>If you prefer to start and stop services with "init.d", you can use
>the script "pnet/doc/init.d-pnet" from the source code. Copy it to
>"/etc/init.d/pnet". The script uses "/usr/local/bin/ilrun" to register
>the engine, and it is designed for the RedHat distribution. Minor
>modifications may be required for other install locations and
>distributions.
>
>
>3.3. I've registered "ilrun", but it is running the wrong version. Why?
>When you register "ilrun", it attempts to construct the full path of
>the engine to pass to the kernel. Normally it does this by searching
>the PATH. You can specify an explicit pathname as follows:
>ilrun --register /usr/local/bin/ilrun
>------------------------------------------------------------------
>_______________________________________________
>Mono-list maillist  -  Mono-list@lists.ximian.com
>http://lists.ximian.com/mailman/listinfo/mono-list
>
>
>  
>