Forgot your password?
typodupeerror
OS X Operating Systems Software User Journal Linux

Run Mac OS X Apps On Linux? 497

Posted by kdawson
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.

Run Mac OS X Apps On Linux?

Comments Filter:
  • "darwinux" (Score:3, Informative)

    by johkra (1127573) on Monday July 30, 2007 @08:46AM (#20041185)
    I was searching for the same thing (I wanted to test a crash Mac users experienced with an cross-platform app, but I don't own a Mac.), but I found nothing usable.

    There's "darwinux" (http://lwn.net/Articles/229088/ [lwn.net]), but this far away from being usable.
  • Re:Cocoa and Carbon (Score:3, Informative)

    by Anonymous Coward on Monday July 30, 2007 @08:50AM (#20041229)
    Wine is an open source implementation of the Windows API, though it can use Microsoft dlls if you supply them.

    An OS-X Wine would probably not take as long I suspect, due to the techniques developed in writing Wine and the fact that OS-X has BSD roots. Still, not exactly a simple project.
  • Huh? (Score:4, Informative)

    by Cereal Box (4286) on Monday July 30, 2007 @08:50AM (#20041233)
    I will never understand why someone would buy a $2000 iMac and negate the entire reason for purchasing from Apple -- to run Mac OS X. You can run Linux for a lot less money, you know.

    Honestly though, Mac OS X really isn't that bad -- in fact, I think it's pretty nice, especially if you come from a Linux background. You do realize that you can run pretty much any Linux app (as long as it doesn't do any funky OS-specific things) natively on Mac OS X, right? You could even run a full-fledged Linux installation via Parallels if you so desire. ... Or is the main issue that you're one of those people who gets the "heebie-jeebies" at the thought of running software that isn't open source? In that case, my advice is to get a life -- it's just software! The world won't end if you run a piece of non-free code!
  • by malevolentjelly (1057140) on Monday July 30, 2007 @08:55AM (#20041281) Journal
    Let's see- you take your unix kernel, build a fully rewritten, GL-optimized X Windows system... solidify your GNUStep libraries until they're fully compatible with cocoa-

    Then be certain you're only running systems with SSE3 or above, since all the intel binaries are optimized for that.

    Whoops- also gotta build a compatible CoreAudio system.

    Oh no, looks like you're now Apple.

    If you're using Mac OS X, you're already using a NeXT compatibility layer on top of a streamlined X and a really high end specialized desktop unix. The question is- why are you trying to run linux? You're using a much higher end unix system that supports X11 and has a full BSD layer, with package managers available. Why don't you just run linux apps in OS X?

    Making an OS X "compatibility layer" would essentially just require you to create a shoddy set of OS X libraries- something Apple's already done better.

    Take advantage of your resources.

    Let me repeat this - OS X is a "mac compatibility layer" running on top of a unix kernel already- it's a totally insane waste of time to re-implement it. If you're that interested in making OS X, you should work for Apple.
  • Re:Cocoa and Carbon (Score:5, Informative)

    by ozmanjusri (601766) <aussie_bob@@@hotmail...com> on Monday July 30, 2007 @08:58AM (#20041319) Journal
    By the time full XP support is available in WINE, XP will be 2 generations past.

    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.

  • Re:Why? (Score:1, Informative)

    by Anonymous Coward on Monday July 30, 2007 @09:00AM (#20041345)

    I just want to know why you would want to replace OS X with Linux? I understand the FOSS ideals, but you could always run linux in a virtual machine.
    Evidently, you don't really understand the FOSS ideals. The FOSS ideal is not "I want to run some neat free software on top of my proprietary OS" ... it is "I want to replace as much of my proprietary software with free software equivalents." In which case, replacing the OS with a free equivalent is a big step in that direction.

    Of course, that's assuming this guy is switching to Linux-only on ideological grounds--but if he were, presumably he would be motivated to give up on his previous closed-source OSX-only apps, and switch to using free software equivalents. So, in fact, his motivations may be more pragmatic. Though OS X has lots of UNIX-goodness, there are some things that are just easier to get done in Linux. (Some examples of things that I find easier in Linux than OS X are programming, designing websites, and running websites (both in terms of deploying sites and as a server).)
  • Purposes (Score:3, Informative)

    by simpl3x (238301) on Monday July 30, 2007 @09:52AM (#20041963)
    That probably could have been stated better! I believe the question is what is each good for? If free is a goal, then why not run Linux as an OS? But, why on Apple hardware, not that the cost is bad nowadays compared with the "general" hardware quality and design if that's your thing.

    If you need OS X applications, why not run Linux through Parallels or some VM? If Linux is your primary OS, use BootCamp to allow access to OS X. These approaches make sense depending upon your needs. Want access to everything at the same time -- Parallels. Want to run everything within Linux, and only need to access OS X once in a while -- BootCamp. Want to run open applications -- us X11. This doesn't seem any more complicated than using Windows and OS X applications. But if performance is an issue, why are you using a consumer machine?

    Aside from workflow and high performance issues, it has never been so easy to work across platforms, and frankly I feel that Apple has done a pretty decent job of developing the right resources.
  • Re:Cocoa and Carbon (Score:5, Informative)

    by HeroreV (869368) on Monday July 30, 2007 @10:15AM (#20042259) Homepage

    Wine doesn't really emulate Windows libraries, it runs them directly.
    Wine implements the Windows API. Wine does not use any software from Microsoft. Windows programs are just run with the Wine implementation instead of the Microsoft implementation.

    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.
  • by Joe The Dragon (967727) on Monday July 30, 2007 @10:16AM (#20042269)
    Only in the US out side of it they can say what you can do with there os after you buy it. So when 10.5 comes out BUY and hack it to run on any system and apple will not be able to stop you.
  • Re:Resist the Urge (Score:3, Informative)

    by molarmass192 (608071) on Monday July 30, 2007 @10:32AM (#20042505) Homepage Journal
    VMWare Fusion ... download it ... it's really good on OS X. I have 3 Linux images I regularly use with almost no perceptible performance hit. It has a really slick full screen mode. Also, there's nothing stopping you from imaging your machine with Linux and installing OS X in a VMWare VM, it's a bit flaky on the redraws, but you'll have access to iTunes since you DO have a valid OS X license after all. The downside to that is you won't have access to firmware updates from Stevie.
  • Re:Why? (Score:5, Informative)

    by AnObfuscator (812343) <onering&phys,ufl,edu> on Monday July 30, 2007 @10:39AM (#20042587) Homepage

    That's a good question. For me, my move from OS X to Linux is motivated by several reasons.

    1. Portability
    OSX runs on Apple Hardware. It can be hacked, sure, to run on some non-Apple systems, but widescale hardware compatibility is lacking (just look at the difficulties in getting a GeForce 8x00 series card running). With Linux, I have a much wider choice of hardware vendors.

    2. Flexibility
    Linux gives me a lot more control over my OS. While this is pointless for 90% of users, for me, it is very nice to be able to custom compile a kernel with the options I need, recompile any given app for the characteristics I need, and so on. I can enable, disable, theme, customize, and otherwise hack my environment to suit my needs much more easily than in OS X.

    3. Security
    OSX is pretty good, but I'm a little worried at Apple's highly negative response to security concerns (anyone remember the wireless driver exploit fiasco?). Also Linux offers some features that OSX doesn't currently offer, such as MAC. 10.5 is supposed to have MAC, but I can't find any info on it. While both systems are good, I perceive the Linux market as responding more credibly to security issues.

    4. Software Ecosystem
    OSX software is great. However, Linux offers me a great deal more choice, and that choice tends to be much more configurable to my needs. While I love the Cocoa API and what it allows apps to do, Linux is catching on fast, and I find that good GNOME or KDE apps perform most, if not all, the functionality I care about in OSX, while being beer free, and offering me more choices (i.e. Anjuta, Geany, Eclipse, KDevelop vs XCode, Eclipse). There's also a lot of software I like to use that aren't available on OSX yet. I'm starting to learn CUDA, for example, and that is not yet offered for OSX. Also, VMWare workstation offers some nice features targeted at developers (such as host-to-VM project deployment & debugging) which I haven't seen offered yet on OSX.

    5. Usability
    I know a lot of people disagree with this, but I find a lot of OSX's UI broken, at least for how I use my system. I find the window management to be frustrating, the Dock to be very limited, and the lack of decent app launching & management to be very frustrating (although QS does manage to solve app launching in a pretty nice way). GNOME's clean usability and massive customization have allowed me to create a Linux system that I actually find to be more usable for me than OSX.

    I guess I could summarize all of that by one word: choice. For my needs and uses, I find the flexibility of Linux far more convenient.

    If OSX's behaviors work well for you, and you are happy with Apple's hardware offerings, then you have the choice of OS X instead!

    Isn't freedom of choice a great feeling?

  • by aqui (472334) on Monday July 30, 2007 @10:54AM (#20042777)
    >>>>> I realize your request is for "intel" MacBooks... but for those of you with PPCs or Developers...

    I'm pretty sure Mac On Linux (MOL) won't work for intel machines, but if it did it would more or less do what you want. A short search shows it probably doesn't work, maybe someone should look at porting it to intel hardware (if its doable).

    The feature list for processors http://mac-on-linux.sourceforge.net/wiki/index.php /Features [sourceforge.net] doesn't mention anything remotely intel.

    I think for now the VMWare (answer already given by other posters below) is as good as its going to get. That is simply the problem with closed source stuff.

    For those of you reading this post looking for solutions for PPCs though, MOL is probably the way to go.

    Mac On Linux supports all of the PPC architectures well, and I've got linux and Mac OS X co-existing nicely
    by booting into Ubuntu linux (6.10) and then running Mac On Linux with my OS X install.

    Effectively I have Mac OS X in a window on my second workbench and can switch from one OS to the other easily.
    I use both linux and mac apps depending which one I like better.

    Having a 12" PPC with NVidia closed source crap, I cant run the os in a separate screen yet but with SDL drivers and a screen sized window I get pretty close.

    The only thing that doesn't work well in Mac OS X for me right now is sound, (but the MOL team is working on it).
    Network etc. is all available (with some configuration, through a TUN device), and a Samba drive lets me access my linux drives from inside MAC OS X (running in MOL).

    The only reason I don't boot only into linux is that Sleep, and Video out don't work courtesy of NVIDIA closed source crap... (Admittedly they make nice graphics cards, but I will be choosing my set of hardware based on how well they support open source, which likely means it likely won't be an NVIDIA card, given my current experiences, grumble, grumble ;) ).

    MOL can be found here: http://mac-on-linux.sourceforge.net/ [sourceforge.net].
    My personal thanks to the MOL team.

    (Go ahead mod me off topic if you want, but there are still many users reading about this that have PowerPCs)
  • No (Score:3, Informative)

    by Craig Ringer (302899) on Monday July 30, 2007 @11:03AM (#20042877) Homepage Journal
    Mac OS X has a subsystem based on BSD, and it uses it for some system tasks and to present a POSIX runtime environment. It's only a very small part of the system and rather a second citizen. Let's not even talk about their X11 support, which is pretty unpleasant to use for anything but the basics.

    Only a Mac zealot is likely to tell you it's just a "better unix than unix". Real unix users tend to cry when trying to use it, especially since half the man pages are outdated and completely wrong because Apple changed how everything works but didn't document it.
  • Re:Cocoa and Carbon (Score:3, Informative)

    by bytesex (112972) on Monday July 30, 2007 @11:20AM (#20043097) Homepage
    The WIN32 API is a moving target; it gets extended with every version of windows. The original poster isn't completely wrong.
  • Re:10 years (Score:3, Informative)

    by Abcd1234 (188840) on Monday July 30, 2007 @11:25AM (#20043151) Homepage
    Why? Wine doesn't require a recompile of the executable in question. It simply does a manual load of the PE/COFF file. Creating a similar loader for the Mach-O format is probably no more difficult.
  • by mehemiah (971799) on Monday July 30, 2007 @11:30AM (#20043223) Homepage Journal
    Between MacPorts and Fink, i could potentially run any Linux app I would use under x and be fine. I can run Kde or Xfce and have them running in quartz wm / Xfree86 or X.org right next to aqua. Now that they've fixed some of the HFS issues with the command line apps, the whole thing runns smoothly. You're millage may vary.
  • Re:Cocoa and Carbon (Score:5, Informative)

    by TheRaven64 (641858) on Monday July 30, 2007 @11:44AM (#20043423) Journal

    Producing a Cocoa compatibility layer should be much easier than producing a Windows compatibility layer.
    There are a few more things required than just GNUstep. GNUstep gives source compatibility and is now fairly good at reading nib files. In order to run OS X pure-Cocoa applications you would also need a Mach-O binary loader. Linux uses ELF as the format for binaries, and so the loader can not start and link OS X applications. Next you would need to compile the Apple (NeXT) Objective-C runtime library on Linux. This is pretty easy (the code is ASPL), but currently GNUstep has problems running with the NeXT libobjc (it uses the GNU one by default).

    If you did this, you could run applications that just used Cocoa. Unfortunately, a lot of OS X applications also use Carbon. There is no open source version of Carbon, although a few people have written GNUstep wrappers for the parts of Carbon which are toll-free bridged with Cocoa. You would also not be able to run anything that depends on WebKit (unless you use GNUstep's SimpleWebKit as a stop-gap), QuickTime, or any of a number of other frameworks that have not yet been added to GNUstep.

    WINE has had a lot of time and effort put into it because there are a huge number of proprietary Windows-only applications that would be useful on other platforms already deployed. There are far fewer essential applications for the Mac (90%+ of computer users don't use any OS X apps, after all), and so no one has bothered. For the few apps that would be worth supporting, it is probably easier to re-write them from scratch than it is to write a general purpose compatibility layer.

  • Re:Cocoa and Carbon (Score:3, Informative)

    by Sparks23 (412116) * on Monday July 30, 2007 @01:13PM (#20044743)
    Carbon is a sort of bizarre chimera library, which was intended to provide a compatible set of APIs between classic Mac OS and Mac OS X. So that once OS X was on the way, you could carbonize an app under Classic and have it just work on OS X. Brilliant idea, but it means Carbon isn't a close relative of anything. It's a huge library and framework (since it spanned multiple operating systems), and would basically have to be engineered from scratch.

    In contrast, Cocoa is what used to be OPENSTEP; it's just been renamed. GnuStep thus provides the same stuff Cocoa does, but tends to be several years behind. (Also, GnuStep provides source-level compatibility with a given revision of Cocoa, not binary-level.)
  • by hummassa (157160) on Monday July 30, 2007 @01:29PM (#20045017) Homepage Journal
    like dd?

    dd if=/dev/sdc2 | gzip > ipodbackup.img.gz
    and

    zcat ipodbackup.img.gz | dd of=/dev/sdc2
  • Re:iTunes (Score:3, Informative)

    by vux984 (928602) on Monday July 30, 2007 @02:59PM (#20046367)
    All I want is iTunes compatibility.

    Seeing as iTunes has been ported to windows, have you explored running the Windows version of iTunes on Linux instead of the OSX version?

    It seems that iTunes 6 at least has been successfully done...

    http://pimpyourlinux.com/linux-feature-review/itun es-in-linux-not-any-time-soon/ [pimpyourlinux.com]

    Not sure when that was written, so someone may have figured out 7.

    It sounds like 6 can't access the itunes store anymore; but this is certainly a partial solution. And is priobably the avenue to watch -- unlike iTunes (OSX), lots of people are actively working on getting iTunes (Windows) running.
  • Re:Cocoa and Carbon (Score:2, Informative)

    by larry bagina (561269) on Monday July 30, 2007 @06:17PM (#20049571) Journal

    Apple has released some of Core Foundation as open source [apple.com] (APSL probably).

    Cocoa is written in Objective C (and the libraries are well documented). The C-based CoreFoundation is a rewrite of some of the stuff in C. Some of the data structures can be used in a cocoa app as a native Objective C object, but most cocoa apps don't depend on CF.

"Look! There! Evil!.. pure and simple, total evil from the Eighth Dimension!" -- Buckaroo Banzai

Working...