Author Topic: What is Mono - Can windows programs run in Linux with it?  (Read 1269 times)

Offline Fargo

  • Hero Member
  • *****
  • Posts: 839
What is Mono - Can windows programs run in Linux with it?
« on: February 26, 2010, 11:16:29 PM »
Dear friends, recently I stumbled upon Mono http://www.mono-project.com/Main_Page from Novell.  I have found that their is some controversy as to whether or not it should be included in open source software due to MS patents that are attached to it.  But lets put that aside for the moment.  What I really want to know is what is it?

From the little bit I've been able to gather through my searches, Mono appears to be a framework that allows Windows based programs to run natively on Linux. Is that even close to being accurate.  It sounds too good to be true if it is.  (Of course the MS patents would make it just that.)  Please tell me more about how Mono works and what it is.  Would programs written for Windows be able to run on Mono out of the box or would it require the program to be broken down and recompiled or something.  Sorry for all my questions.  My mind is just going a mile a minute as I just learned about this. 

I guess in the end, my question, and the reason for my excitement, comes down to this.  Will the new WinTotal appraisal software be able to run under Mono?  http://www.alamode.com/labs/projects/Armstrong/default.aspx  A statement on the webpage claims "Re-written using cutting edge programming language C#."  Does that make it mono compatible.  If so my dreams might become reality.  I would actually be able to purchase appraisal software that ran natively on Linux.  Woo Hoo!  OK let me down gently guys.


Online muungwana

  • Hero Member
  • *****
  • Posts: 6236
Re: What is Mono - Can windows programs run in Linux with it?
« Reply #1 on: February 27, 2010, 12:56:15 AM »

mono is an open source implementation of microsoft's .net framework. Microsoft has two programming API developers can use when building windows applications and microsoft is encouraging developers to use .net API instead of native win32 ones.

.net is made up different pieces, some pieces are international standards and other pieces arent. Mono implements the standard pieces and since this standard is not a complete .net, a true windows .net application will most likely not work with mono.

An example of the part that is not covered by the standard and hence mono can not use is the GUI part of the application. Mono developers use gtk#(gtk binding for C#) as an alternative to build GUI parts of mono applications like banshee.

It is unlikely a window's developer sitting on her windows system will build a GUI application that will run on mono without any modifications.
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Offline sfeinst

  • Full Member
  • ***
  • Posts: 149
Re: What is Mono - Can windows programs run in Linux with it?
« Reply #2 on: February 27, 2010, 07:06:42 AM »
Just to add to what muungwana wrote, mono is available for Windows, so it is possible to write code that runs on both without modifications, but the odds of a Windows developer using mono for Windows to write their code is pretty slim.  The mono for Windows would be of more value to Linux developers wanting to port their code to Windows.

Offline Padma

  • Hero Member
  • *****
  • Posts: 1099
  • The Outbond
    • Civilization Fanatics Center
Re: What is Mono - Can windows programs run in Linux with it?
« Reply #3 on: February 27, 2010, 07:37:16 AM »
A Windows .NET application will not run in mono.  If nothing else, mono development will always be behind the equivalent .net version.  They will always be playing catch-up.  A Linux mono app will also probably not run directly in the Windows .NET environment.  All it is really good for is to provide a system to make it relatively easy to port from one to the other.
1st Lieutenant, USAFR (Retired)
Co-Administrator: Civilization Fanatics Center

Ramblings of a Professional Computer Geek


Offline Fargo

  • Hero Member
  • *****
  • Posts: 839
Re: What is Mono - Can windows programs run in Linux with it?
« Reply #4 on: February 27, 2010, 08:09:21 AM »
All it is really good for is to provide a system to make it relatively easy to port from one to the other.

It looks like you summed up all the other responses in one sentence.  Its not the answer I was hoping for, but at least now I know what it is.  Thanks for all the info.  All you guys laid it out pretty clearly what it is thanks. 

It sounds like if I want this software to work under Linux, I will need to talk to the company about Mono and see if I can convince a large company into porting their software to Linux.  It sounds unlikely, but it also sounds like it would be a lot less work than before.  So maybe their is hope.

Another question.  Since Mac and Linux are both Unix based, would Mono have a better chance of running something written for a Mac.  The appraisal software company I mentioned earlier has commented that they would write a Mac port before a Linux port.  Are there enough similarities between Mac and Linux that the Mac port might run under Linux?

Finally, would it be possible to write the program specifically for Mono, so that one Mono version could run on both Mac and Linux?  If this was possible, I might have a chance at getting the company to write a port to Mono, then they could run it on both Mac and Linux.  From what I've learned so far about Mono I doubt this will work, but hey, what do I know.  So let me know, can an app be written specifically for Mono that would run on Mac and Linux or possibly anything running mono?   

Offline Fargo

  • Hero Member
  • *****
  • Posts: 839
Re: What is Mono - Can windows programs run in Linux with it?
« Reply #5 on: February 27, 2010, 08:26:24 AM »
Just to add to what muungwana wrote, mono is available for Windows, so it is possible to write code that runs on both without modifications, but the odds of a Windows developer using mono for Windows to write their code is pretty slim.  The mono for Windows would be of more value to Linux developers wanting to port their code to Windows.

I just read through all of your responses again.  It looks like Muungwana actually answered my last question before I had asked it.  Good job. :)

So if I understand things correctly, if a program is written to Mono standards, it would work on Mac, Linux and Windows, correct?  I assume you would need to have Mono installed on each of these OSs for it to work though.  So if that is the case:

Is Mono open source? - My understanding is no, since there are the MS patents.  So my next question then is.

Is Mono free and readily available for all 3 Operating Systems?  If so, it would seem that I might still have a chance to get my software.  I would just have to convince the company that by writing it for Mono, they can be the sole appraisal software provider for both Mac and Linux.  Hey there would have to be some motivation for a company in that!

Offline Padma

  • Hero Member
  • *****
  • Posts: 1099
  • The Outbond
    • Civilization Fanatics Center
Re: What is Mono - Can windows programs run in Linux with it?
« Reply #6 on: February 27, 2010, 08:29:43 AM »
The link in your first post says the app is being written from the ground up in C#, which is Microsoft's language for .NET apps (and therefore for mono).  So a port to mono would be relatively straightforward.  Unless they depend on *current* .NET implementation, which mono does not yet support.  No Windows developer will willingly write an app for mono when they can write for .NET and use *all* the bells and whistles.  A mono app will just not look (or work) as well on Windows as a native .NET app.

Mono is open source.  But the "best parts" are not.
1st Lieutenant, USAFR (Retired)
Co-Administrator: Civilization Fanatics Center

Ramblings of a Professional Computer Geek


Offline Fargo

  • Hero Member
  • *****
  • Posts: 839
Re: What is Mono - Can windows programs run in Linux with it?
« Reply #7 on: February 27, 2010, 09:25:30 AM »
The link in your first post says the app is being written from the ground up in C#, which is Microsoft's language for .NET apps (and therefore for mono).  So a port to mono would be relatively straightforward.  Unless they depend on *current* .NET implementation, which mono does not yet support.  No Windows developer will willingly write an app for mono when they can write for .NET and use *all* the bells and whistles.  A mono app will just not look (or work) as well on Windows as a native .NET app.

Mono is open source.  But the "best parts" are not.

OK I'm a little confused.  You previously said "A Windows .NET application will not run in mono."  But now you said
Quote
"the app is being written from the ground up in C#, which is Microsoft's language for .NET apps (and therefore for mono).
  Please clarify.  Can .net apps be written in a language other than c# to make them .net apps but not mono?  Or did you just mean to state that c# will not automatically run in mono but a port will be strait forward.

I understand what you are saying that a programmer would not write for mono to give up the bells and whistles of .net, but is it expected that eventually Mono will be able to run all the bells and whistles of .net?  Or does that get into the proprieteray stuff too much?




Offline Padma

  • Hero Member
  • *****
  • Posts: 1099
  • The Outbond
    • Civilization Fanatics Center
Re: What is Mono - Can windows programs run in Linux with it?
« Reply #8 on: February 27, 2010, 09:53:24 AM »
C# was written by Microsoft to replace the Java language, since Sun refused to buckle to them.  .NET was written to replace the Java virtual machine.  Thus C# is the language, and .NET is the environment.  Since mono attempts to duplicate .NET, the language that is used is C#, even in Linux.

Miguel de Icaza thinks that mono will eventually have all the bells and whistles of .NET.  Personally, I think he is smoking something illegal.  So do most people who keep informed on this issue.  MS will never allow their proprietary system to be overtaken by an open source "wannabe".  That would mean you could make "MS-quality" apps without buying the MS tool.  They see mono as a tool to get developers to port Linux apps to Windows, and then keep them there by providing proprietary extensions to make the apps "better", but those extensions will be unable to be ported back to Linux.
1st Lieutenant, USAFR (Retired)
Co-Administrator: Civilization Fanatics Center

Ramblings of a Professional Computer Geek


Offline Fargo

  • Hero Member
  • *****
  • Posts: 839
Re: What is Mono - Can windows programs run in Linux with it?
« Reply #9 on: February 27, 2010, 10:10:55 AM »
Thanks.  I'll have to ponder over this stuff for awhile.  I've been very busy last night and this morning reading Monos website and here and other places trying to get a good grasp on what the possibilties are and what the chances are of the software I linked to earlier running in Mono.  I suppose my best bet is to just give it a try with the demo or to cantact them and see if they are familiar with Mono.  I even saw that mono could be integrated with a developers software.  If i understood this correctly it would allow Mono to be installed and then the software.  The end user wouldn't even have to understand what mono was to make it work in something like Windows or Mac.  Im sure Linux would be a little different due to the differences in distros. 

I think I agree with you about all the bells and whistles not making it to Mono.  But it would seem likely to me that all the bells and whistles that are in .NET today could make it to Mono.  But there will always be advances and other upgrades that MS doesn't want for Mono for exactly the reasons you listed.

Thanks for all the insight.  I'm sure I'll be back later with more questions.  But right now I think I just need some of the info I have gathered to sink in.  But I'm still excited that their is a small possiblity that the software I linked to could work in Mono and that it could easily be ported.

Online muungwana

  • Hero Member
  • *****
  • Posts: 6236
Re: What is Mono - Can windows programs run in Linux with it?
« Reply #10 on: February 27, 2010, 10:28:04 AM »

fargo,
Think of mono as a subset of microsoft's .net implementation. There are areas in .net mono can not support because microsoft has patent on them and mono will  have to work around them.

A window's developers sitting on her windows machine targeting windows users will most likely use parts of .net mono currently can not support and will probably never will. An example is the GUI part of the application. A window developers targeting window users will probably use winforms to build the GUI. Mono cant use them because they are under patents and a mono port will have to rebuild the GUI using what mono can support and that is gtk# and the application will look like firefox or gimp or pidgin or any other gtk application.

If a developer want to target windows, macintosh and linux platforms using mono, they will have to code against mono and use what mono supports and the program will use foreign on all but linux under gtk based desktop environment like gnome.

.net is currently at version 3.5 with 4.0 on its way. Mono currently supports version 2.0 with bits and pieces of 3.0 and 3.5 (dont quote me on this part). Feature mismatch btw .net are mono are inherent due to mono chasing after .net tail and this is another reason why a .net application will almost always never work on mono because it will use latest version of the framework and mono will always be behind.

Mono is will get most of its use on the servers. I do not see it taking off on the desktops. I doubt a windows or mac developers will start using mono and build gtk looking applications. They will look foreign on all but gnome and their users will probably not be happy
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Offline Fargo

  • Hero Member
  • *****
  • Posts: 839
Re: What is Mono - Can windows programs run in Linux with it?
« Reply #11 on: February 27, 2010, 12:07:43 PM »

fargo,
Think of mono as a subset of microsoft's .net implementation. There are areas in .net mono can not support because microsoft has patent on them and mono will  have to work around them.

A window's developers sitting on her windows machine targeting windows users will most likely use parts of .net mono currently can not support and will probably never will. An example is the GUI part of the application. A window developers targeting window users will probably use winforms to build the GUI. Mono cant use them because they are under patents and a mono port will have to rebuild the GUI using what mono can support and that is gtk# and the application will look like firefox or gimp or pidgin or any other gtk application.

If a developer want to target windows, macintosh and linux platforms using mono, they will have to code against mono and use what mono supports and the program will use foreign on all but linux under gtk based desktop environment like gnome.

.net is currently at version 3.5 with 4.0 on its way. Mono currently supports version 2.0 with bits and pieces of 3.0 and 3.5 (dont quote me on this part). Feature mismatch btw .net are mono are inherent due to mono chasing after .net tail and this is another reason why a .net application will almost always never work on mono because it will use latest version of the framework and mono will always be behind.

Mono is will get most of its use on the servers. I do not see it taking off on the desktops. I doubt a windows or mac developers will start using mono and build gtk looking applications. They will look foreign on all but gnome and their users will probably not be happy

Looks like another jolt of reality here.  Too bad, I had such high hopes of what this could mean.  But I understand what you are saying.  I was just hoping and dreaming I guess.