Skip to content

X11 on the Mac

Introduction
I tried to install the first beta of Apple's X11 as soon as it came out. I'm not ashamed to say I couldn't get it working. Actually, I didn't try all that hard. It's widely known to my friends and foes alike that I'm command-line averse. Sure, I know my way at least halfway 'round the Terminal -- heck, I was hacking away at an Amiga's command-line interface prompt before most Mac users even dreamed of having one! -- but, truthfully, the whole reason I started using the Mac in the first place was to leave the dark world of DOS prompts and the like as far behind as possible. Thus, when my earliest attempt at an X11 install started to turn ugly, I bailed. X11, at that point, was (and, to a certain extent, still is) tricky to install, even trickier to configure and, well, it was an early beta -- it was known to have certain flaws.

However, with the release of beta 3 of X11 in the Spring of 2003, I thought it might be time to give it another try. I'm happy to report I was far more successful this time, and the setup process has been refined enough that you will probably be able to do it, too. It still requires a few commands to be typed into the Terminal here and there, but it's far better documented now. It's worth a try, especially if the idea of having access to free programs roughly comparable to Adobe Photoshop and Microsoft Office appeals to you. That's the payoff: after you've got X11 installed and configured, you'll have access to a huge library of new software -- make that new, FREE software.

A few of the titles you might want to download after you get Apple's X11 up and running:

  • GIMP - an open-source photo and image editor bearing more than a passing resemblance to Adobe Photoshop.
  • AbiWord - an open-source word processor that reads and writes Microsoft Word files -- and looks almost exactly like Microsoft's program.
  • FilmGimp (also known by its new name, CinePaint) - a 16-bit image editor optimized for painting directly on frames of video and other image-processing tasks.
  • GTK-Gnutella - If you're into peer-to-peer file swapping, this is an excellent, easy-to-use client with access to far more content than that accessible by the Mac-native LimeWire.
  • X-CD-Roast - A CD burning package capable of writing standard ISO images, multisession discs, etc. It supports a wider array of drives than Apple's Disc Burner.

Getting Started....
First, you'll need to download Apple's X11 ("X11UserForMacOSX.dmg") at http://www.apple.com/macosx/x11/download/. This is a fairly large file -- about 42MB -- so you'll want to do this from somewhere there's a high-speed internet connection, if possible. Installation is straightforward, as long as you know the password for your system and you're running the right version of Mac OS X. (I was running 10.2.4.)

Next, you should download Fink, a package manager that makes X11-based programs a lot easier to install. Read the Fink instructions carefully, and follow them exactly. If you don't, you probably won't get any further than this. (Note, also that the Fink FAQ warns that Virex versions issued prior to v7.2.1 are incompatible with Fink, apparently due to the Virex folks having made errors in the way they set things up.)

After running Fink once (by typing fink into the Xterm window), I realized that its text-based display left a lot to be desired. I mean, typing sudo apt-get install gimp (or whatever) into a terminal window might be your idea of awesome power, but, as I mentioned, I'm more of a point-and-clicker, myself. I downloaded and installed FinkCommander. This program turns Fink into a graphical package browser that's much more user-friendly. It, too, has a read me you should read carefully and a one-time-only setup procedure that you must follow exactly in order to get it working. MacOSHints.com has a brief summary.

From here, you can select and install X-based packages with ease. For example, I typed gimp into the "Name" search dialog in the upper right-hand corner of the FinkCommander window and the (long!) list of available packages suddenly shrunk down to only those that matched my search criterion. (For the curious, this is equivalent to the Fink command fink list gimp <return>.) I right-clicked on the name "gimp" and selected the option to view the package info. Alternately, you can click the blue "information" button to open up a panel that displays the details for every package you scroll across with your mouse or keyboard. After deciding to install it, I simply clicked the first icon in the FinkCommander toolbar, labeled "install binary package(s)." A few minutes later (actually, it took longer than I expected), GIMP, the GNU Image Manipulation Package, was installed and ready to run. Typing "gimp" <return> into the X term window invokes the program's setup wizard.

Exactly the same procedure is employed to select and install any other X application you desire. For example, I typed "word," which brought up the abiword package and a few others. One click to select "abiword" and another to invoke the "install binary packages(s)" command, and it's underway. After the installer (which, by the way, automatically loads all required libraries and other dependencies) has done its work, you are ready to launch it. To do this, you simply open an Xterm terminal window and type "abiword" <return>

Simply!? I don't know about you, but I hate it when computer gurus assume that every idiot in the world knows how to perform this-or-that obscure procedure. "Just" do this; "simply" do that -- it drives me crazy when the result they're talking about requires a step they gloss over, that I can't figure out how to get to. So, "just" to be clear: this terminal window, into which these X11 application launching commands are typed, is listed as "Terminal" in the X11 Applications menu. If X11 isn't running, you won't be able to see it. Thus, you may have to double-click X11, found in your OS X Applications folder, in order to get to it. Typing X11 commands into the standard Mac OS X "Darwin" terminal window doesn't launch the required display environment most X11 programs need to work.

If the idea of typing a command to launch a program is unsavory to you, it is possible to create a small AppleScript that will invoke the app when launched. I couldn't get the one at Mac OS Hints to work as published, but a slight variation does the trick.

tell application "Finder"

launch application "X11"

end tell

set results to do shell script "cd ~; DISPLAY=:0.0; export DISPLAY; PATH=$PATH:/usr/local/bin; export PATH ; /sw/bin/gimp > /dev/null 2>&1 &"

To create an executable application from this AppleScript, open the Script Editor and paste the above code into the bottom window, then select Save As... and select "Application" from the pop-up list of choices. Note that this example script launches gimp; you'll want to change the name of the application to whichever X11 app you're trying to run before saving. Once saved, you can simply double-click the icon to launch gimp and, if necessary, the X11 environment. Or, drag it to your Dock and launch it with a single click.

That's not so hard, is it?

For Further Reading
(external links are beyond our control)

  • CreativeMac.com: Film Gimp in an X11 World - Installing and configuring the 16-bit image editor on your Mac
  • Macfora.com: How to install KDE on Mac OS X and other topics relating to OS X Unix
  • Misplaced.net: The X11 for OS X unofficial FAQ
  •  

See also:

  • http://fink.sourceforge.net/news/kde.php
  • http://www.ourpla.net/guiunix/GettingXGoing.html

Comments

Post new comment

Image CAPTCHA
Enter the characters shown in the image.