Mac applications on linux

🍏 Как запускать приложения Mac на Linux

macOS и Linux имеют общее наследие.

К сожалению, это не означает, что приложения могут плавно переходить между операционными системами.

Для запуска приложений Mac в Linux вам понадобится виртуальная машина или слой перехода.

Запустите виртуальную машину MacOS (все приложения)

Самый надежный способ запуска приложений Mac в Linux – через виртуальную машину.

С помощью бесплатного гипервизора с открытым исходным кодом, такого как VirtualBox, вы можете запускать macOS на виртуальном устройстве на вашем компьютере с Linux.

Правильно установленная виртуализированная среда MacOS без проблем запустит все приложения MacOS.

Подобная виртуализация рабочего стола требует значительного объема оперативной памяти, поэтому она может работать некорректно на устройствах с ограниченными ресурсами.

Для машин с техническими характеристиками наилучшим вариантом является виртуализация операционных систем через виртуальную машину VirtualBox.

Использование Darling Translation Layer (только CLI)

Вы также можете запустить слой перехода под названием Darling.

Он работает как WINE, которая создает среду перевода с Windows на Linux, которая позволяет вам запускать некоторые приложения Windows в системах Linux.

Darling пытается достичь той же цели между macOS и Linux.

Поскольку macOS и Linux совместно используют одну и ту же базу в стиле UNIX, Darling менее ресурсоемок, чем WINE, и в большинстве случаев дает лучшие результаты.

В настоящее время Darling может работать только с очень простыми приложениями с графическим интерфейсом и несколькими приложениями командной строки.

Хотя поддержка приложений с графическим интерфейсом является целью проекта, эта функция еще не реализована.

По сути, вы можете надежно запускать оболочку macOS в Терминале и, возможно, не сможете эффективно запускать другие приложения.

Он также содержит огромное количество кода, требующего около 12 гигабайт дискового пространства после сборки.

По сути, это дублирует функциональность операционной системы MacOS.

Поэтому, если вы беспокоитесь о том, что удаленные исполняемые файлы могут повредить вашу систему, вы можете избегать пакетов такого размера.

Сборка и установка дорогой Darling

1. Следуйте инструкциям по установке, чтобы загрузить правильные зависимости для вашего дистрибутива Linux со страницы установки Darling.

В зависимости от вашего дистрибутива вам может потребоваться выполнить длинную команду.

Например, для Ubuntu выполните следующую команду терминала, чтобы загрузить зависимости Darling:

Источник

How to Run Mac Apps on Linux

macOS and Linux share a common heritage. Unfortunately, that does not mean applications can smoothly transition between the operating systems. To run Mac apps on Linux, you’ll need some sort of virtual machine or translation layer.

Run a macOS Virtual Machine (All Apps)

The most reliable way to run Mac apps on Linux is through a virtual machine. With a free, open-source hypervisor application like VirtualBox, you can run macOS on a virtual device on your Linux machine. A properly-installed virtualized macOS environment will run all macOS apps without issue.

Virtualizing a desktop like this does require significant RAM, so it may not run smoothly on low-resource devices. For machines with the technical specs, virtualizing an operating systems through a VirtualBox virtual machine is the best option.

Using the Darling Translation Layer (CLI Only)

You can also run a translation layer called Darling. This works like WINE, which creates a Windows-to-Linux translation environment that allows you to run some Windows applications on Linux systems. Darling tries to accomplish the same goal between macOS and Linux. Because macOS and Linux both share the same UNIX-style base, Darling is less resource-intensive than WINE, producing better results in more circumstances.

For the time being, Darling can only work with very simple GUI apps and several command-line apps. While GUI app support is a goal for the project, the feature hasn’t yet been implemented. Basically, you can run a macOS shell in Terminal reliably and may or may not be able to run other apps effectively.

It also contains an enormous amount of code, requiring about 12 gigabytes of disk space after building. It’s essentially duplicating the functionality of the macOS operating system. So, if you worry about remote executables corrupting your system, you might want to avoid a package of this size.

Building and Installing Darling

1. Follow the installation instructions to download the correct dependencies for your Linux distro from the Darling Install page. Depending on your distro, you may need to run a lengthy command.

Читайте также:  Sdk tools windows 3859397

For example, for Ubuntu, run the following Terminal command to download Darling’s dependencies:

2. Clone Darling’s git depository to your local machine:

Источник

OS X apps run on Linux with Wine-like emulator for Mac software

Oh! «Darling» emulator illustrates complexity of bringing Mac software to Linux.

Jon Brodkin — Aug 6, 2013 7:10 pm UTC

reader comments

Share this story

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.

«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. 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.

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.»

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.»

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.

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.»

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.

Читайте также:  Как узнать параметры сервера linux

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.

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.»

Источник

Ubuntu Documentation

Unsupported Version
This article applies to an unsupported version of Ubuntu. More info.

Introduction

Mac-on-Linux (MOL) allows you to run MacOS 9 and MacOS X from within Linux. It requires a Mac OS (9/X) and PowerPC computer. As it does not need to emulate a processor it runs at near native speeds. see http://mac-on-linux.sourceforge.net/ for full details.

This howto assumes that you have a working install on MacOS on your computer. It is also possible to use MOL to install MacOS into a disk image, see man mol for more details.

The MOL kernel modules are included in DapperDrake so it is no longer necessary to compile and install them manually.

Preparing your system

To install all of Mac-on-Linux, you’ll need to enable the universe and multiverse, see AddingRepositoriesHowto for details.

Installing Mac-on-Linux

You will need to install the following packages mol and mol-drivers-macosx and/or mol-drivers-macos for MacOS X and/or MacOS 9 support.

You may need to add this repository to get some of the drivers: http://people.debian.org/

jensen woody/. See AddingRepositoriesHowto for more information.

This can be done using Synaptic Package Manager or by running the following commands

Configuring Mac-on-Linux

If you are not comfortable with editing text look at NanoHowto.

This assumes that you have a working install of Mac OS X or 9, on a partition on you harddrive somewhere.

There are a few settings you may want to play with be for you use mol. One of them is memory. The default is 96mb, which is barely enough to boot Mac OS X (although ok for Mac OS 9 if you arn’t planning to do much).

In /etc/mol/molrc.osx (molrc.macos for Mac OS 9) find ram_size: 96 (or ram_size: 48 in molrc.macos) and change to at least 128

Its possible to give mol more RAM than you physically have, and linux will deal with putting stuff into swap, but you are likely to end up with a slow system. (It may also crash if you give too much RAM; I had to keep a ram_size of 48 in my molrc.macos.)

Then it is worth setting up the video modes, run sudo molvconfig

You basically type ‘y’ to try out a configuration, and then ‘y’ if you can see a nice gradient on the screen. The red screen comes out as a stripes, but it seems to work anyway. If you get a random mess, blank screen or some other problem then press ‘n’

Running Mac-on-Linux as a normal user

By default, Mac-on-Linux requires root privileges to run. The following command makes sure you can run Mac-on-Linux as a normal user.

Running MOL

Now you should be able to run startmol --osx (just startmol for Mac OS 9), and Mac OS X will boot up in a window or on a new virtual terminal. You need to install the MOL package that you find on the desktop. This provides sound and network drivers.

Читайте также:  Arch linux kde printer

To exit mol, choose shutdown from the apple menu.

If the video modes are correctly configured then pressing CTRL + ALT + F8 (sometimes higher F keys) will take you to a full screen MOL. CTRL + ALT + F7 should take you back to your Linux desktop.

If you want mol to always start full screen, edit /etc/mol/molrc.video and change enable_xvideo: yes to

See its manpage for more usage information.

Configuring Network

If you are using mol to use the iTunes music store, or watch flash on the web, then you will need to get networking running.

You will need to install ipmasq, dnsmasq and dhcpd using synaptic or

Then enable dhcp for the tun0 interface that mol uses, in /etc/default/dhcp, put the line

Then in /etc/mol/molrc.net add the line

and in /etc/mol/tunconfig at the bottom just before

Now run startmol --osx, and we can set up the network on the Mac OS X side. MOL creates a network tunnel called tun0 at the Linux end, and en3 on the Mac OS X end.

Once you have logged into to Mac OS X open up the system preferences. Make sure that en3 is set to configure with DHCP.

Now open up Safari or Firefox, and if you are lucky you should have a web connection.

Alternative — Networking without DHCP

Do as above, but without installing dhcpd. Once you have completed the setup, run ip addr to check the ip address for the tun0 interface. Mine was given as follows:

In OS X, then set up the en3 network port manually, by allocating an appropriate IP (in my case 192.168.40.2 was a good choice), set Router and DNS server to the ip associated with your tun0 interface in linux (192.168.40.1) and the subnet mask to 255.255.255.0. Now you should be ready to go.

Trouble Shooting

If you get mol module not found errors, try insmodding it manually

If OSX doesn’t start, edit the blkdev settings in /etc/mol/molrc.osx. Your OSX boot partition should not be mounted under linux and should have the setting of

Obviously the hda3 part could be different for you.

OS 9 Double Click and Slow Response Trouble

If you are having very slow response with OS 9, you probably need to open the MOL Install CD that appears on the desktop and drag the MOLAudio to the System Folder. Then you need to go to the sound control panel and enable the MOL Audio for output. (Before I did this I was unable to even double click. Afterwards, the response was more snappy.) The real fix is to use a more recent version of Mac-on-Linux though. To do that, I am providing my notes below.

To run Tiger and Eliminate Annoying Sluggish Behavior on MOL Install this Patched Version

Thanks to folks on the MOL mailing list for these tips. http://www.maconlinux.org/lists/index.html

1) Download the latest kernel source. You can user uname -r to determine your version. Mine was 2.6.12-9-powerpc. You can also use the synaptic package manager or Adept to do this.

sudo apt-get install linux-source-2.6.12

2) Follow the instructions on this Wiki for building the kernel found at https://wiki.ubuntu.com/KernelBuildPPCHowTo.

3) Download the patched MOL that Joe Jezak has kindly provided. http://dev.gentoo.org/

josejx/ Look for the latest mol version he has provided.

4) Extract it using tar -jxvf

5) Build it using make.

6) Set up and start MOL using the instructions in the section above. Actually, I had better luck on the networking setup with the sheep driver. I just made the /etc/mol/molrc.net have the line:

netdev: eth1 -sheep

You may need eth0 instead if that is your primary network interface (do an ip addr call to find out). With this setting Tiger boots and gets an IP address via dhcp from my local wireless router.

A side note: I have not been able to boot an OS 9 partition with this setup and there have been some similar notes on a Yellow Dog Linux forum. If I figure that out, I’ll append this note.

Remove boot loader out of memory problem

If you start MoL to boot OS X and get an error that looks like this:

Then you need to install the new boot loader.

2) Extract the bootx file.

3) Copy the file into /usr/share/mol/drivers/. You will need to do this as root.

Mac How To Everything about Macintosh OS

MacOnLinuxHowto (последним исправлял пользователь ckimes 2017-09-13 01:41:18)

The material on this wiki is available under a free license, see Copyright / License for details
You can contribute to this wiki, see Wiki Guide for details

Источник

Оцените статью