How to set up a G4 Mac to use with X

Set up the Mac OS X environmet

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

This was written before Jaguar came along! Get the most recent pre-Jaguar version of the Developer Tools from Apple. When I type cc --version, I get 2.95.2 for my compiler. I think version 3 (shipped now after Jaguar is released) is still not compatible with all the fink open source software... so I am not upgrading to Jaguar until I know fink will work with it.

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: http://developer.apple.com/tools/. 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-clickeing. When the installer asks for the administrator password, click on the padlock icon in the lower left corner of the dialog to 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 http://www.xdarwin.org/download/ and click to install.
The alternative way of downloading this via fink (see below) also works but produces an Xwindos system that sends out too many (harmless but annoying) warning messages. That's why 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 http://oroborosx.sourceforge.net/
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
xterm
xeyes

Then I edited the file ~/.xinitrc to contain the line
xmodmap -e "remove Mod1 = Alt_R"
as the second-to-last line.

Get the Fink porting software

This allows you to download all the UNIX applications you'll ever need. Get the file "Fink 0.3.2a Binary Installer" from the page http://fink.sourceforge.net/download/index.php and install it, following the instruction on that page. However, I actually included "source /sw/bin/init.csh" in my .tcshrc file, not in .cshrc

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 append "unstable/main". This 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 and do
fink install octave

instead.

More fink installations

The information about packages that can be installed is found on the fink pages, http://fink.sourceforge.net/pdb/index.php.
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.

Customization

I like to start programs from the command line. Since Internet Explorer and Acrobat Reader are already installed for OSX, I don't want to install redundant Xwindows version of pdf viewers or browsers. Therefore, I add the following commands to my .tcshrc startup file:
alias acro "open -a /Applications/Acrobat\ Reader\ 5.0 $1"
alias browse "open -a /Applications/Internet\ Explorer.app $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
open -a /Applications/Acrobat\ Reader\ 5.0 $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 the Xwindows panes of Orobor OSX, you have to get used to a certain asymmetry: To quit Xwindows, go to the OroborOSX menu bar and select Quit OroborOSX.