Using X11

From Mac Guides

Jump to: navigation, search

X11 is a cross-platform windowing environment, popular on UNIX systems. Mac OS X has had an X11 implementation since Panther, though not through a default install.

Contents

Installation

Since X11 is not installed by default, it may need to be compiled and installed on your machine.

From the DVD

Image:Tiger_small.jpg

This tip requires
Mac OS X Tiger

From the Mac OS X Tiger Install DVD:

  • Scroll down below Xcode Tools and double click on "Optional Installs.mpkg"
  • After the usual intro steps, and selecting the installation drive, expand the "Applications" option.
  • Choose X11 and continue with the Installation.

The X11 application will be installed in /Applications/Utilities/.

From Source Code

This section details how to download, compile and install X11 from the source code. It requires limited knowledge of the Terminal.

  • Download the source code (about 60 MB).
  • Unarchive the source code, usually by double clicking it in the Finder, or "tar xvf X11ForMacOSXSource-1.0.tar.gz" from the Terminal
  • cd to the "xc" directory.
  • Type the following and wait for it to build (over half an hour on most machines):
 make World
  • Type in the next two commands to complete the installation
 sudo make install
 sudo make install.man

Using X11

The X11 application in /Applications/Utilities/ is basically the X11 environment, which runs most of the myriad of X11 applications, such as xterm, xload or even xpilot. A popular choice on OS X for obtaining X11 applications is via fink, and more easily through FinkCommander. FinkCommander works with the fink server to provide an enormous list of applications (1,766 at the time of this writing).

Here is a brief list of applications:

  • Inkscape (a drawing application, like Freehand)
  • Gimp (a paint application, like Photoshop)

An Example with xpilot

This section illustrates how to install and run the X11 game xpilot, a multiplayer space dogfight game very similar to Asteroids. It should be relatively straight forward, but be warned that doing anything with X11 diverges from the "easy to use" Mac OS X experience. Many applications (such as Gimp and Inkscape) are self-contained and appear like regular Mac OS X applications form the Finder, but most are simply unix commands that happen to use X11 to display in a window.

  • Make sure X11 runs, by opening /Applications/Utilities/X11.app. (by default, it's "Applications" menu contains xterm (a Terminal application) and xlogo (a program that displays the X11 logo and that's it).
  • Install fink and FinkCommander, and open FinkCommander.
  • Search for "xpilot" in FinkCommander's application list (after it updates with a list of applications)
  • Install xpilot, by clicking on the "install" icon, which looks like a generic application icon with a blue plus sign (far left on menubar).
  • Open the Terminal (or use xterm from X11's application menu) and type (without the $):
 $ cd /sw/bin
 $ xpilot &

xpilot should now be running in it's own window, and you will have the option to connect to an internet xpilot server where you can shoot and kill people you never met.

See Also