
Run any Linux application natively on Windows (Vista and 7) without Cygwin - niktech
http://www.informationweek.com/news/showArticle.jhtml?articleID=192503618
======
trotsky
_Run any Linux application natively on Windows_

Sure except for anything that uses dbus, X, pam, framebuffer, sound, usb,
/proc, CUPS etc. etc.

POSIX is a useful standard but it's a porting tool not a no effort port.
Services for Unix Applications (SUA) will reduce the time it takes to get
something up and running but only the most generic of applications will
compile out of the box.

------
tzs
At work we developed a tool once to run Linux programs on Windows, but it took
a different approach. Basically it was an application that you could point at
a Linux binary. It would allocate memory in the application's space, load the
Linux binary in that, and start running it. It would trap attempts by the
Linux application to do system calls and service them.

This was in the early 2000s. Using it, I was able to take most of the RPMs
from whatever desktop version of Red Hat was current then and load them onto a
Windows system, and most of them worked (assuming I had a Windows X server
available). Bash, vim, and most of the usual command line tools worked, as did
things like GIMP, major GUI email and web clients, and the like.

We tried a couple approaches to dealing with case sensitive vs case
insensitive file systems. One was to just ignore it--that actually turned out
to work quite well. In a normal Red Had desktop install, I think I only ran
into one thing that had trouble and it was easy to work around (the two
conflicting files turned out to have the same contents, and were read-only).

I don't remember how fork was implemented.

We looked at making this into a product, but we never found a good niche for
it. Then, reviewing code that we got from some contractors we had outsources
to for some of the implementation, I found that they had copied some from the
Linux kernel (they were supposed to just use it for a reference if they needed
to figure out what something did). Since other parts of it were written under
the assumption that it would NOT be a GPLed product, and had used commercial
code not compatible with GPL, that pretty much killed the chance we'd ever
revive the thing.

~~~
doublec
Sounds similar to 'Line'. From the wayback machine (current website seems to
be gone):

[http://web.archive.org/web/20021125163113/http://line.source...](http://web.archive.org/web/20021125163113/http://line.sourceforge.net/)

Sourceforge project still exists: <http://sourceforge.net/projects/line/>

------
blinkingled
Article is from 2006. SFU was officially dropped by Microsoft circa 2009. Last
version I could find doesn't even list Vista/7 as supported OSes. WTH?

~~~
zokier
It's mentioned in the article: "Microsoft is transitioning the product line
again, integrating it directly into Windows, with the Posix component being
renamed to Subsystem for Unix Applications (SUA)."

It's included in Windows 7 Ultimate and Enterprise editions, you can enable it
from "Windows Features" dialog.

------
rbanffy
"Want to run best-of-breed apps under both Windows and Unix?" should be more
like "want to run best-of-breed apps under a not so best-of-breed OS?"

Now, more seriously, faced with unsupported hardware I have to use, I think I
would prefer to run a Linux virtual machine inside the Windows server and take
time to get ready for the day when the server hardware is well supported and
then migrate the VM to the bare hardware. It will take a performance hit, of
course, but only a temporary one.

And, after that, it would look like a new hardware upgrade.

And, also, I bet it would be much less work.

------
hippich
One page -
[http://www.informationweek.com/shared/printableArticle.jhtml...](http://www.informationweek.com/shared/printableArticle.jhtml?articleID=192503618)

------
nitrogen
Quite a misleading headline: SFU/SUA doesn't allow one to run native Linux
binaries on Windows, which would require emulating Linux's syscall interface,
libc, dynamic linker, etc. It allows one to port (i.e. recompile) POSIX-
compliant applications. Linux (as the term is popularly used) is a
significantly-larger superset of the interfaces and utilities specified by
POSIX.

------
spcmnspff
From what I read, you can get Debian and Gentoo system running with this.

<http://www.gentoo-wiki.info/HOWTO_Gentoo_on_WINDOWS>

<http://www.debian-interix.net/>

Would love to try get Gentoo but MSDNAA offers Professional rather than
Ultimate.

------
roadnottaken
How is this different from Cygwin? Cygwin's software repositories are free so
it seems superior, at least in that respect. Everything else the article
describes sounds exactly like Cygwin.

~~~
niktech
This approach is higher performance, officially supported by Microsoft and
comes with all Ultimate Vista/7 installations. Cygwin runs as a user-mode app
that emulates the POSIX environment using the underlying Windows APIs. SUA is
an integrated subsystem that is on the same level in the kernel stack as the
Windows subsystem (that's being used by every Windows app out there). By being
so close to the kernel, SUA is able to use undocumented APIs within the kernel
to achieve greater performance than Cygwin.

~~~
daeken
As far as I'm aware, Interix (SUA) uses _no_ undocumented interfaces. The
kernel subsystem interfaces are actually quite nicely documented; I was
working on a Darwin subsystem for a while, using SUA as a nice reference
("along with Windows Internals"), and it's really quite nice.

