Slashdot Log In
Run Mac OS X Apps On Linux?
Journal written by Anthony Baby (1015379) and posted by
kdawson
on Mon Jul 30, 2007 08:36 AM
from the must-be-a-layer-somewhere dept.
from the must-be-a-layer-somewhere dept.
I have the urge to commit my 24" Core 2 Duo iMac to a single Linux operating system, thus giving up the goodness of my beloved Mac OS X. I am not a stranger to Linux, but I am a stranger to running Mac apps on Linux. On my PowerPC I can use SheepShaver to run Classic apps. The Mac-on-Linux project can run OS X apps, but it requires a PowerPC, not an x86. Virtualizing and emulating are inefficient, especially given the wonderful results the WINE project has had in getting Windows apps to run on Linux. What I would like is an equivalent: a software compatibility layer that will allow Linux to run Mac OS X apps at native performance. I believe there is some additional complexity in accomplishing this. Mac OS X apps aren't just Mac OS X apps. They are Carbon. They are Cocoa. They are universal binaries. They are PPC code with Altivec. Does such a project exist yet? If not, why not?
This discussion has been archived.
No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Full
Abbreviated
Hidden
Loading... please wait.
Cocoa and Carbon (Score:5, Insightful)
Wine has taken years to get as far as it has. I suspect that an 'OS X Wine' would take as long.
Re:Cocoa and Carbon (Score:5, Informative)
The Cocoa API is based on the OpenStep API, which has a full open specification [gnustep.org]. We've had a FOSS implementation of the OpenStep API for years: GNUstep. GNUstep has even implemented some of the Cocoa additions. Producing a Cocoa compatibility layer should be much easier than producing a Windows compatibility layer.
Parent
Re:Cocoa and Carbon (Score:5, Informative)
Nice troll, but Wine aims for compatibility with Win32 code, not some specific version of the OS. It already supports more than 90% of the API.
Parent
Re:Cocoa and Carbon (Score:5, Funny)
Parent
Re:also (Score:5, Insightful)
Parent
Re:Cocoa and Carbon (Score:5, Insightful)
Correct. I'm operating under the assumption that Cocoa and Carbon use Unix APIs at some level, since they sit on top of a Unix core. So as Wine is an implementation of the Win32 API, the Win32 API is just a fairly low-level API that lets you make windows and buttons and pull-down menus, access the filesystem, access task and memory management, etc., but if you want any of the niceties of newer Windows applications, like toolbars, reconfigurable menus, fancy controls, Windows media, etc., you need Windows/Microsoft DLLs that aren't a core part of the Win32 API proper. Sure, Wine provides open source implementations of some of these, but in most cases you need them provided from the application or from a copy of Windows. The analogy is not quite the same, with Cocoa and Carbon, but I think you get my point.
Parent
Re:Of course you can't (Score:5, Funny)
Damn. This stuff must be expired!
Either that or I'm not using enough of it...
Parent
10 years (Score:5, Insightful)
I can guarantee you it would take at least that long to reverse-engineer Carbon from scratch. However, Cocoa is really nothing more than OPENSTEP v2. Linux already has an OPENSTEP implementation (GNUStep), so a portion of the work is done.
You Answered Your Own Question (Score:5, Insightful)
Why? (Score:5, Insightful)
What do you hope to gain by installing Linux as the full-time OS? Please don't flame me, I'd like some logical points, or even a "just because".
Re:Why? (Score:5, Interesting)
I can agree with you on Linux being an easier to use server platform, but OS X runs almost all of the same tools so that may change if I used it as a server more often.
Parent
Funny you should mention this... (Score:5, Funny)
Re:Funny you should mention this... (Score:5, Funny)
Parent
You can't (Score:5, Insightful)
You're trying to do something stupid here: a Mac is only good as Apple sold it to you. They've went to thoroughly extensive work to ensure it is so, trying to get something production ready with OSX apps under Linux is begging for problems.
You bought a Mac, use OSX (you can dual boot still, or virtualize).
Why not? (Score:5, Insightful)
It's a fair bet the real answer is one or all of those.
Funnily enough (Score:5, Insightful)
In short, you aren't going to gain anything by running Linux, except some nebulous feeling of self-satisfaction about something or other, and you are going to lose an awful lot. Running Windows on a Mac makes the Baby Jesus cry; running Linux exclusively gives him slight heartburn.
Market Share (Score:5, Insightful)
The real reason that these companies exist, is that there isn't THAT much of a demand for Mac apps on Linux. There is a large demand for Windows apps on Linux because there are so many Windows developers and subsequently applications that run on Windows. That's why we have WINE.
It would be possible I guess to do Carbon and Cocoa on Linux, re-implement the APIs, but for the amount of applications that there are on Mac that aren't on Windows, there isn't much point.
If Apple opensourced Carbon and Cocoa (Not likely) then I guess they would get ported to Linux by someone, but till then, someone isn't going to do this as the amount of developers out there just isn't high enough. There isn't the interest.
Thoughts (Score:5, Insightful)
- The Officially Sanctioned API (TM) for OS X apps is Cocoa. This is basically an extension of OpenStep. So is GNUStep [gnustep.org]. GNUStep even aims to implement Cocoa's extensions so as to allow Cocoa apps to be linked with GNUStep. However, for the time being, compatibility is incomplete and only at the source level. You might have some luck compiling GNUStep apps on Cocoa/OSX, but not running compiled Cocoa apps on GNUStep/Linux.
- Some people tried to get Darwin binary compatibiltiy into NetBSD [netbsd.org]. However, the project is now dead [hcpnet.free.fr], purportedly due to lack of user interest. This is the only Darwin binary compatibility project I am aware of. What this means is that, at the moment, you can only run Darwin (AKA OS X) executables on Darwin.
- QEMU [bellard.free.fr] is a fast and open source emulator that can be used to emulate, among others, x86 PCs, AMD64 PCs, and Power Macs. This should allow you to run OS X as a guest OS. If you use QEMU to emulate an x86 on an x86, or an x86 or AMD64 on AMD64, it should run close to native speed. That is, as far as the CPU is concerned. Other hardware, graphics hardware in particular, will not have native performance.
- I've been a GNU/Linux user for over ten years. I also used Mac OS X for a couple of years. Eventually, I got frustrated with it and installed Linux on my iBook. I've never looked back. Of course, I am primarily a GNU/Linux and BSD user, which causes the little (sometimes significant) oddities of OS X to frustrate me. If you're primarily an OS X user, this will likely work the other way around.
- GNU/Linux does have some definite advantages over OS X. Just throwing down a few: more customizability, easier maintenance (given a decent package manager, such as apt-get), better compatibility with open-source software, and several possible advantages that depend on your choices: lower memory usage, lower latency, lower disk usage.
- Given that you have a Mac, OS X also has some advantages over GNU/Linux. Among others: it supports your hardware (what you get from Apple, anyway; Linux has the edge when it comes to third-party hardware), companies are more likely to support it (think software, hardware, and manuals), and
- As for why there is no compatibility layer yet: probably just because it's a monumental task. Think about how old Wine [winehq.com] is and how well it works. Then think about Apple's yearly OS upgrades. Then consider that Apple has also moved architectures (PPC -> x86) since the introduction of OS X, and probably will again (x86 -> AMD64 - they ship that hardware, but the OS is still at least mostly x86). Then look at GNUStep and the instructions for building it (you're allowed to shiver at this point). A Mac OS X compatibility layer won't happen anytime soon.
If not, why not? (Score:5, Insightful)
Because it's a terrible, terrible idea. The Mac software stack is *large*, with API compatibility going back 20 years. 3 full-size APIs are supported (bsd, carbon, and cocoa), and they're all constantly being improved by apple. Any such project, while also being an absurd waste of time, could never catch up. Not to mention all the GPU stuff they're doing these days, integrated into the window server (Quartz Extreme, CoreAnimation, etc.). Feel like extending X11 to get decent performance? I don't, and neither does anyone else.
You've already gone past the hurdle that keeps most from using Linux: buying a Mac. If you want all the linux software, just download port from http://www.macports.org/ [macports.org] and let it download prebuilt binaries of traditionally linux applications for your mac. The website is crap but the tool's good and the repository is active and well maintained. They run just like the linux side, only you don't have to start hating your life by using Linux as your desktop OS. Switching back from OS X to Linux is about as painful as shoving a screwdriver in your eye. There's no point.
Some corrections:
* Parallels/VMWare aren't emulating anything. They're using newish x86 instructions to let the system run 2 OS's simultaneously
* Ever consider recompiling? I mean, it's called open source for a reason.
Also, if you're gonna tinker, consider Solaris. It's free and Parallels supports it with nice X11 extensions for mouse sharing, etc. Also, it's BrandZ lets you run Linux binaries.
Re:Resist the Urge (Score:5, Interesting)
I've run *nix on the desktop for roughly 17 years. Last year, after we had a baby and I had essentially no time, I finally got tired of maintaining my system, and thought the "just works" aspect of MacOSX might be a nice change. I've been running 10.4.x on my Core 2 Duo iMac since last October. I've found that after more than a decade and a half of being able to customize my desktop behavior, I just can't adjust to the MacOSX gui. I hate the menu bar at the top, I hate not being able to define *MY* hotkeys for resize, move, and iconify, I miss the easy X11 1-click cut and 1-click paste, etc. To get around some of this, I run most of my shells via xterm. However, X locks solid every few weeks (usually when I scroll too much or too fast in some window).
I also find that the only MacOSX application I ever use is iTunes. I started out using Mail and Safari, but I moved back to Thunderbird and Firefox for the plugins. Specifically, the external editor plugin for Thunderbird so that I can edit messages in xemacs, and the noscript and adbplockplus extensions for Thunderbird.
I also hate that my 4 USBserial connectors are flaky, and have to be re-plugged before they'll all show up on boot. Neither Linux nor FreeBSD had this problem.
At any rate, how is the codeweavers support for playing iTunes videos? That's really the only thing I use iTunes for is video.
Parent
Re:Purpose. (Score:5, Funny)
The guy refers to "my beloved Mac OS X" and then goes on and on about how he wants to get rid of it, but can't leave behind the application support. Why?
"Dear Slashdot, I've got this urge to kill my beloved wife. Could you please tell me how to do it, and how to simultaneously make her sister as hot as she is and have her marry me instead?"
What the fuck is he trying to gain?
--saint
Parent
Re:Purpose. (Score:5, Funny)
Please stop the Hans Reiser bashing right now.
Parent
Re:Purpose. (Score:5, Funny)
Didn't Hans Reiser submit that story?
Sorry, that was in poor taste
Parent
Re:iTunes (Score:5, Interesting)
Now, if there is a nice FOSS "iPod Restore" tool, that would help. Integration into Amarok as a plugin or something would be even better.
Parent
Re:Why not Linux apps in OSX? (Score:5, Insightful)
If Apple goes bankrupt, or drops it, then your left out in the cold.
Similarly if Apple don't move it in the directions you want, then your stuck. (think very cheap lowend hardware, or very tiny laptops)
I run Kismac, it's a very nice wireless sniffer similar to Kismet on Linux, but graphical and with good gps integration including downloadable maps. I would like to run this on a tablet or a PDA, but Apple don't make such devices, so i have to run Kismet instead (text based) and then import the data into a mapping program later.
Parent