|
Fink & XDarwin Platform: Mac OS X Level of Difficulty: Intermediate Rutgers Main | OIT Main | NBCS Main | NBCS Documentation Main This document describes how to install XDarwin on Mac OS X with Fink. It covers the following topics:
BackgroundMac OS X is based on Darwin, which is a version of the BSD Unix operating system. Unix operating systems use software which can be installed by a variety of methods. The traditional way to install software on a Unix system is to download the source code, compile it, and then install it on your system. Installing software in this manner can be a good learning experience, but it introduces the following problems:
One way to avoid the above problems is to use a package manager.
A package is a collection of software, which usually contains all
of the files necessary to implement a set of related commands or
features. For example, if you want to install the
apache web server on your system
and if you are using a package manager, you would want to find
the 'apache web server' package and then tell your package manager
to install it, as opposed to
downloading
the source code, compiling it, and installing it.
One package management tool that solves the dependency problem nicely is called apt-get, which was developed for the Debian GNU/Linux operating system. Debian has a tool called dpkg which is similar to RPM, in that it can be used to install binary ".deb" packages (as opposed to ".rpm" packages). However, Debian's package manager has a higher level command called apt-get, which manages dependencies based on packages, not files. Some have said that apt-get is the greatest thing since sliced bread! If you want to install a package on a Debian system all you have to do (assuming that things are configured correctly), is figure out the package's name (this could be done using Debian's website) and type apt-get install x (where x is the package name). Apt will fetch the package (from a CD-ROM or across the internet over http or ftp, so that no special protocol is needed) as well as the packages that it depends on and make it work. In addition to solving all four of the above problems, apt can be used to upgrade all of your packages to the latest version with one command (apt-get upgrade). Luckily, Fink (the package manager that runs on Mac OS X) is based on Debian's package manager and offers the same features. Fink is easy to install. Point your browser at the following URL: http://fink.sourceforge.net/download/
The above page will have you download a simple disk image file (.dmg)
and offers simple instructions on how to install it. Once you have Fink
installed, installing XDarwin is easy.
XDarwin can be thought of as XFree86 with two additional libraries. Thus, to install XDarwin from source you need to download the XFree86 source along with the Xprog.tgz tarball (which provides dynamic libraries that XDarwin needs) and the Xquartz.tgz tarball (which is required if you want to run X and Aqua simultaneously, i.e. rootless).
Instead of installing XDarwin from source (and risking the problems
that were discussed above), we will simply install the
Fink xfree86-rootless package. To do this we type:
After executing the above command Fink will go and get a copy of an XDarwin binary package and install it on your computer. The apt-get install command should look familiar given the discussion above and xfree86-rootless is simply the name of the package. The sudo command is a way to delegate administrator, or root power to the command that it is is followed by it. Only those in administrator's group can use sudo, which comes from OS X's BSD heritage. Fink should be run with the sudo command since only the administrator should be able to install software. For further information on Fink see the Fink Documentation. When the package is finished installing, try running XDarwin. In the Mac OS X Finder, double-click on the XDarwin icon, or open a terminal window and type "startx -- -quartz". Your screen will be temporarily blanked by XDarwin. If this is your first time running XDarwin you should be sent back to the Mac OS X desktop. Where you should see that there is a button in the XFree86 window on the desktop, which will be labeled "Show X11". If you click this button, X11 will take over your screen and display things according to your .xinitrc file. We'll cover the details of this file later. To return to the Mac OS X desktop, press command-option-A. To return to X, select the XDarwin icon in the Dock. To quit X Windows click on XDarwin in the Dock and quit as you would any other application.
X might not look like much at first all it provides is the display and
management of graphical information. This is because it is not a window
manager. A window manager is a separate program that controls the window
frames (title bar, close button, etc.) on top of X. We will install
the 'Window Maker' window manger next.
We will use the
Fink windowmaker Package. To install it, simply type:
When apt is done installing the windowmaker package, you should configure
your .xinitrc file to run Window Maker. An .xinitrc file is
a file that sits in your home directory that is executed when X starts.
For more information on .xinitrc see
this.
Use your favorite text editor so that the following becomes the last
line of your .xinitrc:
The above line tells X to execute the command wmaker, which starts Window Maker. The /sw/bin/ directory is where Fink will install this command. Now that we have a window manager installed we can start XDarwin. As mentioned before, go to the Mac OS X Finder, and double-click on the XDarwin icon, or open a terminal window and type "startx -- -quartz". Window Maker should then start. For documentation on how to use it, see the Window Maker Website. If you want to change the look of Window Maker you can go to freshmeat.net and download a collection of Window Maker themes. If Window Maker and X installed you can also make use of some great free software, such as The Gimp and AbiWord. All you have to do is use Fink to apt-get them!
jfulton@nbcs.rutgers.edu
|