Linux users who want to run Windows applications without switching operating systems have been able to do so for years with Wine, software that lets apps designed for Windows run on Unix-like systems.
There has been no robust equivalent allowing Mac applications to run on Linux, perhaps no surprise given that Windows is far and away the world's most widely used desktop operating system. A developer from Prague named Luboš Doležel is trying to change that with 'Darling,' an emulation layer for OS X.
An Electron app released by developer Felix Rieseberg allows us to install Mac OS 8 on pretty much any Windows, Linux, or Mac computer, and the GitHub page of the project guarantees you’re going. Run Mac, Windows, and Linux apps. Windows 10 and Windows 7 running as VMs on MacOS Mojave. Image: Cliff Joseph/ZDNet If you sufficiently equip your Mac (and by this, I mean an i7 processor.
'The aim is to achieve binary compatible support for Darwin/OS X applications on Linux, plus provide useful tools that will aid especially in application installation,' Doležel's project page states. Darwin is Apple's open source operating system, which provides some of the backend technology in OS X and iOS. The name 'Darling' combines Darwin and Linux. Darling works by 'pars[ing] executable files for the Darwin kernel.. load[ing] them into the memory.. Ram usage mac app. and execut[ing] them.'
But there is a ways to go. 'Darling needs to provide an ABI-compatible [application binary interface] set of libraries and frameworks as available on OS X.. by either directly mapping functions to those available on Linux, wrapping native functions to bridge the ABI incompatibility, or providing a re-implementation on top of other native APIs,' the project page notes.
Run 32 bit app on 64 bit mac. This way you can easily find out whether an app is 32-bit or 64-bit. Use Activity Monitor To Find 32-bit Apps On Mac. Another way to find 32-bit apps on your Mac is to use the Activity Monitor tool. The tool does let you find out if an app is 32-bit but the app must be running while you try to find this information.
Doležel, who started Darling a year ago, described the project and its progress in an e-mail interview with Ars. Darling is in the early stages, able to run numerous console applications but not much else. 'These are indeed the easiest ones to get working, albeit 'easy' is not the right word to describe the amount of work required to achieve that,' Doležel said. 'Such applications include: Midnight Commander, Bash, VIM, or Apple's GCC [GNU Compiler Collection]. I know it doesn't sound all that great, but it proves that Darling provides a solid base for further work.'
Advertisement
Users must compile Darling from the source code and then 'use the 'dyld' command to run an OS X executable,' Doležel said. One roadblock is actually getting Mac .dmg and .pkg application files working on a Linux system. Because doing so isn't that straightforward, Doležel said, 'I've written a FUSE module that enables users to mount .dmg files under Linux directly and without root privileges. An installer for .pkg files is underway.'
Unix/Linux synergy
The fact that OS X is a Unix operating system provides advantages in the development process. 'This saved me a lot of work,' Doležel explained. 'Instead of implementing all the 'system' APIs, it was sufficient to create simple wrappers around the ones available on Linux. I had to check every function for ABI compatibility and then test whether my wrapper works, so it wasn't as easy as it may sound.'
Another lucky break not available to Wine developers is that Apple releases some of the low-level components of OS X as open source code, 'which helped a lot with the dynamic loader and Objective-C runtime support code,' Doležel noted.
But of course, the project is an extremely difficult one. Doležel isn't the first to try it, as Darling was initially based on a separate project called 'maloader.' Doležel said he heard from another group of people 'who started a similar project before but abandoned the idea due to lack of time.' https://ppyplnw.weebly.com/blog/notion-so-macos-app.
Run Mac App In Linux
Doležel was actually a novice to OS X development when he started Darling, being more familiar with OS X from a user's perspective than a developer's perspective. 'I have personally looked for something like Darling before, before I realized I would have to start working on it myself,' he said.
Darling relies heavily on GNUstep, an open source implementation of Apple's Cocoa API. GNUstep provides several core frameworks to Darling, and 'the answer to 'can it run this GUI app?' heavily depends on GNUstep,' Doležel said. Doležel is the only developer of Darling, using up all his spare time on the project.
Advertisement
No reverse-engineering
Doležel isn't reverse-engineering Apple code, noting that it could be problematic in terms of licensing and also that 'disassembling Apple's frameworks wouldn't be helpful at all because Darling and the environment it's running in is layered differently than OS X.'
If an app on your Mac stops responding and you can't quit the app normally, use Force Quit to close the app. To quit (close) a Mac app normally, choose Quit from the app's menu in the menu bar, or press Command (⌘)-Q. If the app doesn't quit, follow these steps to force the app to quit. Here’s how to force quit on a Mac. Method 1: Use the Finder First up is Apple’s recommended course of action for when an app starts to wear out its welcome. Try using the Terminal & Kill command. If that doesn't work,you can try using the command line as a surefire way to force an app or process to quit by issuing the low-level kill command. Launch the Terminal and type the following command: killall processname. Option + Right Click on an apps icon in the Dock to bring up the “Force Quit” option, selecting this will kill the app without any confirmation. 4) Force Quit an App from the Apple Menu Hold the Shift Key and click on the Apple menu to find “Force Quit Application Name”. How to kill a mac app. And that’s it: the troublesome app has been force-closed and should vacate your system sharpishly. For more information on both top and kill, check out their respective man pages on your Mac.
The development process is a painstaking one, done one application at a time. Doležel explains:
To improve Darling, I first take or write an application I'd like to have running. If it is someone else's application, I first examine it with one of the tools that come with Darling to see what frameworks and APIs it requires. I look up the APIs that are missing in Apple's documentation; then I create stub functions for them and possibly for the rest of the framework, too. (Stub functions only print a warning when they are called but don't do any real work.)
The next step is to implement all the APIs according to the documentation and then see how the application reacts. I also add trace statements into important functions to have an insight into what's happening. I believe this is very much like what Wine developers do.
When things go wrong, I have to use GDB [GNU Debugger] to debug the original application.
It is rather unfortunate that Apple's documentation is often so poorly written; sometimes I have to experiment to figure out what the function really does. Many OS X applications seem to contain complete pieces of example code from Apple's documentation, presumably because one would have to spend a lot of time getting to understand how the APIs interact. This is why I appreciate open source so much—when the documentation is sketchy, you can always look into the code.
Run Mac On Linux
Years of development are needed. Similar to Wine, 'Having a list of applications known to be working is probably the best way to go,' Doležel said.
Darling should work on all Linux distributions, he said, with the catch that 'many apps for OS X are 32-bit only, and installing 32-bit packages on a 64-bit Linux system could be tricky depending on your distribution. I personally use Gentoo Linux, so I'm gradually creating a Portage overlay that would compile Darling and all dependencies for both 32-bit and 64-bit applications.'
Doležel would like to bring Angry Birds, other games, and multimedia applications to Linux. Darling could potentially 'be used to run applications compiled for iOS,' he writes on the project site. This will also be a challenge. 'The intention is to support the ARM platform on the lowest levels (the dynamic loader and the Objective-C runtime),' he writes. 'Rewriting the frameworks used on iOS is a whole different story, though.'
Darling is a translation layer that lets you run macOS software on Linux
- FastDarling runs macOS software directly without using a hardware emulator.
- FreeLike Linux, Darling is free and open-source software.
It is developed openly on GitHub and distributed under the GNU GPL license version 3. - CompatibleDarling implements a complete Darwin environment. Mach, dyld, launchd — everything you'd expect.
- Easy to useDarling does most of the setup for you. Sit back and enjoy using your favorite software.
- NativeWe aim to fully integrate apps running under Darling into the Linux desktop experience by making them look, feel and behave just like native Linux apps.
Darling Mac Os
- That sounds a lot like WineAnd it is! Wine lets you run Windows software on Linux, and Darling does the same for macOS software. Another similar project is Anbox, for Android apps.
- 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!
- Does it violate Apple's EULA?No! We only directly use those parts of Darwin that are released as fully free software.
- Does the name Darling mean anything?The name Darling is a combination of “Darwin” and “Linux”. Darwin is the core operating system macOS and iOS are based on.
- Can I run Darling on Windows using WSL?Unfortunately, no. Darling requires a real Linux kernel to run. See this issue for more details.
- Do you know about opensource.apple.com, GNUstep, The Cocotron and other projects?We do, and in fact, Darling is largely based on the original Darwin source code published by Apple. We use The Cocotron as a basis for our Cocoa implementation, along with the Apportable Foundation and various bits of GNUstep.
- Do you have plans for supporting iOS apps?Yes, in the long run, we'd like to be able to run iOS apps on ARM devices (like most Android phones). A significant challenge here would be to write our own implementation of UIKit. Come talk to us if you're interested in working on this!
- How do I contribute?Start by reading the documentation and our blog to get familiar with Darling internals. Then, come and join us on GitHub. It's great if you have experience in developing for macOS or iOS, but it's absolutely not required to start contributing.