You are not logged in.

#1 2009-03-25 08:25:55

Maskawanian
Member
Registered: 2009-01-06
Posts: 29

[Resolved] Run Mono apps without prefixing mono

Hi,

I haven't developed c# since I switched from Debian. Just the other day I decided to. One thing I noticed in the switch was under Debian I could simply run my program with ./program however with Arch I must prefix mono as in "mono ./program" if I do not I get the error "bash: ./program: cannot execute binary file".

How would one change this behaviour?

Thanks,

Dan

Last edited by Maskawanian (2009-03-25 09:07:41)

Offline

#2 2009-03-25 08:52:09

gattschardo
Member
Registered: 2009-03-25
Posts: 3

Re: [Resolved] Run Mono apps without prefixing mono

To answer this it would be interesting to know debian handles these mono files. Do you still have one available? Maybe on debian they are in ELF format - I don't really know in what sort of format mono executables are supposed to be, but I cannot imagine why they should run "out of the box" on debian, unless they are ELF files or some sort of script, that does the mono prefixing. If you still have one of your debian-mono-files, you could run file on it to see what it is.

Last edited by gattschardo (2009-03-25 08:52:42)


Beware -you will never get out of this world alive!

Offline

#3 2009-03-25 09:05:11

Maskawanian
Member
Registered: 2009-01-06
Posts: 29

Re: [Resolved] Run Mono apps without prefixing mono

Unfortunately I don't have them still.

I'm thinking a trick like the following was used:

http://wiki.archlinux.org/index.php/Win … 2_binaries

Mind you I'm not using Wine, just Mono.

I am going to give this a look to see if I can modify the instructions for Mono.

Edit: Yes, this was it.

http://www.mono-project.com/Guide:Runni … ux_only.29

Edit 2: Updated Arch Wiki with information (pretty much a straight copy of the Wine instructions modified with the different values):

http://wiki.archlinux.org/index.php/Mon … the_Kernel

Last edited by Maskawanian (2009-03-25 09:15:39)

Offline

#4 2009-03-25 09:39:50

ise
Developer
From: Karlsruhe / Germany
Registered: 2005-10-06
Posts: 404
Website

Re: [Resolved] Run Mono apps without prefixing mono

You have done the whole stuff completly right, but have you seen the file /etc/rc.d/mono?
If you include it into your daemons array in /etc/rc.conf everything will be setup on boot automatically, the file is doing exactly the same as mentioned in the wiki article wink

Cheers,
Daniel

EDIT: I have updated the wiki page to point it to the daemon script.

Last edited by ise (2009-03-25 09:46:02)

Offline

#5 2009-03-25 15:17:02

Maskawanian
Member
Registered: 2009-01-06
Posts: 29

Re: [Resolved] Run Mono apps without prefixing mono

ise wrote:

You have done the whole stuff completly right, but have you seen the file /etc/rc.d/mono?
If you include it into your daemons array in /etc/rc.conf everything will be setup on boot automatically, the file is doing exactly the same as mentioned in the wiki article wink

Cheers,
Daniel

EDIT: I have updated the wiki page to point it to the daemon script.

Its always more simple then you expect it (and the answer is right in front of your eyes most of the time). Thanks!

Offline

Board footer

Powered by FluxBB