As time goes by, hehe differences between operating systems are becoming irrelevant. Virtual machines, containers and other technologies allow us to use more titles of our favorite programs every day even if it does not have a version for our operating system.
Wine, the tool that acts as an interpreter between the Linux kernel and Windows applications has been around for a long time. Recently, we also have a tool for macOS programs.
Table of Contents
MacOS programs on Linux? With Darling it is possible
Darling fulfills a similar function to that of Wine with Windows programs, only it has no complex in defining itself as an emulator. What it does is act as a translator allowing macOS programs to run using Linux resources. The name Darling (Dear) is the first part of the macOS kernel name (Darwin) and the first 3 letters of Linux. I guess the final G is to build a word that is easy to memorize.
It must be said that Darling developers find it easier than Wine developers. They don't have to reverse engineer or reinvent anything since they are based on the parts of Darwin that are under open licenses. Darling itself is distributed under the GPL license.
The program does not have a graphical interface. We start it from the terminal with the command:
By typing it, Darling will either create a virtual root directory or connect to an existing one. It will also load the kernel modules and build the virtual file system where we will run the programs.
From the command line we can access two types of file systems: the traditional macOS that includes top-level directories such as / Applications, / Users and / System among others. On the other hand, we find the host operating system in a partition called / Volumes / SystemRoot
We can check the kernel with the following command:
And find out the version of macOS with:
We left the terminal with
And we turn off the container with:
Installation of programs
If you are using Linux in dual boot with macOS and you want to run any of the programs that you have installed on the Mac partition, you can do it with the command:
Many macOS programs ship in .dmg format. To install them in Darling we do:
Darling [~]$ hdiutil attach Downloads/aplicación.dmg
Darling [~]$ cp -r /Volumes/aplicación/aplicación.app /Applications/
In the case of applications stored in compressed files, we unzip it and copy it to the / Applications folder. The same with apps previously downloaded from the app store.
Finally we have the applications .pkg, the native package format of macOS. This format involves running scripts during installation. In order to use them we must do:
Darling [~]$ installer -pkg aplicación.pkg -target /
We can uninstall the programs with:
We must understand that although Darling works very well with applications for the command line, it only has very limited functionalities for those that need a graphical interface.
If you use Debian or derivatives, installing Darling has no major problem. You just have to type the commands:
sudo apt install gdebi
sudo gdebi darling-dkms_X.X.X.testing_amd64.deb
sudo gdebi darling_X.X.X.testing_amd64.deb
Replace the X with the version number of the packages you will download from here
In other distributions you will have to compile it which requires a disk space of 10 GB and 1 GB for the installation. In addition, you must previously install the dependencies for your distribution. You can check them in the documentation
We download the necessary files with:
git clone --recursive https://github.com/darlinghq/darling.git
You may have to install the git package.
We check if there is a new version (Only if you downloaded a long time ago)
git submodule init
git submodule update
We proceed to compile
- We go to the directory where we download with
- We create a working directory with
- We change to that directory with
- We configure with the command
- We build with the command
- We install with
sudo make install
We are going to need to install a kernel module. We do it with the commands:
sudo make lkm_install