Slashdot Mirror


VM Enables 'Write-Once, Run Anywhere' Linux Apps

An anonymous reader writes "A startup will soon launch 'a kind of holy software grail,' according to an article at LinuxDevices. The dual-licensed technology is claimed to enable more or less normal Linux applications to run — without requiring recompilation — under Windows, Mac, or Linux, with a look and feel native to each. 'As with Java, Lina users will first install a VM specific to their platform, after which they can run binaries compiled not for their particular OS, but for the VM, which aims to hide OS-specific characteristics from the application. Lina comprises a platform-specific application that virtualizes the host PC's x86 processor... A lightly modified Linux kernel (2.6.19, for now) runs on top of the VM. Under the Linux kernel is a filesystem with standard Linux libraries modified to map resources such as library, filesystem, and system calls to analogous resources on the host platform.' Further details, including an entertaining video or two are at OpenLina.com"

31 of 482 comments (clear)

  1. Lofty Goals Indeed by WrongSizeGlass · · Score: 5, Insightful
    FTA

    "We're trying to change the economics of the software industry. Our hope is that in the next two years, all these companies that are starting with Microsoft APIs will start with Linux instead." That is a key mindset to getting Linux out of its niche and into the mainstream. Thinking Linux first can't be a bad thing at all.

    I hope this lives up to its hype (and promise). I may have to finally break down and get an Macintel (much to the chagrin of my PPC army).
  2. Re:Huh? by eldavojohn · · Score: 5, Insightful

    Why are people afraid of recompiling? It is pretty painless if the source is packaged well.
    If you can get my mom to understand that sentence, I will pay you $500.

    Also in how far is this groundbreaking? Seems to be a pretty forward and not too complicated engineering task.
    Interestingly enough, the word 'groundbreaking' was not used even once in the summary or the article. News doesn't have to be groundbreaking. It could be a very simple old idea used in an ingenious way to be a very useful tool for the masses. Like this, they aren't hiding that they're kind of copying what Java does. But, you know, if it was such an easy engineering task, why haven't you done it? I'm very interested in where this goes.
    --
    My work here is dung.
  3. Humor by Anonymous Coward · · Score: 5, Funny
    From the LINA FAQ:

    Q: What does LINA stand for?
    A: LINA is not an acronym.

    1. Re:Humor by maxwell+demon · · Score: 4, Funny

      I've heared they renamed MIT. It's now named "MIT Institute of Technology"

      --
      The Tao of math: The numbers you can count are not the real numbers.
  4. From the FAQ by ozric99 · · Score: 4, Funny
    Q: What programming languages is LINA written in?
    A: For performance reasons, we've written LINA in C and C++.

    Why not just write the VM in Java, then it'll be truly portable, right? Right..?

  5. Re:Huh? by CdBee · · Score: 4, Insightful

    "download: install: run".

    That's what we do! It isn't 1979 anymore and having to compile source code isn't something the average user should ever be expected to do....

    --
    I have been a user for about 10 years. This ends Feb 2014. The site's been ruined. I'm off. Dice, FU
  6. Re:Huh? by FishWithAHammer · · Score: 5, Insightful

    "Dear user: Insert the CD. Type make all; make install. Press return and go for coffee."

    It should be

    "Dear user: Insert the CD. Click 'Install'. Click 'OK' and go for coffee."

    See the difference from a user's point of view?

    --
    "You can either have software quality or you can have pointer arithmetic, but you cannot have both at the same time."
  7. Native Look and Feel by zmotula · · Score: 5, Insightful

    run (...) under Windows, Mac, or Linux, with a look and feel native to each
    People should realize that this is impossible to do. This sounds like look&feel was something like a skin you can change at will, but it is not. Different systems have different requirements that cannot be changed programmatically, like keyboard shortcuts, icons, file placement, GUI metaphors and so on. If you want an application to feel native, simply design the GUI according to local customs, there is no other way.
    1. Re:Native Look and Feel by suv4x4 · · Score: 4, Insightful

      People should realize that this is impossible to do. This sounds like look&feel was something like a skin you can change at will, but it is not. Different systems have different requirements that cannot be changed programmatically, like keyboard shortcuts, icons, file placement, GUI metaphors and so on. If you want an application to feel native, simply design the GUI according to local customs, there is no other way.

      That's one thing (and you're totally right). And second:

      As with Java, Lina users will first install a VM specific to their platform, after which they can run binaries compiled not for their particular OS, but for the VM, which aims to hide OS-specific characteristics from the application.

      Which left me thinking... "and unlike Java.. it does what?".

      We've got Java, which has matured over the years, we've got .NET / Mono. And we got Cygwin, which allows you to use the Linux API on Windows.

      Looks like that startup has agenda to brings more of the Linux API to Windows, and thus help Linux become more mainstream as a development platform. But agenda does not business or money make. They've entered a crowded market, offering little new except impossible promises for native look and feel.

    2. Re:Native Look and Feel by Mike+McTernan · · Score: 4, Informative

      Trick maybe the wrong word - changing the L&F is by design with code such as:

      try
      {
          UIManager.setLookAndFeel(UIManager.getSystemLookAn dFeelClassName());
      }
      catch (UnsupportedLookAndFeelException ex) {}

      While not perfect, it is pretty good. There are screen shots and some of the deficiencies laid out here: http://today.java.net/pub/a/today/2003/12/08/swing .html

      --
      -- Mike
  8. Oh How I Wish It Were That Easy by Anonymous Coward · · Score: 5, Insightful

    "Dear user: Insert the CD. Type make all; make install. Press return and go for coffee."
    Your attempt at simplifying building from scratch amuses me. First off, you put the period in your instruction type font which I'm sure my tech inept mother would type into the console. Which would result in:

    make: *** No rule to make target `install.'. Stop.
    And how would she know to open a terminal? Would she know how to open a terminal?

    Second, what about dependencies, how does she know to read the README file or anything else to figure out what she needs to build this source. You don't exactly include all the source of all the libraries you coded with, do you? Rarely have I seen a project coded from scratch with no dependencies.

    See, the issue here isn't that she can't be instructed like a monkey to hit a button. The problem here is that if something goes wrong, she's out of luck. I mean, as it is, the concept of double clicking what you downloaded to install it was a tough one to drive home. And even now I worry about her willfully installing viruses or malware on the home computer. Because she just doesn't understand the concept so well. When you ask someone to build from the source, you're pushing them quickly into something they don't understand and it's just going to result in a bad experience. The ease of use for software is actually more important to most people than its efficiency or anything else. Why do you think Java is so popular?
    1. Re:Oh How I Wish It Were That Easy by dbcad7 · · Score: 4, Insightful
      Ok, what I gotta point out for you and whoever first brought up their mom in the whole compiling issue in the first place...

      If your mom is technically savvy enough to have created an application that is now to be compiled from source to different platforms then she obviously understands the original sentence.. and the typo... Unless she is a programming savant who creates source code not knowing what it is.

      Again.. the original poster was talking about a (developer of an app) (compiling binaries from source) (for different platforms), not an end user or your mom.

      --
      waiting for ad.doubleclick.net
  9. Re:Huh? by hey! · · Score: 5, Informative

    Well, recompiling an application doesn't port it to a different OS.

    The work needed to abstract the fact that you are running on Windows or MacOS instead of Linux is highly repetitive, and therefore a good target for factoring out into some common -- thing.

    The most accepted way for this is to develop a framework with WxWidgets. But what if you don't like the framework? What if you need a different framework? What if your language is not supported by the framework? Integrating a VM to the underlying OS is an alternative.

    Another thing that I think is useful in this approach is potentially dealing with coupling of unrelated applications via common library dependencies. If one application requires a later version of a library than another is compatible with, you can't run them both easily on the same machine. Anybody who used non-Ubuntu repositories on Ubuntu has run into this.

    --
    Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
  10. Dual licensed - wtf?! by prestwich · · Score: 4, Insightful

    From their FAQ:

          'A: LINA is dual licensed. For non-commercial users, LINA is available under the GNU General Public License, Version 2.
                  If you wish to use it commercially, please contact us to find out more about the LINA commercial license.'

    Erm I'm sorry?! You can't stop someone using a GPL licensed program for commercial use.
    Do they mean to say that if you want to sell it or do none-free changes then they will sell
    you a non-GPL license?

    1. Re:Dual licensed - wtf?! by 3seas · · Score: 4, Interesting

      There are several development tools that have such a license. That if you are developing GPL software then the GPL license applies, but if you are developing comercial closed source then you pay.

      Though this is a Virtual Machine, not the software that runs on it, you typically have to have some sort of clearance or approval to install and run such software in a large company. And having a paper trail of purchase or licensing fits the traditional business model. So yeah, if they actually produce, it makes since, however...

      How long will it be before someone gets the idea to simply put it all on a memory stick and/or live CD/DVD such that they can take it with them, yet run it on top of other running OS's, that would then allow the best of both worlds (let the best app win regardless of OS)....

      BTW, a windows version of D-BUS is being developed and in a case like this, it can be what integrates the two system applications. And that is what will make it really useful.

      Imagine taking your personal tool box to work that you keep and which adds to your value to the company.

  11. Re:Huh? by LiquidCoooled · · Score: 5, Insightful

    Insert CD.
    Phone relative because the CD does nothing.
    Find Install and click it.
    Cancel the dialog and click the other install.
    Phone relative again and ask them why its going to take 3 hours.
    Make coffee.
    Return to computer and switch it off (thinking they were switching it on because the screen was blank)
    Ring relative and ask why its not worked.

    --
    liqbase :: faster than paper
  12. Just what we need...another VM.. by Anonymous Coward · · Score: 4, Insightful

    Imagine a world where everyone wrote software for virtual machines - the problem occurs when people write software for different virtual machines. Eg: if Pidgin was written in Java, Firefox in Mono and GNOME in Python, to run my ordinary desktop I would suffer the overhead of 2VMs and an interpreter.

    Besides, its not hard to write cross-platform C++ code.

  13. Re:This won't be useful for a MAJOR market segment by tuxic · · Score: 4, Insightful

    Please :)
    Are PC games crucial in every situation? I think it's naive to believe that there can't be a success for a technology just because it means it doesn't apply for demanding 3D games. I'm sure they can live without PC gamers and focus on the multi-billion dollar companies who want their applications to work seamless no matter the operating system.

    --
    "People are stupid. Persons are smart" -- Agent K, MiB.
  14. Re:Huh? by Wdomburg · · Score: 5, Insightful
    "Dear user: Insert the CD. Type make all; make install. Press return and go for coffee."

    And come back to:

    make: *** No rule to make target `all'. Stop.
    And that's assuming the user knew enough to open a terminal and navigated to the appropriate directory, which you left out. Let's say after they got that error they look at INSTALL and discover your instructions forgot to include 'configure', and now they get:

    configure: error: Enchant library not found or too old. Use --disable-spell to build without spell plugin.
    Let's say they go ahead and disable spell-checking, even though it would be a useful feature. They type 'make install' again, like the instructions said, and get:

    cp: cannot create regular file `/usr/local/bin/foo': Permission denied
    Maybe they're not quite frustrated enough to give up just yet, and they do a google search and discover that you forgot to tell them to run as root. Hurrah! It installed! They type the application name and get

    cannot open display 0:0
    Whoops, still root. Maybe they realize this (smart user!), exit, and try running again as themselves. Oh, damn, the application installed in /usr/local and there's an old copy in /usr, so they end up launching the old copy instead. Even if that wasn't the case, most users are going to want menu entries and icons without having to set them up manually.
  15. Re:Huh? by sortius_nod · · Score: 4, Insightful

    This is exactly why linux users get a bad wrap... wake up, seriously, if everyone was a tech guru you wouldn't have a job...

  16. For the love of God, why? by Noiser · · Score: 5, Insightful

    I can understand the hack value, but why, for the love of God, would i want to run binary Linux apps on Windows? Didn't they have anything better to waste four years on?

    There are some binary Windows apps, which could make life easier (albeit somewhat unethical in FSF terms) for Linux users, such as MS Office and IE6, and AFAIK that's what WINE is for (although i've never had the dire need to actually try it). But vice versa??

    All the FOSS Linux apps that are source portable - OpenOffice, Perl, Mozilla, SVN, Audacity etc. - already found their success on the Windows platform. Is someone weird enough to make an application which is binary-only *and* Linux-only?

    Or am i missing something?

  17. Re:Huh? by FishWithAHammer · · Score: 4, Informative

    I'll say it very simply.

    Do not force end-users to the command line.

    --
    "You can either have software quality or you can have pointer arithmetic, but you cannot have both at the same time."
  18. Write Once, Run Nowhere seen in market again by Antique+Geekmeister · · Score: 4, Insightful

    I'm sorry, but the number of times I've seen the "Write Once, Run Anywhere" claim made for new "paradigms" is fairly scary. There are limitiations to all of these approaches. In this case, running software in complete OS emulation mode denies access to hardware features that have not been successfully ported to the virtual environment, enforces limits of the particular underlying VM hosting operating system in fascinating ways, and absolutely punishes the performance of any disk-accessing operations.

    There are uses for virtualized environments, but they're hardly a new approach to code portability.

  19. Don't forget wxPython! by kollivier · · Score: 4, Interesting

    You can also use wxPython (http://www.wxpython.org), which seems to start a lot faster than LINA (look how many times the LINA app bounces in the dock before it starts), actually *comes with* Mac OS X Tiger, uses native OS controls whenever possible and as of 2.8.3 has a library called SizedControls which automatically applies OS HIG-compliant sizing and borders to your windows and controls on Windows, GTK/GNOME, and Mac (disclaimer: I'm the author of said library). Plus, unlike Qt and LINA, wxPython/wxWidgets is free for commercial development as well as open source.

    So I've been using this 'holy grail' for years, but maybe the VM slowdown and commercial licensing will appeal to some people. :-)

  20. Re:Huh? by AusIV · · Score: 4, Interesting

    I'll say it very simply.

    Do not force end-users to the command line.

    This mentality bothers me. While the command line is intimidating at first, and end-users should never have to learn how to navigate the command line, if I'm giving instructions, I would much rather have someone using a command line.

    For example, a few months back, my girlfriend wanted me to put Linux on her computer. She was saving up for a Mac, and her anti-virus had expired on Windows. She needed a web browser, office suite (She used OpenOffice on windows to begin with), and an instant messenger. I had her install Kubuntu, answering a few questions when she had them. Once it was installed, I pulled up a terminal to start installing some programs and codecs with apt. She was deathly afraid of learning the terminal, so I started stepping her through the installation with Adept Installer. The instructions for installing Flash went something like this:

    - Click the "K"
    - Click add/remove programs
    - Type your password
    - Check the box next to "unsupported"
    - Check the box next to "Proprietary software"
    - See where it says "KDE"? Click the down arrow and select "Any Suite"
    - Type "flash" in the search box
    - It's not in multimedia? Try "Others" I guess.
    - Check the box next to "Macromedia Flash Plugin"
    - Click "Apply Changes"
    - When it's done, click "quit"

    Alternatively, I could have told her:
    - Click the 'K'
    - Hover your mouse over 'System'
    - Click 'Terminal Program (Konsole)'
    - Can you remember that? Next time I may just say "Open a Terminal"
    - Type "sudo aptitude install flashplugin-nonfree"
    - Type your password

    I explained to her that I didn't expect her to learn how to use the command line on her own, but it's a lot easier for me to tell her a command when I'm giving instructions. She hasn't used the terminal once on her own, and she's enjoyed perusing the programs available through Adept Installer, but she knows if I have to give her an instruction, it will be a lot easier to use the command line.

    I realize it's initially intimidating for users to have to open a terminal, and I'd like to see graphical interfaces for everything a normal user would need to do, but I also wish we could get the average user to where they realized the set of instructions is a lot shorter when someone gives you a command than when they have to explain dozens of clicks.

  21. Re:Huh? by Tickletaint · · Score: 5, Insightful

    Telling people how to fix problems fosters dependency on you. Showing them how to do it, in a manner that doesn't take years of command-line dorkdom to understand, is probably far more helpful.

    Though in this particular case, if your girlfriend's about to get a Mac anyway, maybe it doesn't matter so much. I'd be more worried about getting dumped once she realizes she doesn't need you to fix her computer anymore. :)

    --
    Make Slashdot readable! See journal.
  22. Re:Huh? by the_mushroom_king · · Score: 5, Funny
    This is slashdot. You lost me at "girlfriend".

    WTF is that?

  23. Re:Huh? by morcego · · Score: 4, Insightful

    Lemme tell you a small story here.

    When MS released Windows 3 was when it started to become known in Brasil. At the time, there was a TV show called "Confissões de Adolecente" (no need to translate, since the name is not relevant). At the time, there was an episode where the main character was bitching an complaining about having to use a mouse and click on stuff. After all, if he wanted something, all he had to do before was to type the command. Now, he had to search for the icon, click on it, than click on something else etc.

    So, to translate your comment into something that really means something (and is actually true), what you mean is:

    "Do not force end-users to do something different"

    Here is Brazil we have a saying for cases like this, which roughly translates as: "If you change the color of the grass, the mule will starve to death"

    --
    morcego
  24. Re:why Windows has a 'run' command by shmlco · · Score: 4, Funny

    Actually, knowing how to spell hinders typing Linux commands...

    --
    Any sect, cult, or religion will legislate its creed into law if it acquires the political power to do so.
  25. Re:Huh? by TheWanderingHermit · · Score: 4, Insightful

    I would much rather have someone using a command line

    And therein lies the problem. You would rather have them using a command line. They don't want to. When you have a GUI, you always have prompts and a safety net. You can say, "Click on the button that says 'Change Setting.'" They have an automatic double check because there is something that matches, exactly, what they're being told to do. They have limited choices because they're working from a menu or from components and when one matches what they're told to do, they have some kind of confirmation they're pressing the right button. When you say, "Now type this," then you can hit any number of snags and they know it. You can tell them what to do and they can use a single quote instead of a double one or hear the word wrong or mistype it and, from their point of view, they don't know what's going to happen if they make a mistake.

    You are much wiser than most developers I've seen post here who want to blame the uses for not knowing everything they know and you've got a good point. You and I can often move much more quickly with a console, but for users, the mere thought of having to type commands is frightening. They're looking at a blank screen with no feedback until they hit and then it could be too late.

    You've realized, though, that it isn't about what you or I want, but what the user can handle or take care of on their own. That's the problem: It's our job to give them what they can handle. That is rarely a console. With my clients, before I got my software up to the point I wanted it, I had them install RealVNC on their computer and used a tunneling program I wrote in Java so it would go through their firewalls, then had them add me, and I configured RealVNC so it would only run when they wanted to run it and so it had a strong password. (And before anyone starts screaming, I'm simplifying and leaving out discussions with their bosses and IT departments about safety.) When they had problems, I just had them run RealVNC and add me, then I could fix, in less than 5 minutes, what could take 45 minutes or more if I were telling them what to do. When I finally got my own program to where I wanted it to be, that wasn't an issue anymore since I had enough failsafes they didn't need that kind of help anymore.

  26. Re:Huh? by toddestan · · Score: 4, Insightful

    Ah, you've used Windows, I see. Installing things is much easier on pretty much every other platform (including macosx, most of the linux-based platforms, and most of the BSDs).

    What are you talking about? One of the big problems in the Windows world right now is that applications are so easy to install, that the user often has to run special software just to keep applications them from installing all by themselves!