Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Slashdot Log In

Log In

Create Account  |  Retrieve Password

Apple Explains How to Run X11 on Mac OS X

Posted by michael on Fri Jan 21, 2005 03:30 PM
from the having-it-your-way dept.
tuc writes "In this document posted on its Developer Connection, Apple explains how to install X11R6 on Mac OS X, details of the default quartz-wm window manager, how to compile X11 code on Mac OS X, how to install OpenOffice, and the like."
+ -
story
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
More
Loading... please wait.
  • Weird (Score:5, Interesting)

    by pclminion (145572) on Friday January 21 2005, @03:33PM (#11435436)
    How weird -- I'm right in the middle of doing exactly this (trying to port one of our UNIX products over to run on Mac OS X using an X server).

    I think I'll wait to RTFA until after I've tried everything on my own first. Nothing like thrashing randomly to help you learn about a system :-)

    • Why? (Score:3, Interesting)

      Isn't X-11 already available either on the mac-install disk and as part fo fink. Or are these just X-11 servers instead of being real cleints (using the bass-ackward X-11 speak)?
      • Re:Why? (Score:5, Insightful)

        by pclminion (145572) on Friday January 21 2005, @03:44PM (#11435582)
        Yeah, it's there. But you're thinking like a Linux user, not a developer :-) My job is more than just getting the thing to compile and run. I need to get it packaged up in a way suitable for endusers. We don't want to explain to our users how to get the X server running. They need to be able to just click and have the thing work.

        Like I said, I'm in the middle of the project right now, so I don't know if it will be easy or hard. But I think you're jumping to the conclusion that it'll be a piece of cake just a LITTLE too soon...

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

          The OS X distribution of OpenOffice comes with a handy .app that starts up X and openoffice at the same time, just like you're running a normal mac application. It's a nice idea, even if I don't like OO.o that much on the whole. This might be the sort of thing you're looking for.

          On the other hand, it requires your end users to have X11 already installed and configured, which might be more of an issue for you, depending on your target audience.

        • Re:Why? (Score:3, Insightful)

          Actually, the X11 version provided by Apple can run rootless OR fullscreen. Personally I use it mainly fullscreen with WindowMaker as WM -- it's quite puzzling for people that see me using WM on my ibook, thinking I'm under linux, when with a mouse stroke I reveal the OSX desktop ;-)

          I also used it in Xnest, that can be useful too. Here is the small script I have to run it in Xnest:

          #!/bin/sh
          export DISPLAY=:0.0
          open /Applications/Utilities/X11.app
          xinit /Users/nico/.xinitrc.wmaker -- /usr/X11R6/bin/Xnest :3 -

      • Re:Trash your mac? (Score:5, Informative)

        by pclminion (145572) on Friday January 21 2005, @03:42PM (#11435553)
        It's unfortunate, but people who have only been exposed to Linux really have no clue about cross-UNIX portability. Yeah, UNIX systems are all similar, but you can RARELY take a piece of code developed on one system and just compile it magically on another.

        It's much less work than, say, porting a UNIX project to run on Windows, but it's definitely much more complicated than just copying the source code to the Mac and typing "make."

  • by product byproduct (628318) on Friday January 21 2005, @03:33PM (#11435445)
    Do they pronounce it 10-11?
  • by punkass (70637) on Friday January 21 2005, @03:33PM (#11435450)
    Step 2: There is no step 2!
    • Well, the article does go into more detail than that and it's probably useful to someone starting out with X11. On the other hand, I'm not sure how this qualifies for /.'s front page.

      I should try submitting "Apple posts technical Q&A on variable arguments in Objective-C methods" as a slashdot article, if every update to the ADC website needs its own story.

    • by Alien Being (18488) * on Friday January 21 2005, @03:47PM (#11435633)
      Yeah, but which mouse button do I use? Oh, never mind.
    • "Step 2: There is no step 2!"

      Depends. If you're running anything in KDE or Gnome, there's quite a few steps that Apple doesn't go into. I was quite perturbed to install KDE, have it start up successful, and get the Quartz WM trying to take it over (imagine KDE dialogs with Quartz close buttons). It took me a long time to figure out exactly what needed to be added to the .rc file to curb this behavior.
      • All you have to do it type fink describe bundle-kde | less

        To use KDE as your windowing system in XDarwin, create a file called
        ".xinitrc" in your home directory, containing the following line:
        .
        /sw/bin/startkde >/tmp/kde.log 2>&1
        .
        See http://fink.sourceforge.net/doc/x11/run-xfree86.ph p#xinitrc
        for more information on the xinitrc files and how they work.
        .
        If you want to use Apple's X11 instead of the KDE window manager,
        put the following line before the startkde line in .xinitrc:
        .
        export K

  • by datadriven (699893) on Friday January 21 2005, @03:33PM (#11435455) Homepage
    It won't be long before windows does this too...ow wait.
  • by digitalgimpus (468277) on Friday January 21 2005, @03:40PM (#11435536) Homepage
    IMHO this is a reaction to the announcement that no aquafied OpenOffice is planned [slashdot.org].

    Apple doesn't want people to think they are locked into MS Office (hope it continues to support Mac OS X).

    This way, Apple can say commercial grade alternatives do exist.

    Apple's products aren't bad... but lets face it, they target home and educational use. Not a business person who wants to occasionally work from home. Microsoft does have powerful software, despite being buggy and insecure.

    IMHO Open Office rocks. Wish Apple would invest in an aquafied port.
    • by Scrameustache (459504) on Friday January 21 2005, @03:46PM (#11435618) Homepage Journal
      IMHO this is a reaction to the announcement that no aquafied OpenOffice is planned.
      Apple doesn't want people to think they are locked into MS Office (hope it continues to support Mac OS X).
      This way, Apple can say commercial grade alternatives do exist.


      No, this is. [apple.com]
      • Where's the Excel replacement?

        Oh, there isn't one? Guess I'll have to wait for version 2, since iWork with spreadsheets every day and I haven't found a decent Mac spreadsheet app besides Excel. OpenOffice's spreadsheet program is non-native, ass-slow, and supports half as many rows as Excel does (32,000 versus 65,536). Gnumeric is even worse than OpenOffice at reading or writing Excel files, and it too is not Mac native.
    • by JJahn (657100) on Friday January 21 2005, @03:50PM (#11435674)
      To those who want an aquafied OpenOffice, please check out NeoOffice [neooffice.org]. They are working to make OpenOffice more MacOS native. Currently, they have removed the need for X11, put in Aquafied menus, and native printer and font support. Sure, its not perfect yet, but its getting there.
    • by richmaine (128733) on Friday January 21 2005, @03:55PM (#11435720)
      You pigeonhole them too much.

      As of OS-X, there is a *LOT* of interest in Apple systems as engineering workstations. That's what I'm using, as are many people I know. This mac replaced my linux box at work.

      The big interest in Macs as engineering workstations isn't exactly a big secret.... anyway not to anyone in the engineering field.

      Yes, there are also plenty of other platforms used. Still a lot of Sun/Linux/other boxes here as engineering workstations, and that isn't about to change in the near future. The Macs aren't suddenly taking over it all - but they are certainly now a significant player in that market.
    • Disclaimer: I am a developer for Mac OS X OpenOffice.org and a founder of the NeoOffice [neooffice.org] project.

      Well, as it turns out my update to the timeline was grossly misquoted in a couple of places. The update was really just to put things in perspective as to what was really going on in the various projects as well as to reinforce the importance of the X11 work. It was never intended to "cancel" anything since, well, there wasn't really anything to cancel. The update was just stating how things really are within the project.

      Today's article on eWeek [eweek.com] has some much better reporting on the progress towards 2.0 X11 and other issues that had been raised by my update. I highly recommend giving it a read as it's a bit more informative then the old /. comments in that thread.

      ed
  • by fm6 (162816) on Friday January 21 2005, @03:41PM (#11435545) Homepage Journal
    It's worth remembering that an X application doesn't have to run on the same system as the terminal. So even if you can't get the source code, you might be able to run the software, provided you're willing to spring for a Unix box the software supports. That might be useful for people who need commercial applications (such as FrameMaker) which are no longer available for the Mac, but is still supported for Solaris.
    • by sootman (158191) on Friday January 21 2005, @03:55PM (#11435723) Journal
      Or like when I ssh home (um, at lunch, right) and play Freecell. :-) Or run nedit, then go help -> about and see "Built on Linux, x86." Fun fun fun.

      In all seriousness, I guess the deal here is that it's a newer version than what ships as X11.app? 'About' says 'X11 1.0 - XFree86 4.3.0'. I know the '1.0' refer's to the fact that it's *Apple's* 1.0, but can someone who spends more time with X than I do explain the significance of X11R6?

      [later]

      OK, I just looked at TFA. The title of this summary is a bit misleading--this title is "Apple Explains How to Run X11 on MacOS" but the actual article's title is "Configuring and Running X11 Applications on Mac OS X" and in goes on to say "X11 for Mac OS X... includes the full X11R6.6 technology including an X11 window server, Quartz window manager, libraries, and basic utilities such as xterm." OK, got it. I think. Still not sure how R6 and 4.3.0 relate, but the main thing is, there is nothing new here. They're talking about the X11 that OS X ships with.
      • by drew (2081) on Friday January 21 2005, @05:02PM (#11436467) Homepage
        X11 is an open group specification that is implemented by XFree86, X.org, and a number of commercial X servers. R6.6 is the current version of that specification.

        4.3.0 is the version of the Xfree86 software that Apple ships with OS X, which implements X11R6.6.
      • by jsebrech (525647) on Friday January 21 2005, @05:23PM (#11436712)
        I know the '1.0' refer's to the fact that it's *Apple's* 1.0, but can someone who spends more time with X than I do explain the significance of X11R6?

        X11 is two things, a standard for windowing systems, and a series of implementations of that standard. X11, the standard, is developed by the X.org foundation, at www.x.org. The current base version of that is version 11, release 6, X11R6. Don't let the version 11 thing fool you though, X has been at version 11 since 1987, and likely will never get to version 12, which is why everyone just calls it X11.

        As for the implementations ... originally it was simply X11, developed by the X consortium. However, since they were slow to adapt to new platforms or technologies (notably the x86 platform becoming powerful enough to run unix), a spin-off project called XFree86 evolved (it's a bit more complicated, but then who needs details). They became the de-facto reference implementation of X11, even if they didn't have the honor of owning any of the X consortium IP (like trademarks and so on). However, the leadership of the XFree86 project a while ago decided that they would change the license in ways the community did not like. As a result, the last truly free version of XFree86 is 4.3, which is the code that Apple's X11 1.0 is based on. X.org was founded around the same timeframe to step into the void left by the XFree86 project's implosion, and they now develop the official reference implementation (currently X.Org X11R6.8.1). Likely, in the future, apple's X11 will be based on the X.Org code.
  • FINK (Score:3, Informative)

    by chadpnet (627771) on Friday January 21 2005, @03:44PM (#11435587) Homepage
    We have been doing this via fink for quite some time now. http://fink.sourceforge.net/
  • by Anonymous Coward on Friday January 21 2005, @03:45PM (#11435599)
    Apple's X11 implementation is based on the widely-used XFree86 project

    Is apple going to switch to X.org, since most everyone else has already? or are they sticking with XFree86 for the long run? What kinds of compatibility issues will develop as a result of that?
  • by Dark Paladin (116525) * <jhummel@johnhum m e l.net> on Friday January 21 2005, @03:48PM (#11435642) Homepage
    I rather like how the instructions talk about how to run X11 remotely, and the first thing they do is tell how to do it over ssh, with simple, easy to understand directions on how to do it. That is how "how to" manuals should be written.

    2 points to Apple for doing that, and making my coworkers jobs a little harder (they're penetration testers).
  • by sesshomaru (173381) on Friday January 21 2005, @03:55PM (#11435725) Journal
    If all you need is a word processor, there's a native version of AbiWord for OSX that seems to work great:

    http://www.abisource.com/ [abisource.com]

    I could never get OO to work on OS X, though I use it on my Windows Machine.

  • by soullessbastard (596494) on Friday January 21 2005, @03:56PM (#11435734) Homepage Journal
    Disclaimer: I am a developer for Mac OS X OpenOffice.org and a founder of the NeoOffice [neooffice.org] project.

    I happily noticed this myself earlier on in the week and was impressed to find the OpenOffice.org related section. Unfortunately there are some inaccuracies in the section, but I couldn't find any address to which corrections should be submitted.

    Perhaps the most major omission is that the OpenOffice.org Mac OS X (X11) installer is not limited to 10.3 only. In fact, it supports both 10.2 and 10.3. For 10.2 users it also will automatically install XFree86 and a window manager if the system does not have XFree86 on it. Since Apple X11 is not redistributable under its license, 10.3 users are required ot manually install Apple X11. Ironically, that makes installation on 10.3 more inconvenient then 10.2!

    On the trinity forums [neooffice.org] Smokey also noticed the file format "incompatibility" line in the article. It isn't actually true since OpenOffice.org is 100% compatible with StarOffice which, last I checked, is a commercial office suite even if it doesn't run on Mac OS X :)

    Even with the little foibles, it's great to see support from Apple for X11 applications in general as well as a basic introduction that can help open up the entire world of X11 OSS applications for users, not just OpenOffice.org.

    ed
  • by figlet (83424) on Friday January 21 2005, @03:57PM (#11435740)
    In the section "Which Machine Is the Client?", they completely mess up the explanation. What is wrong with just saying "The X server is a display server. X applications are clients (running on your machine or another machine) which request the server (which may be running on your machine) to do something ("draw a line", etc)."
    • In the section "Which Machine Is the Client?", they completely mess up the explanation.
      Heck, I'd say they completely mess up the question. It makes more sense if you ask, "Which process is the client?" Since most people run the server and clients on the same machine (at least on Unix workstations), their question can only lead to confusion.
  • by VAXGeek (3443) on Friday January 21 2005, @04:20PM (#11435990) Homepage
    If you want OpenOffice on OS X, help make one of the NATIVE ports more popular by using it. NeoOffice/J [neooffice.org] It's a totally native client that uses Java to render the UI. (Native Java? These are strange days.) Please help keep X11 apps off OS X.
    I realize we're stuck with X11 on Unix, but if you're sitting on top of Quartz, might as well use it, no?
  • The Apple article was helpful and all but there are guys who have been working on the XFree86 port for a long time, like since 2002 or something, so if you need a place to get answers to running X apps on OSX, keep an eye on www.xdarwin.org/forum [xdarwin.org]
    • Re:unix? (Score:5, Interesting)

      by pclminion (145572) on Friday January 21 2005, @03:37PM (#11435493)
      Yes, Mac OS X is based on BSD. This doesn't necessarily mean that UNIX software will compile and work unmodified. As an example, my company makes products that run on Windows as well as various UNIX variants, including HP-UX, Solaris, Irix, BSD, various SysV-like systems, etc.

      Believe me, you do not want to see what the Makefiles for a piece of software like that look like. We're talking about the era before GNU-style "configure" scripts and Makefile modularity. It's hideous. But it works. And it makes the differences between the various UNIX platforms as clear as day.

      Right now, I'm in the middle of porting our main project to run on OS X, so this article is very timely. To be honest, I anticipate that the majority of the difficulty will be in getting the make system to run correctly, and possibly fixing a number of linker issues. I expect that the code itself will work almost unmodified.

      • Horrible makefiles haunt my dreams. I've had nightmares about them...
          • Re:unix? (Score:4, Interesting)

            by Space cowboy (13680) on Friday January 21 2005, @11:37PM (#11438998) Journal
            I've done this sort of thing before - had to have things that run under linux, Irix, SunOS, and windows. It's not really hard as long as you start out with the idea that things are going to be system-dependent. I had directories with Makefiles in that called directories (some ours, some 3rd-party) Makefiles etc. etc. You just need to put the thought in ahead of time.

            My solution was to have the top-level Makefile set a variable based on running the 'uname' command, and then 'include' the definitions that worked for the platform, based on the variable name (we were running gcc and gmake on all the platforms, although the windows one was cross-compiled under Linux. Believe it or not, this was easier!)

            So, CC, CXX, JAVA, LD, RM, AR, RANLIB
            etc. etc were all defined within the platform-specific file, and the main Makefile looked pretty clean. All you have then are the #ifdef statements in the source code. It did get to the point where for one project we simply had different source code for the Windows variant, and the platform-specific Makefiles copied the correct file into place before trying to compile the module in question...

            Looking back at the posts I'm making on /. these days leads me to believe I've become an old fart. Oh well. Happens to the best of us [grin]

            Simon.

    • I don't think Apple is embracing it. They're providing compatibility to a clunkier interface but that opens them up to the zillions of unix/linux apps available. Most of the software that runs in X11 wouldn't be considered competing packages.
    • X11 is the protocol. XFree86 is the implementation that nobody likes anymore due to the change in license. X.org is the implementation that everyone is moving to. There are a number of other implementations.

      Apple committed to XFree86 long before they changed the license. They may move to X.org as that implementation gets better features.
    • X.org is an implementation of the X11 protocol. X11R6 is the 6th revision of the X11 protocol. There was supposedly an X10 protocol before X11. What people have begun abandoning is XFree86, and not everyone is leaving it. I think NetBSD still uses it.
    • X11R6 is the protocol used, not the implementation. The XFree86 project was a popular project to implement the X11 protocol on 8086 machines. Because of politics, the X client/server was branched by x.org (as the source code was open), so a different development style could be done (and from what I understand many of the people from the XFree86 project switched to x.org as well). There do exist other implementations of X11 that cost money, but at least in the past advertised better performance.
    • Hey now, that didn't deserve an offtopic. I bet I'm not the only one that misunderstood the difference between a protocol and an implementation of that protocol. Anyway it's still relevant because Apple may use XFree86 or X.org, and that was kinda my original question.

      But seriously, thanks for clearing that up. All 12 of you.
    • by learn fast (824724) on Friday January 21 2005, @03:49PM (#11435657)
      and their X11 is OpenGL native. So, rendering is fast as hell.
    • Do they really need a step by step..

      Why shouldn't they? Macs appealed to all different types of users including the lowly n00b that didn't want to know anything about their machines.

      A step by step guide (including how to do it all over SSH) is a great way to bring the information to ALL their users.

      OS X has been running X11 for quite some time. It's just now that there might be a need for all their users to get access to it.
    • Disclaimer: I am a developer of Mac OS X OpenOffice.org and a founder of the NeoOffice [neooffice.org] project.

      If the X11 server was preloaded onto all Apple systems, it would also solve quite a number of distribution problems for OpenOffice.org and other X11 applications. The license for Apple X11 doesn't allow third parties to bundle it and redistribute it. That makes it really frustrating from an installation perspective. Instead of being able to automatically install the X11 server (like we do using XFree86 for 1
    • Re:Interesting move. (Score:5, Interesting)

      by displaced80 (660282) on Friday January 21 2005, @05:17PM (#11436637)
      I think you're over-estimating the animosity between MS and Apple, if indeed there's much at all.

      Of course, they compete with eachother, but what you describe doesn't sound like my interpretation of Apple and MS's behaviour.

      The Macintosh Business Unit at Microsoft have a very close relationship with Apple. They're not just some MS developers who've been told to bash out some Mac knock-offs of Windows software. They're all long-time Mac developers who want to make the best Mac software they can. The spin-off of the MacBU to a separate division meant that they could work on making Mac software, not Windows ports. As this [macworld.com] article explains, before the creation of the MacBU, the Win & Mac versions of Office shared 80% of the same technology. The result? Shoddy, un-Maclike software which no-one liked and few bought. The MacBU now works every bit as closely with Apple's technologies as it does with MS's.

      Office:Mac (both v.X and 2004) are very nice programs. They're not perfect, but they bring a very usable, feature-rich, Mac-specific Office suite to the platform.

      Apple would not benefit one single bit from making the MacBU's software unprofitable for Microsoft. iWork is not a replacement for Office. Keynote's a very nice alternative to PowerPoint, sure. But one app does not an Office-suite make. Pages is clearly not in the same space as Word. If you need Word, you won't buy/use Pages. If you don't need Word or can't afford Office, Pages is a sensible choice. If Pages is aimed at those who don't need or won't buy Office, it's hardly a competitor, is it?

      Just as Pages is not a drop-in replacement for those who need Word, any rumoured spreadsheet app will not be a drop-in replacement for those who need Excel.

      Apple aren't in the business of making 'temporary, difficult alternatives'. They're about fulfilling user's needs (with the caveat that, like all corps., they don't always get that right!).
    • by Yosho (135835) on Friday January 21 2005, @11:47PM (#11439051) Homepage
      To expand upon what canon006 said, by default the "root" account is disabled in OS X. For security reasons, it's not recommended that you enable it unless you really, really need it. If you need to run a command as root, you can type "sudo [command name]", and when it asks for a password, type in your own password, assuming your account is considered an Admin account in the system preferences.

      By the way, if you're new to OS X, I'd recommend checking out Fink [sourceforge.net]. It's basically a package manager for UNIX software that is known to compile on OS X; it works somewhat like Debian's apt-get (it uses the .deb package format, even). If you're a long-time Linux user, there are probably a lot of little programs in there that you'll find useful.