Jens Nöckel's Homepage

Computer notes home

How to set up a G4 Mac to use with X

Set up the Mac OS X environmet

This page is quite outdated (last update was in 2004). More recent information is linked from the main menu page.

Here I follow the defaults - i.e., there are no special settings necessary to prepare the OSX system for the next steps. In particular, the file system that should be used is HFS+ (not UFS, even though that would at first glance seem more logical ...).

Install Developer Tools

Jaguar (Mac OS X version 10.2.x) is assumed here. For old notes pertaining to pre-Jaguar Mac OS X, see here. Get the most recent version of the Development Tools from Apple. When I type cc --version, I get 3.1 for my compiler.

The software installs the essential prequisites, most importantly the cc compiler.
This can be done from the CD that comes with the computer. Alternatively, download this package from the Apple site: You have to log in (or first sign up) as a member of the ADC (Apple Developer Connection). all this is free of charge. Make sure you don't get an older version of this software!
In this and the following installation, the software comes as a package (.pkg) which is installed by double-clicking. Enter your password (assuming you are the user whose name the computer recognizes as its boss...).

Install XFree86

This is the XWindows server which you need in order to run things like Xemacs etc. Download it from and click to install.
The alternative way of downloading this via fink (see below) also works. For historical reasons, I downloaded the pre-compiled version as suggested here.

Install an easy-to-use window manager

I am using the Orobor OSX manager which can be downloaded from
It allows Mac OSX and Xwindows to coexist on the screen, provided you follow the instructions (click on the interleave command ...)
I then made the following modification to the system: when Orobor OSX is running, go to the menu and choose "Edit Startup Items". At the end of the file that opens, I inserted
Run initrc

before the lines

Then I edited the file ~/.xinitrc to contain the line
xmodmap -e "remove Mod1 = Alt_R"
as the second-to-last line. It may happen that you get an error message on starting up OroborOSX, saying "Failed to launch Startup Item". This can be resolved by typing
chmod 755 .xinitrc

Get the Fink porting software

This allows you to download all the UNIX applications you'll ever need. Get the file "Fink 0.5.x Binary Installer" from the page and install it, following the instruction on that page. There are different instructions on that page, depending on whether you are a new fink user or have used fink before upgrading to Jaguar. Make sure you follow the appropriate link!

If you are new to fink, it may be useful to use a graphical user interface rather than the command-line version which I am using. The GUI, called Fink Commander, is available from One departure from the fink instructions: I actually included "source /sw/bin/init.csh" in my .tcshrc file, not in .cshrc because the MAc runs tcsh by default. If you're sure you don't have and won't need a .tcshrc file, then you can ignore this modification.

Install software

In the Terminal application, open a new window to initialize the shell. Then start by typing the following commands:
fink install system-xfree86
fink install tetex

The sudo command is essential (it requires you to enter your password) so that the installations are done with root privileges.
This installs a virtual dependence for Xwindows needed by fink, and the second line installs a full-featured LaTeX system.

Next come the other useful installations which depend on individual needs. In order to get the BLAS and LAPACK libraries optimized, I now do the following:
sudo emacs /sw/etc/fink.conf
This file has a line called "Trees:", to which I prepend "unstable/main unstable/crypto". The first is necessary in order to perform the next installation step:
fink install octave-atlas

You will be asked several questions which can be acknowledged by simply hitting return, except when asked for the type of processor. There, coose G4. Everything else is then automatic (there is another dialog later on asking you to enter the number at the top of the screen - that means the biggest part of the compilations are done...)
After this lengthy installation, you'll also have octave installed. If you want to find out more about this and other packages, go to the last section.
To conclude this step, I suggest you first remove the "unstable/main" from /sw/etc/fink.conf again. emacs /sw/etc/fink.conf.

Remark: If you want to install only stable software, leave /sw/etc/fink.conf alone. Meanwhile, ATLAS is also available in the stable tree. If you want a non-optimized but easier-to compile version, do
fink install octave

instead.However, the ATLAS version of octave is far superior in terms of speed.

More fink installations

The information about packages that can be installed is found on the fink pages,
It is crucial to read the Documentation and FAQ in order to avoid installation problems. I myself installed many packages, among them xemacs-sumo and GIMP, without problems.


As my web browser,
I have decided to use Camino. It draws windows very fast and makes it possible to click through the computer's file system from within the browser. Apple's Safari, on the other hand, opens Finder windows when I type something like
I personally find that annoying.
As a PDF viewer,
I still think there is no question that Adobe Reader is a must. Its search functionality is invaluable.
For bibliography archiving,
check out BibDesk. It works nicely with LaTeX (see below).
The Terminal Application
is indispensable for the following installations. It can now display colors. For example, if you type ls -lG, a color-coded directory listing appears. Another use of colors in Terminal is the emacs editor that comes pre-installed in OS X.
I like to start programs from the command line. Therefore, I add the following commands to my .tcshrc startup file:
alias acro "open -a /Applications/Adobe\ Reader\ 6.0/Adobe\ Reader\ $1"
alias browse "open -a /Applications/ $1"
An alternative solution is to put such definitions into a directory ~/bin/ and make sure that it's in your PATH. E.g., you could create a file called ~/bin/acro with the content
/usr/bin/open -a /Applications/Adobe\ Reader\ 6.0/Adobe\ Reader\ $1
and make it executable (with chmod 700 ~/bin/acro). That is an easier way to define commands that you want to be available even when you're not running tcsh (say, bash or zsh...).

I also like to start Unix commands by double-clicking in Aqua (sometimes). To do that, one has to pass the Unix command to the Terminal application as an argument to be executed. This is done by opening the Unix command executable in the OSX finder, and choosing "Show Info". In "Open with Application", choose "Other..." and then navigate to Terminal in /Applications/Utilities/. You can choose Terminal only if you select "Show All" at the top of the dialog window.

Using it

To copy and paste between OSX Aqua and Xwindows, you have to get used to a certain asymmetry: