Fink

Running X11 - 3. Getting and Installing X11

3.1 Installing X11 via Fink

Fink will let you install X11 in a variety of ways, among these it provides XFree86 packages of its own. If you use fink install ..., it will download the source code and compile it on your computer. If you use apt-get install ... or the dselect frontend, it will download precompiled binary packages, similar to the official XFree86 distribution.

General notes:

10.4 users:

You can install XFree86 version 4.5.0-23 from source. You will need both the xfree86 and xfree86-shlibs packages to have a fully functional installation.

You can also install the X.org X11 release (currently version 6.8.2-35) via the xorg and xorg-shlibs packages in the unstable tree. This X11 flavor is similar to XFree86-4.5, but includes some bugfixes and new features, and removes some code with a disputed license.

10.3 users:

You can install XFree86 version 4.4.0-13 (that which is in the current binary distribution) or 4.5.0-13 (which is available from source). You will need both the xfree86 and xfree86-shlibs packages to have a fully functional installation.

You can also install X.org-6.8.2 via the xorg and xorg-shlibs packages as above.

10.2 users:

10.2 users may install version 4.3 via source or binary, and 4.4 from the unstable tree. As above, you'll install xfree86 and xfree86-shlibs.

XFree86 4.2.1.1 is also available for 10.2, in normal and -threaded flavors (later X11s all have threading support), though it is considered to be obsolete. The xfree86-base, xfree86-base-shlibs, xfree86-shlibs, and xfree86-rootless-shlibs packages (or their -threaded counterparts must all be installed for you to have a working XFree86 setup. In addition, you may need to install the xfree86-base-dev and xfree86-rootless-dev packages (or their -threaded equivalents) to keep Fink from trying to install a newer version.

10.1 users:

You can install version 4.2.0 from the binary distribution (only). You will install xfree86-base and xfree86-rootless.

3.2 Apple's Binaries

On January 7, 2003, Apple released a custom X11 implementation based on XFree86-4.2 which includes Quartz rendering and accelerated OpenGL. A new version was released on February 10, 2003 with additional features and bugfixes. A third release (i.e. Beta 3) was made on March 17, 2003 with further additional features and bugfixes. This version is usable on Jaguar.

On October 24, 2003, Apple released Panther (10.3), which includes a release version of their X11 distribution. This version is based on XFree86-4.3.

On April 29, 2005, Apple released Tiger (10.4), which includes a release version of Apple's X11 based on XFree86-4.4.

To use the Apple binaries, you need to make sure the X11 User package is installed, and you should also update Fink.

Under fink-0.16.2, you will need to install the X11 SDK package, as well. After you do this, Fink will create a system-xfree86 virtual package.

Under fink-0.17.0 and later installing the X11 SDK is only necessary if you want to build packages from source. In this case, even if you don't have the SDK, there will be system-xfree86 and system-xfree86-shlibs virtual packages, the latter representing the shared libraries. If you do install the SDK, there will also be a system-xfree86-dev package, representing the headers.

If you have an existing XFree86 distribution installed, be it through Fink or otherwise, you can follow the instructions on replacing one X11 package with another. Make sure that you remove your existing packages, then install Apple's X11 (and X11 SDK, if needed or desired).

Some notes on using Apple's X11:

For more information on using Apple's X11, check out this article at the Apple Developer Connection.

3.3 The Official Binaries

The XFree86 project has an official binary distribution of XFree86 4.5.0. You can find it on your local XFree86 mirror in the directory 4.5.0/binaries/Darwin-ppc-6.x (or 4.5.0/binaries/Darwin-ppc-5.x for OS 10.1). Be sure to get the Xprog.tgz and Xquartz.tgz tarballs even though they are marked as "optional". If you're unsure what you need, just download the whole directory. Run the Xinstall.sh script as root to install the stuff. (You might want to read the official instructions before installing.)

You've now got XFree86 with a server that can do fullscreen, or rootless under Mac OS X.

3.4 The Official Source

If you've got the time to spare, you can build XFree86 4.5 from source. You can find the source on your local XFree86 mirror in the directory 4.5.0/source. Grab all seven XFree86-4.5.0-src-#.tgz tarballs and extract them in the same directory. You can customize the build by putting macro definitions in the file config/cf/host.def in the XFree86 source tree. See config/cf/darwin.cf for some hints. (Note: Only the macros that have an #ifndef check around them can be overwritten in host.def.)

When you're happy with your configuration, compile and install XFree86 with the following commands:

make World
sudo make install install.man

As with the official binaries, you've now got XFree86 with a server that can do fullscreen, or rootless under Mac OS X.

3.5 The Latest Development Source

If you have not only time, but also some nerves to spare you can get the latest development version of XFree86 from the public CVS repository. Note that the code is under constant development; what you get today is usually not the same as what you got yesterday.

To install, follow the XFree86 CVS instructions to download the xc module. Then, follow the source build instructions above.

3.6 Replacing X11

If you have already installed one of the Fink X11 packages but for one reason or another have decided you need to remove one and replace it with another, the procedure is pretty straightforward. You will have to force a removal of the old packages, and then install the new, to keep your dpkg database consistent.

There are two different ways to do this:

  1. Use FinkCommander

    If you are using FinkCommander, you can force removal through the menu. For example, if you have xfree86-rootless installed, but want the threaded version, you can select your xfree86-rootless, xfree86-rootless-shlibs, xfree86-base, and xfree86-base-shlibs packages, and then run:

    Source -> Force Remove
  2. Manually Remove from the Command-Line

    To manually, remove them, you use the dpkg with the --force-depends option, like so:

    sudo dpkg -r --force-depends xfree86-rootless\ 
    xfree86-rootless-shlibs xfree86-base xfree86-base-shlibs

    Note that if you have apps that require threaded XFree86, you may have trouble with your dpkg database if you force remove it and install a different XFree86 package or placeholder package.

If, on the other hand, you have an X11 version that was not installed via Fink, you'll need to remove it via the command line:

sudo rm -rf /usr/X11R6 /etc/X11

The above holds true for removing any flavor of X11 that you didn't install through Fink. You will also need to remove XDarwin.app | X11.app, depending on what you had installed. Make sure to check your .xinitrc if you are removing Apple's X11 to make sure that you aren't trying to run quartz-wm. You can now install whatever new X11 variety you want, manually or via Fink.

3.7 Fink package summary

A quick summary of the install options and the Fink packages you should install:

Install TypeFink packages
XFree86-4.4.0 or 4.5.0 (10.3 and 10.4)

xfree86 and xfree86-shlibs

X.org-6.8.2 (10.3 and 10.4)

xorg and xorg-shlibs

Apple's X11 (all versions)

system-xfree86 and system-xfree86-shlibs (+system-xfree86-dev for building X11-based packages)

XFree86-4.x official binaries

system-xfree86 and system-xfree86-shlibs (+system-xfree86-dev for building X11-based packages)

XFree86-4.x built from source, or from the latest CVS source

system-xfree86 and system-xfree86-shlibs (+system-xfree86-dev for building X11-based packages)

XFree86-4.2.1.x (10.2 only) or 4.2.0 (10.1 only)

xfree86-base and xfree86-rootless (and their -shlibs)

or xfree86-base-threaded and xfree86-rootless-threaded (and -shlibs)

Next: 4. Starting X11