Live data from Hacker News

Foreign Linux: Run Linux binaries on Windows without drivers or modification

github.com

141–149 of 149 posts

Re: Foreign Linux: Run Linux binaries on Windows without drivers or modification

#142
post #30

This looks like an interesting project to keep an eye out for. On the topic of cygwin, I would also like to recommend mobaXterm, that I use instead of cygwin nowadays... It is an interesting choice in the alternatives we have. So, those of you that use cygwin, take a look at it here: http://mobaxterm.mobatek.net/ If you are thinking about trying cygwin, I would recommend this instead, as the installation is relativel…

MobaXterm is sweet... If nothing else it's a game changer for putty users.

Yeah the ecosystem is kinda small for whatever reason. I tried setting up cyg-apt for it, and it almost worked. I guess if they made the regular cygwin package manager work rather than dropping a bunch of binaries into the same directory as the mobaxterm binary that would be a good start, but then maybe that would conflict with their business model.

Re: Foreign Linux: Run Linux binaries on Windows without drivers or modification

#143

This has been tried before as the author notes. E.g. http://lbw.sourceforge.net/ Previous experiments have stumbled on Linux usage of %gs and other segmentation issues. The present project is possibly trying to overcome those obstacles with dynamic recompilation. It's in very early stages though.

Hey, I resemble that project!

Yeah, it ground to a halt due to fundamental differences in the way Linux and Windows binaries work. I'm actually now kind of scared at how much working hackery LBW ended up containing: it'd dynamically patch the binary after trapping out at instructions manipulating things that Windows wouldn't allow access to.

(The LBW instruction patching code is here. It's entertainingly bonkers. http://sourceforge.net/p/lbw/code/ci/master/tree/src/ehandle...)

Not all the horror was Windows, mind: Linux's interface to executables is barely documented and extremely fragile, involving passing a key-value table full of magic parameters on the stack after the argument and environment tables. And, of course, I'd have to replicate this otherwise glibc would crash out. (At least, I thought I did --- I cannot now find any of the actual code. Maybe I got rid of it?)

I eventually gave up because it was obviously not a tenable approach. Plus, it'd completely fail on 64-bit platforms. Dynamic recompilation is obviously a way more preferable approach. If I ever have to use Windows again, god forbid, I'm definitely checking this out.

Re: Foreign Linux: Run Linux binaries on Windows without drivers or modification

#144
post #10

Cygwin is impressively complete - if you haven't checked in on it recently, there are over 5000 packages in the official repo (that's more than Arch Linux's official repos), and adding the http://cygwinports.org/ repo gives you full KDE, GNOME 3 and Xfce on windows (although KDE has a first-party port). What this tool offers over Cygwin is the ability to run unmodified linux binary-only software for which you do not…

I've used Cygwin a lot in the past; it's great provided you don't have to stray outside the Cygwin world. If you need to interact with standard Windows executables it gets very hairy. In order to maintain Unix-ish semantics, it needs to do some rather odd things --- IIRC stderr is passed via a Windows named pipe rather than via the Windows file descriptor 2?

And heaven help you if you need to run a Cygwin binary on a system with a different version of Cygwin installed on it...

We found ourselves switching to MSYS whereever possible simply because it was less clever, and therefore more predictable.

(Also the Cygwin package manager makes me sad.)

Re: Foreign Linux: Run Linux binaries on Windows without drivers or modification

#145
post #65
post #6

This is brilliant! Much more light weight than a VM. I hope they can iron out the remaining kinks. I used coLinux many moons ago, but it hasn't been updated in any significant way lately, and still doesn't work on 64-bit Windows.

It's a shame - it looks like the work was started, it probably isn't too much work to fix the 64 bit stuff ??

I think it's in part because 64-bit requires driver signing, and there are no funds for signing the coLinux64 driver.

Re: Foreign Linux: Run Linux binaries on Windows without drivers or modification

#146
post #92
post #52

Earlier quoted context omitted.

For me, Cygwin makes Windows bearable. It's still Windows, but, at least, it has a proper shell, interpreters, compilers, compressors (no need for WinZip or WinRAR - think about it!) and so on. For the same reason you need MacPorts or Brew on a Mac, you need Cygwin on Windows. Unless you are happy to spend your day in Visual Studio, in which case Cygwin will not be that useful.

Windows has had a proper shell for a while now, in the form of PowerShell. It's quite different from the standard Unix shell, and I'm nowhere near as productive in it as I am in Bash, but that's more a function of lack of familiarity than any weaknesses of the shell. In fact, I'd say that it's actually much nicer than unix-y shells for a wide variety of tasks. All I really find missing these days is good line-editing…

> It's quite different from the standard Unix shell

And that's the issue. Most people don't want to relearn everything, and I don't see why MS had to reinvent the wheel.

Re: Foreign Linux: Run Linux binaries on Windows without drivers or modification

#147
post #52

Earlier quoted context omitted.

For me, Cygwin makes Windows bearable. It's still Windows, but, at least, it has a proper shell, interpreters, compilers, compressors (no need for WinZip or WinRAR - think about it!) and so on. For the same reason you need MacPorts or Brew on a Mac, you need Cygwin on Windows. Unless you are happy to spend your day in Visual Studio, in which case Cygwin will not be that useful.

cygwin is fine, but if you want to spend most of your time in bash or using software designed for Unix you probably shouldn't be using Windows in the first place.

A lot of people are stuck at jobs where they need Windows for some reason or another (maybe simply because their boss says so). In those cases, Cygwin makes their life bearable.

Re: Foreign Linux: Run Linux binaries on Windows without drivers or modification

#148
post #66
post #44

Personally I have been using Scoop with ConEmu. I find that is enough for most things :) http://scoop.sh/ http://www.fosshub.com/ConEmu.html

Is Scoop better than Chocolatey? I like chocolatey, but things dont install semi-regularly.

I prefer it over Chocolately, however Scoop is mainly aimed at developer tools on the command line. Scoop is more a replacement for Cygwin.

Disclaimer: I'm a Scoop contributor.

Post reply on HN