Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Darling – Run macOS software on Linux (darlinghq.org)
316 points by peter_d_sherman on March 27, 2020 | hide | past | favorite | 128 comments



Unrelated comment, but am i the only one who gets annoyed by the "does it runs safari?" or "does it runs adobe?" questions? It seems a significant portion of "readers" can't or won't actually read, which is pretty ironic on a news site. I hate this.


Most people are here to have discussions, and not necessarily read news.


If this works with Adobe Creative Cloud, then moving to a Linux distro has suddenly become much more attractive.


The homepage notes that it can't run complex graphical software yet.

With that in mind, some recent versions of Adobe software like Photoshop have worked fine in Wine for a while now.


Can't you just use the Window version? Adobe CC works fine with Wine.


Does it have pen pressure support already? Last time I checked pen pressure only worked on CS2 and below on wine


If this works with Adobe Creative _Suite_, ie pre-subscription, then I’m sold.


this is a very very experimental piece of software, where they are happy to run some terminal apps.

So sorry, no


As far as raster graphics, Krita, GIMP, and Darktable can get you professional results without needing to resort to closed-source software.


I use DT almost exclusively for my photo editing since over a decade.

While it is absolutely true that you can do professional work with this you have a very steep learning curve, bad UX and feature overload.

The latter is really a core reason for the bad UX: developers love to add features. Every feature you add becomes another module or another slider.

Every slider or widget you add creates an extra dimension for the parameter vector an artist has to explore to get the result they want.

Less is more. This is contraintuitive for developers. As a developer I would say it is because of the warm, wholesome feeling that adding another feature gives you when you do. :)

Choosing what to leave out or how to combine stuff into fewer widgets is one of the hardest parts of software product development.

And this is the missing piece in so much OSS software.

Just for example, the Phase One (DT-like commercial app) HDR module (which just allows HDR compression of shadows & highlights) has two sliders that cover 95% of use cases.

DT has seven sliders & one dropdown in it's Shadows & Highlights module. Yes, they probably cover the other 5% but a what price?

That's why professional creative software still has an edge and that's why the prospect of being able to run macOS graphical software on Linux is very exciting to me.


But you can do so much in RAW alone. The retouch module alone takes it bounds above others. With the new basic adjustments, they've made many things more straightforward. You can show or hide any modules you don't want It's hard to guess what experience is 'best'. I prefer having extra knobs.


My impression is that Krita is for digital painting and not for photo editing, is that not the case?


This is correct. I would say there is still no PS alternative on Linux.

I use Natron a lot for retouching but few people will know about or consider this because it is aimed at film compositing.

But if one wanted to create something better than PS on Linux, looking at professional compositing apps (Nuke, Fusion, etc.) and their OSS clones like Natron would probably be a good starting point.


Digital painting is still raster graphics.


I just want to run Xcode on AWS. Even just the CLI tool xcodebuild would be fine!


Parts of the command line toolchain work already. Try it!


Wow is that true? A lot of people could save a shit ton of money for that CI and automatic tooling for macOS, iOS and so on


I'm discovering this too, and quite eager to try, being able to build iOS apps on Linux would be a big step forward for CI/CD.

I just found this documentation from Godot: https://docs.godotengine.org/en/stable/development/compiling...

Actually, there's an xcode example in the doc as well: https://wiki.darlinghq.org/what_to_try


Note that this appears to require installation of xcode, I recommend reading its license terms which require being run on apple hardware. Only very old versions of the SDK lack those license terms.


"Does it support GUI apps? Almost!". In what sense can this be considered to be "running MacOS software" then?


A lot of software doesn't have a GUI, even on macOS?


Apart from the Xcode toolchain, I cannot for the life of me think of a single macOS application that both has no GUI _and_ isn't already cross-platform or a Darwin/BSD version of a tool that already exists on Linux.

I'd actually like to know what non-Xcode command line apps you (or anyone else reading this!) is using that explicitly target macOS and nothing else - I've used Macs for only about five years and primarily for dev work, so maybe there's a treasure trove of cool stuff I'm missing.


I mostly had the same thought as you, but one thing I imagine some people might want is access to Apple's own command line tools, particularly those who prefer using Linux but need to work with Apple formats for some reason.

There's osascript for executing Applescript code, plutil for working with plists, and diskutil for making DMGs. Those are just off the top of my head, there's probably others too.


Hmmm - that's all fair! Though I'm not very sure why one would want to execute Applescript on Linux - scripts are typically either so platform-integrated that they're useless on non-Mac platforms or so generic that they're trivially replicated in languages like Python or Ruby.

I'd consider diskutil and plutil vaguely part of the "Xcode toolchain" (as in, using them (especially from outside macOS) is largely geared towards app development). That's certainly a huge use case for Darling - I actually think it would be interesting if they explicitly (but maybe not very loudly?) aimed for giving people access to iOS/macOS development without Mac hardware, rather than trying to be a general-purpose emulation layer.


I’d like to hear this too. I also can’t think of anything.


I've been using OS X since about 2002, if I'm remembering right -- I bought my first Mac in 2001, I'm pretty sure (one of the crazy "clamshell" iBooks with a PowerPC G3), and OS X was not really suitable as a daily driver until 10.2 "Jaguar" in August 2002.

I mention all this because even with that nearly 18 years of experience, I am really straining to think of a single non-GUI application for macOS that wasn't a Unix command line port. There are some Apple-provided system utility commands, and, fine, but probably of pretty marginal use in this context.

I think it's a great project, don't get me wrong, and I wish I had the system-programming chops to help. But it still seems to mostly be a proof of concept. I hope it keeps growing!


Most command line software have been ported to many operating systems or are trivial to port.


xcodebuild?


Nice.

Off topic, but does anyone know of any good IINA alternatives for Linux? I have not found anything that beats it in terms of polish.

VLC is nice, but IINA does one thing really well, and is based on MPV, with all of its powerful configuration options and nice keybinds.


I've never used IINA, but I'm wondering why you don't just use mpv on Linux? I've been using mpv for years and I've never had any issues with it.


IINA is much more than mpv. Sure, it uses mpv underneath, but the selling point of IINA is a well thought out UI with just enough features but not too many (totally subjective, of course)


> ...the selling point of IINA is a well thought out UI with just enough features but not too many

That's exactly how I would describe the default mpv UI :)


I do use both — I actually used MPV before discovering IINA — but I like the UI of the latter, even if I still use MPV keybinds.


mpv is fantastic and continues to improve.



There's none.

SMplayer is the one that I use on both Windows and Linux, though it's starting to show its age.


I've had good experiences using gnome-mpv, (now called Celluloid) it's minimalistic, but I really like it.

https://celluloid-player.github.io/


Looks pretty nice: I'll give it a try over the weekend.


One thing you can do is to look at the programs installed by default on Ubuntu Studio. It's a nice way of discovering Linux media apps without having to browse around on the web—most programs you would need are already installed, though limited a bit to save space on the .iso.


After learning of the existence of a bunch of compatibility layers, I'm now occasionally pining for a Linux→Mac one. Because dealing with BSD software, aka ‘unknown option --help’, is a source of irritation sometimes. Plus there's actually open-source Linux software that doesn't have open-source analogs on Mac (not that I'll remember right now what it was).

But then again, Linux has /proc and a boatload of common APIs beyond kernel calls.


First thing I do on my macs is installing gnu coreutils, sed, awk, etc. I'm happy for people who enjoy the "ideological UNIX purity" of BSD tools but I like to get work done and I don't think that comparing bloat between GNU tools and BSD tools is a conversation that you can meaningfully have on any recent compiter as a full hd wallpaper likely uses more RAM than both combined.



As someone who prefers BSD, I feel right at home on the macOS command line. Although it has slowly been moving towards Linux, e.g. macOS now defaults to bash for the shell.


`brew install coreutils` goes a long way to help with stuff like that.


The —help is not particularly useful when you have proper man pages.


It is often less verbose than a man page so can be seen entirely without a pager, which is often all you need when you are looking for a reminder of that periodically used option. Certainly having both options (man page and inline help) is better than having only one option.


If you can’t find what you need in the man page, because of the bloat, well, it’s the bloat that’s the problem, not the lack of —help.


Nak. Help output can be more concise because it does not have to explain what the command is used for, does not have to enumerate every option for a particular flag, does not need a "See Also" or "Examples" section, etc.


It's what the SYNOPSIS section is for, at the top of the man page, so you don't need to scroll down in the pager.

In a more general sense, though, this is why BSD systems generally try to avoid bloat in the core utilities. It's not about the code size - it never was - but rather the overhead on maintainers and users.


I'd love to know (of popular software) what works well, and what doesn't.

Is there such a list?


From the homepage:

> Does it support GUI apps?

> Almost! This took us a lot of time and effort, but we finally have basic experimental support for running simple graphical applications. It requires some special setup for now though, so do not expect it to work out of the box just yet. We're working on this; stay tuned!


And most importantly (to me), does Adobe Lightroom, Premiere and Photoshop run under this?

Frankly, those are about the last pieces of desktop software that prevent me to switch to Linux.


I'm able to do almost everything I need to with Darktable, Kdenlive, and GIMP.


this is a very very experimental piece of software, where they are happy to run some terminal apps.

So sorry, no


What job are you doing that you require these three software in addition to being most likely a sw developer ?


adobe has windows versions and there's wine.


Does this work with Safari? It would be very useful for cross browser testing.


No GUI apps (well, kinda). But you can run WebKit on Linux already, if that helps.


Could you elaborate on running WebKit on Linux? Is it the same engine that latest Safari release is using?


Safari mostly uses the open-source WebKit, except it of course sets all the Mac defines and Apple-specific feature flags, and there’s a bit of extra code sprinkled in internally. On Linux you can get something similar but not exactly the same by using one of the WebKit browsers, such as GNOME Web.


Thanks, just installed Epiphany and was able to reproduce issue with flexbox that only Safari had. Somehow I thought that Safari and WebKit browsers were using a bit different forks of WebKit. That proves me wrong.


They are; it just might not be different enough for your purposes.


Yes, Safari is built on Webkit. Check out the downloads page for Linux versions.

https://webkit.org


Check out Epiphany (Gnome Web).


I had hopes for Puredarwin :-( not an emulation layer. And I hoped Apple sponsored a community distribution


Why would Apple sponsor something like this?

PureDarwin isn't even Linux.



https://github.com/darlinghq/darling/issues/542

This seems like it's a big deal.


Do my eyes deceive me? O.o What trickery is this?!

If I can run iTerm2 on Linux… snap. Um, I would seriously consider switching entirely over to Linux.

My killer apps that make it hard for me to switch:

- iTerm2 (must-have)

- OmniGraffle (really nice, but not critical I guess)

- Little Snitch (I understand there are alternatives, but LS is so nice!)

- MoneyWell (budgeting—haven't found anything better)

If anyone has any experience running those apps under Linux, please let me know.


iTerm2 is is the main thing holding you back? Give tilix a try and you will forget all about iTerm2

https://gnunn1.github.io/tilix-web/

Then you can also enjoy:

- running containers natively without a clunky VM

- KVM virtualization - say goodbye to virtualbox

- middle-click paste - sounds odd but is really intuitive

- infinite desktop customization

- level up your linux skills - nothing does this faster than running linux as your daily driver

- no longer at the mercy of one company potentially removing x86 for ARM because it benefits them not you https://www.theverge.com/2020/3/27/21196611/arm-macbook-desk...


Both iTerm and Tilix are nice but once I tried Kitty I never looked back. Cross platform, too.

https://github.com/kovidgoyal/kitty


I'm really happy with alacritty https://github.com/alacritty/alacritty/, blazingly fast and if you're happy with living inside a terminal multiplexer it's really a good experience


I was using it before and I find it heavier than kitty. Now I am running kitty mainly because of wayland support and I did switch to wayland.


I found Kitty underwhelming. Used it for a while because iTerm was too slow/heavy/I used tmux anyway, but no global hotkey + terrible scrolling made me switch anyway.


Thanks for the kitty recommendation. I'm going to give it a try for a few days.


I'd add:

- being permitted to choose your own hardware. And even (heaven forfend) repair it.


Good call, can't believe I left that one out!


Thank you for the tilix suggestion! All I ever wanted was a terminal that will rewrite the shell output if you resize the terminal.

I hear things about kitty but it’s not an Ubuntu package so ️


It is for me. I've just tried it. As so often unfortunately the package is sufficiently out of date to make installation of the author's prebuilt binary (https://sw.kovidgoyal.net/kitty/binary.html) worthwhile.


Well then I could just go back to enlightenment’s terminal :)


I think you’re severely underestimating what iTerm can do.


Can you share some examples that are unique to iTerm2?


* The text research feature : it highlight what you search for and you can switch to a regexp. It works well with1G+ log data

* You can set a color for each tab, so you instantaneously target the good ones

* You have an history replay

* Picture integration. Useful to visualize data from sql query in my psql shell

* And some others I forgot.

I hope that more and more, there will be linux's native alternatives when I'll switch the day after the hypothetical death of my late 2011 macbook


I’ll let the website do the talking: https://iterm2.com/features.html. It’s not mentioned there, but iTerm’s has native tmux integration too: I barely know how to use it, but they show up as native tabs and windows that I can drag around and tile as I wish.


I'll give you iterm's tmux mode, seems tilix has an open issue for it but not implemented yet. https://github.com/gnunn1/tilix/issues/480

Everything else listed on iterm's site seem fairly trivial to do with tilix and other linux emulators in general.

In any event, lots of this stuff is better implemented in the shell itself (zsh and so on) much more portable that way.

Both iTerm2 and tilix are great on the desktop. Terminals are just a solved problem these days. Hell even Windows is catching up with their new terminal app (not to mention WSL(2)).


Getting LS to work in a Wine-like environment will be tricky.

I bet it works internally by exposing a separate network device that filters traffic much like Wireshark, and the low-level abstractions for doing something like that are very OS-specific.


OpenSnitch looks promising. https://github.com/evilsocket/opensnitch

Tilix is very much like iTerm2. Simple to use too.


I've never used this myself, but OpenSnitch appears to be a popular Linux equivalent to LittleSnitch.

[1] - https://github.com/evilsocket/opensnitch


Perfect timing for me. Macbook Pro 2017 logic board died and can't get it in for repair due to shutdowns. So installed Linux Mint on Thinkpad T420. This will help me a lot, I'd be pleased if I could make a permanent shift from Mac.

Is this something Apple is likely to try and break constantly with software updates?


This project is nowhere near the level of Wine, if that's what you're expecting. They admit they have basic experimental support for simple GUIs. Anything command-line is highly likely on Linux anyway.


Lenovo laptops seem to be great machines to convert to Linux. My daily laptop for the past few yrs is a carbon X1 running Mint and I just converted my wife’s (different gen) carbon X1 over to Pop!_OS for her. My only gripe with either is the lack of fine-tuning available for hi-dpi settings but my understanding is that this is a Linux problem generally.


This has been around at least since 2015 ive been watching it a bit good to see it's getting some work


I've been wanting to get it to execute the bonjour conformance test on linux so I can do CI of Avahi against it. I didn't have any luck last time might be worth a look again.


Is it possible to run it without the kernel module? That would make it way simpler to use with docker!


I honestly just last monday moved from MacOS on my desktop (don't ask) to an ubuntu machine, so that I can use my nvidia card. I'm already missing a few apps, this looks really neat! I'm really hoping they work out how to get bigger apps running nicely


I've used this to successfully run legacy 32bit commandline tools, though I think it's still too unstable to rely on it in a production environment.

I think there's been a notable upsurge in interest though, so I expect good things to happen with it this year.


Missed opportunity to call it Beer, which would have paired very nicely with Wine


Might as well call it Cheese then.


You can't run homebrew on cheese though.


already taken by webcam application on Linux


I know it's tangential, but get a TLS cert!


Surprising to see a site for geeks in 2020 without TLS!


I don't suppose I should get my hopes up for macOS DAWS? That would involve resolution for both GUI and audio latency.


I had high hopes of running Sketch on Linux.


TLDR; "Does it support GUI apps? Almost! This took us a lot of time and effort, but we finally have basic experimental support for running simple graphical applications."


Don't get your hopes up (too much) though. They will have to rely on an open source reimplementation of Cocoa (e.g. Cocotron or GNUStep) to support GUI apps. These are a long way from providing a full implementation of the macOS frameworks. You cannot just take a random Objective-C or Swift macOS app and recompile it using these open source libraries. So, binaries is even much further away. Even Wine, which has seen two decades of development (including from companies such as CrossOver), only supports a small subset of Windows applications very well.

Of course, it might be possible to re-use macOS' frameworks, but Apple would probably sue anyone who tries to offer that into oblivion.

BTW. I think this is a great project, but there are some people who seem to be rooting for using this for running Creative Suite on Linux. That won't happen anytime soon, if ever. Wine is your best shot.


Would love to run monodraw on Linux


Linux is eating the World /s ;)


Will it consume as much RAM as running OS X apps does on a real Mac?


Given it's a translation layer, and it doesn't modify the actual code, I would imagine memory usage would be very similar. (Or higher)


Does this allow building iOS apps on Linux? I'd love to be able to use WSL2 to build iOS apps under Windows 10.


In case you want to, you can build iOS apps on a jailbroken iOS device: https://iphonedevwiki.net/index.php/Compiling_iOS_applicatio...


I think you're taking this a step far. What does Windows have to do with this?


Emulception: Run darling on the Linux subsystem on Windows 10.


WSL doesn't meet the project's requirements:

https://github.com/darlinghq/darling/issues/260


On the other hand, it's a bit weird that Darling requires a kernel module. Given the name (darling-mach) I guess it's doing something to make Linux look more like XNU, but it's surprising that the Darling team has to do that within Linux itself (given that Wine is apparently able to make Linux look like NT in userspace).


Not sure it's the underlying reason, but for a long while Go would use raw syscalls on Darwin, which is something that Windows has explicitly sabotaged for ages. It's a lot easier to trap a library call from userspace than a syscall.


If this documentation is accurate, Darling doesn't support raw syscalls either:

https://wiki.darlinghq.org/documentation:system_call_emulati...

Their Linux kernel module does seem to be XNU based, but it feels like poor design / a rushed job to run it as a Linux kernel module instead of isolating it in userspace.


Rushed job? We've been at this for almost 8 years. We tried doing this without a kernel module for several years, but it just wasn't feasible.

You see, people think XNU is just another kernel, but it's very different from Linux or the Windows kernel. The only reason why we need a kernel module is Mach IPC. But this IPC is so critical and omni-present that a user-space process cannot even do a sleep() without using it. Even event loops in every GUI application use Mach IPC on the lowest level.

There is no way of implementing the full semantics of this IPC mechanism without a help from the kernel. For example, Mach IPC involves making direct memory copies between processes.

So even if we decided to take the "wineserver" approach, which would set us back by several years, the result would be super slow and not very compatible.

Also the userspace on macOS is quite different from other operating systems, which is why it's all taking us so long. MacOS is a bloated system with a huge number of layers sitting between the UI toolkit and the windowing server.

Imagine creating Wine from scratch. How much functionality would you need to implement to provide the correct behavior for a super-simple native GUI application? Probably just USER32, GDI32 and KERNEL32 would do. On MacOS, this is AppKit, QuartzCore, Foundation, CoreFoundation, libobjc and libSystem (which includes huge components such as libdispatch and emulating complex APIs such as kqueue).

FYI: The reason why we don't emulate raw syscalls is because this is not possible from kernel modules, unless you resort to techniques that could easily destabilize the whole system.


While I agree with your overall point (and agree that it's unfair to characterize the hard work y'all have been doing as a "rushed job")...

> How much functionality would you need to implement to provide the correct behavior for a super-simple native GUI application? Probably just USER32, GDI32 and KERNEL32 would do. On MacOS, this is AppKit, QuartzCore, Foundation, CoreFoundation, libobjc and libSystem (which includes huge components such as libdispatch and emulating complex APIs such as kqueue).

I don't think "number of APIs" is the reasonable benchmark for how difficult it might be to get a GUI application up and running. It's totally possible that macOS might more eagerly split out functionality into different systems while Windows combines that same functionality into relatively few. I don't know how true that is, but it'd be interesting to compare based on the depth of those libraries rather than just the quantity.

And from what I understand about Wine, all three of those Windows libraries are incredibly complex and convoluted, and even to this day have gaps in their Wine equivalents. Assuming macOS' greater quantity of necessary libraries add up to the same degree of API surface to be reimplemented, what y'all are doing is impressive, to say the least (and sure, Wine's more usable right now, but Wine also had a decade or two of a head start).


It’s not just Windows; directly calling syscalls is a linuxism, discouraged or unsupported on pretty much every other system.


Hmm. Emulception... Well played!


This software runs MacOS software in Linux. WSL2 can run Linux software on windows. This means theoretically you can use Windows to run WSL2 to run Darling to run XCode.


If you look at the issue, they did make it work on WSL2


> The name Darling is a combination of “Darwin” and “Linux”.

I'm sorry, what? How?


Take the first three letters of each name; Darwin gives you "dar" and Linux gives you "lin". Combining these, you get "darlin". Then, presumably the authors wanted a dictionary word for their name, so they chose darling.


Obviously the “g” at the end is for GNU ;-)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: