logoalt Hacker News

XNU Linux: Full OS X GUI Userspace on Linux

361 points • by mmastrac • today at 3:49 AM • 169 comments • view on HN

Comments

gen2brain • today at 8:06 AM

Nice, I like this, though, it still needs Apple hardware. I think I would prefer if someone was to improve GNUstep instead. I always knew that in theory it implements the same APIs, etc. but, in my IUP fork, I managed to have the same Cocoa driver/backend compile for macOS and for the GNUstep on Linux/BSD. The driver is a little polluted with ifdefs for APIs that are not implemented though, and needs some patches, but I think it was still worth it.

With the nice modern theme like Rik, you can have global menu like in macOS, and it looks much nicer than default theme. Improve theme, improve GNUstep and there you have it. You can check the GNUstep sample screenshot at https://github.com/gen2brain/iup-go .

➕ show 2 replies
miki123211 • today at 9:01 AM

MacOS, like Windows and unlike Linux, doesn't have a stable syscall interface. apps are instead required to dynamically link with libraries shipped with your system, which change in lockstep with the syscalls.

This would make it possible to run the MacOS userspace on top of actual Linux, with little to no work in the kernel.

I think that would be a more interesting effort to pursue.

➕ show 3 replies
pcwalton • today at 5:14 AM

Makes me wonder if the next frontier is going to be something like “the OS is shipped encrypted with keys that only exist in hardware, and all the CPU knows how to do is to decrypt blocks and put them in the i-cache where it will not let you look at them”, to prevent you from doing anything with the OS executables other than running them on Apple chips.

➕ show 6 replies
darksim905 • today at 5:37 AM

This is pretty cool that this could be done. the whole xnu.so drive file bit (I think?) ... could that same theory be applied to Windows? I know NTOSKRNL isn't quite the same, but could it be redesigned/recompiled/re-written to function and loaded as a module that way? I feel like on the newer Macs when I tried doing whatever the bootcamp functionality was, I learned quickly that didn't exist/was removed and I couldn't just boot/install Windows easily. With this AI tooling now, and functionality like this, could you bring that back on a Mac?

(And yes, derp, I realize this is Mac OS X GUI on Linux)

➕ show 5 replies
angerman • today at 9:57 AM

This is amazing! I have something slightly similar, which was a lot of fun to build: https://hyper-linux.app (https://www.youtube.com/watch?v=EkP45l9COOY might explain it a bit better).

gorbypark • today at 9:07 AM

Off topic but I've always wondered why Apple ships XNU/Darwin as open source. As far as I know, there's no real usage of it outside of the "hobby" space and I don't think the license requires it to be open source. Any ideas as to why Apple continues to do it to this day?

➕ show 2 replies
opengears • today at 7:54 AM

These projects are already dissapearing again, see "Stela has been completely removed from GitHub" https://www.reddit.com/r/hackintosh/comments/1y322ns/stela_h...

zakisaad • today at 5:05 AM

If you presented this to me 4-5 years ago (and the method by which it was likely built), I would have been speechless. The fact that these kinds of projects have been normalised is frankly insane.

Nowadays with a skilled operator, there really are no bounds on what can be pulled off it seems.

➕ show 1 reply
mgaunard • today at 9:04 AM

Do people actually like the macOS userspace?

➕ show 4 replies
ajasmin • today at 7:03 AM

I wonder how this would compare to making XNU work in KVM.

This is amazing! Though, from a user perspective it currently feels a lot like a VM. Delegating one task per core plus one big file-backed disk for the XNU kernel to run with.

Though there may be efficiency or integration benefits that I'm missing.

jsomedon • today at 4:49 AM

so this means, I can run something like asahi linux on macbook but I can also access macos desktop environment semi-natively?

➕ show 2 replies
boredatoms • today at 5:47 AM

Oh I hope someone tries this on a dgx spark

➕ show 2 replies
bradfitz • today at 5:33 AM

But can I run more than two macOS guest VMs at the same time? :)

➕ show 1 reply
harrouet • today at 7:37 AM

This is actually something I would expect Apple to support natively, at least in XCode:

- let the AI spawn a MacOS/iOS VM

- load your app code in there for automated tests

➕ show 1 reply
aa-jv • today at 10:02 AM

Holy molies, does this mean I will be able to run my (self-developed) Mac apps on my Pinebook Pro?

The future is amazing, I'm so happy to be here.

hn_submit • today at 5:30 AM

Has anyone run XCode on this and built iOS apps with it? I just purchased a Macbook Air just so I could make iPhone apps, but with this distro I could've saved myself the $1500.

➕ show 3 replies
bni • today at 8:33 AM

Didn't someone do this with Windows back in the day?

➕ show 1 reply
pmkary • today at 5:48 AM

This is beyond irony and mind blowing, I'm literally shocked and speachless. But you know the funniest thing is that XNU itself is designed to emulate Open BSD on a Mach kernel :))) this is Incepetion taken too deeply...

xp84 • today at 7:42 AM

Run a Mac... inside Linux... inside a Mac. Well done, guys. I'm going to try to run a Linux VM inside the inner Mac.

qalmakka • today at 7:55 AM

Next step is, find a way to run multiple XNU containers and finally allow people to run more than two images without filling a warehouse with idle Mac Minis :)

pluto_modadic • today at 6:41 AM

so I can run X GUI inside my Asahi on my macbook air?

nice.

probablyStimmed • today at 4:45 AM

Cool, but why?

➕ show 4 replies
johng • today at 4:31 AM

This is awesome.

jauntywundrkind • today at 5:13 AM

also NextBSD is back! https://www.nextbsd.org/ https://hn.algolia.com/?q=nextbsd

a freebsd built around mach, launchd, and xpc maybe still gcd. afaik not xnu though (i should look).

WesolyKubeczek • today at 7:56 AM

Isn’t this like Mac on Linux back in the PowerPC days (but it would boot MacOS Classic)? Or coLinux, but the other way around.

natas • today at 4:41 AM

I'm afraid that, unfortunately, Apple may not like this.

➕ show 2 replies
cheesecakegood • today at 9:31 AM

Yet another major project with an AI-written readme. Bad look

staplehorse6553 • today at 10:14 AM

[dead]

Nezk • today at 4:51 AM

Very cool, but I really wish it were OS X 10.9 instead of the hideous macOS 27 (for x86_64, of course, not ARM)

➕ show 2 replies
chao86825 • today at 9:47 AM

[dead]

MichaelTestGrid • today at 8:35 AM

[flagged]

ravivarmat • today at 9:14 AM

[flagged]

speakspokespok • today at 6:31 AM

[dead]

zergrush • today at 9:22 AM

[dead]