oreilly.comSafari Books Online.Conferences.


AddThis Social Bookmark Button

From Exile to X11: A Journey Through Time

by Dan Benjamin

The Mac began its life as a creative tool geared toward designers, desktop publishers, writers, artists, educators, and people new to computers. Because of its simple, direct, and consistent interface, non-technical people who thought they didn't like or couldn't use computers found they could become proficient--even accomplished--Mac users in no time flat.

Over time, the Mac became the de facto standard for the creative and education industries, heralded as the computer that even your grandmother could use. In response to this perception, and perhaps because of it, Apple and people developing for the Macintosh continued to create software for this audience, and for these types of users.

All the while, PCs were seen as business machines, devices used by people wearing suits and sitting in cubes. It's no wonder that PCs were quickly adopted in the enterprise. When people needed an inexpensive network management console, dumb terminal, or X Station (things rarely found in a two-person graphic design shop), the PC was already right there, in the enterprise and on the users' desks. So that's what was made to function.

The Penguin and The Devil

Unlike proprietary versions of UNIX which were expensive and required special hardware, Linux and FreeBSD could run on any PC around, even (and perhaps especially) on old, unused hardware that was available for experimentation. IT folks everywhere were the first to adopt these free operating systems, experimenting with them in darkened server rooms. While management scoffed at this new, unproven technology at first, we were on the eve of gigantic change across the enterprise.

Change came in many forms. Some companies switched to open source platforms to save money, others just to keep up with the competition. Eventually the change would come to even the most old-fashioned corporate IT organizations, sometimes even by accident. Say the UNIX web server fails catastrophically at 2AM and, in a last ditch effort to save the day, IT support swaps over an old PC running FreeBSD to take over serving the corporate web site--and realizes it's faster, more stable, more reliable, and free.

Meanwhile, the network landscape itself was changing. Mainframes, hulking beasts, began to go the way of the dinosaur, replaced by less costly and more nimble UNIX-based client/server systems that featured the X Window System, a graphical user interface that worked consistently across most UNIX operating systems. The X Window System (usually referred to as "X11") allowed applications running on one machine to display on another. The network manager could sit at her desk and command visual applications running on machines anywhere across her network--or the Internet.

And rather than spend many thousands of dollars on a full-fledged UNIX system to connect to her remote systems, she can simply install Linux or FreeBSD on her desktop machine, and she has all of the access and all of the utilities and tools she needs.

Unfortunately, while most open source operating systems have good reliability and (thanks to KDE and Gnome) decent user interfaces, they lack the support of commercial applications like Photoshop, Office, Dreamweaver, and other tools that are invaluable when working in the corporate environment. They also lack the acceptance and ease of use that Windows has in the corporate arena.

Enter Mac OS X

When Apple purchased NeXT, it inherited NeXT OS--a true UNIX operating system, which, combined with FreeBSD and a completely new GUI, became Mac OS X. Every Mac running OS X has, behind the scenes, a true UNIX operating system, with all of the power and capability of a Linux, FreeBSD, or UNIX server found in an enterprise datacenter, but hidden away behind a smooth, easy to use interface.

Want proof? Just run Terminal (located in /Applications/Utilities) and you'll be greeted with a command prompt--just like any good UNIX system. Interestingly, many people think of Terminal as "an application that lets you type commands." In a way, this is true, but it's useful to think of Terminal as a window into the true operating system itself. In fact, it is the GUI you're used to seeing (windows, mouse, graphics) that is the application, and the white text on a black background that is truly the interface.

Related Reading

Mac OS X in a Nutshell
A Desktop Quick Reference
By Jason McIntosh, Chuck Toporek, Chris Stone

These UNIX underpinnings are what allow Macs to run Apache, PHP, and MySQL--champion applications of the open source UNIX movement. In fact, almost any Linux or UNIX application made can run on or be compiled for OS X, including the X Window System itself.

Running X11 applications alone isn't a big deal. In fact, it may seem unimportant to the average Mac user. But if Macs are to become a success in the enterprise, supporting X11 applications is critical. This is because many servers in datacenters are run "headless," meaning they have no keyboard or monitor attached. This means that all graphical applications, such as Gimp, CVSup, Mozilla, Oracle's installation and management tools, and many other applications require an external X Window system to be used. In the past, this meant that you needed to either maintain a separate UNIX or Linux system just for this purpose, or you needed to run an X Window Server on your Windows system--an expensive affair (decent X Window servers for Windows cost upwards of $600 per seat).

What Is the X Window System?

X11 provides developers with a way to create graphical applications that can run on any UNIX or UNIX-like system, such as Linux, FreeBSD, or Sun Solaris. In fact, this is the only way to make a graphical application for a UNIX system. When a developer creates an X11 application, she knows it's going to work on just about every UNIX system out there--and now, thanks to Apple's recent release of X11 for Mac OS X, thousands of existing X11 applications will run on OS X as well.

This is because Mac OS X is (beneath that pretty Aqua interface) a true UNIX system, with all of the power and capabilities that implies. This is why so many UNIX applications, like Apache, MySQL, PHP, run on Mac OS X.

You can think of X11 as an application that tells Mac OS X how to display the windows, buttons, and widgets found in an X11 program. After you launch the X11 application, you can run any existing X11 application around. One of the benefits of running X11 applications on OS X is that they inherit the Aqua GUI and, if your Mac supports it, can take advantage of Quartz rendering for speed and reliability.

And there's one more thing that makes the release of X11 for OS X really important. X11 is more than just an application--it's also a protocol, a way for machines to talk to each other. Once you're running X11 on your Mac, you'll be able to launch X11 applications on any UNIX machine on your network (or across the Internet) and have them display on your Mac as if you were running them locally. Imagine launching an application on a Linux server in Houston and watching the interface appear on your Mac's screen in your Miami office as if it was running on your own machine. Pretty powerful stuff. But I'll get to that in the companion article, "Hands on X11."

Dan Benjamin is a business strategist, programmer, writer, interface designer, and photographer.

Return to the Mac DevCenter.