Setting up a window manager
Setting up our window manager is going to require a few pre-requisites. We are going to need to be able to compile (don't worry, this requires very little learning and not much sweat on your part), get our window manager's source (we have friendly package managers for this), and then configure our environment (read: make things better for ourselves by tinkering endlessly).
Xcode: First, make sure you have the developer tools (Xcode) installed. Panther users should find an mpkg in /Applications/Installers/Xcode Tools. Just double-click on the Developer.mpkg icon, and follow the instructions. This package will outfit your Mac with compilers and the things necessary to build our window manager(s).
DarwinPorts: Once you have Xcode, you'll want to install either the DarwinPorts, or something like Fink. I use the DarwinPorts, so I'll detail that direction. Many others use Fink, and there are excellent resources on the web for learning how. DarwinPorts is a system that is based on the FreeBSD port system. It allows very simple access to, and management of, independent applications. The DarwinPorts consist of a set of projects whose code has been ported to OS X. The ports system manages dependencies and versions for you and basically just kicks too much ass for me to detail it all here.
DarwinPorts run out of /opt/local/, so you need to make sure this is in your shell's path. The documentation that comes with the installer tells you how to do this, but here is a copy-and-paste section for those that refuse to RTFM:
USING THE PORT COMMAND
If you haven't already, add /opt/local/bin to your path (or ${prefix}/bin
if you've elected to install DarwinPorts somewhere else).
If you're unsure how and using Panther (OS X 10.3), add the following
line to your ~/.profile file. If this file does not exist, create it. (This
also applies if you're using a bourne shell in Jaguar.)
export PATH=$PATH:/opt/local/bin
If using Jaguar (OS X 10.2), add the following line to your ~/.cshrc file.
If this file does not exist, create it. (This also applies if you're using tcsh in Panther.)
set path=($path /opt/local/bin)
Your changes will not take effect until you have opened a new shell.
The installation instructions are here. You basically want to download the installer, run it, and then issue the command (which is listed on the web page above):
sudo port -d selfupdate
This command will get your ports tree (all of the apps), and re-build the port command if a newer one is available.
Get your WM: This is very easy with DarwinPorts. Let's just say you've decided to join the winning team and you want to install Enlightenment. First, let me congratulate you on your EXCELLENT decision (you won't regret it). You'll want to open up a terminal window (/Applications/Utilities/Terminal.app), make sure you're connected to the Internet, and prepare to let your machine run for a bit.
Here you are choosing what WM to build. You can build as many as you like, just replace enlightenment with whatever else you choose (like windowmaker or gnome). If you want to find out if your favorite WM is in the ports system, type:
port search <whatever name you are looking for>
The ports system will output all close matches, and you can see if your favorite is there.
Now, to install type this in your Terminal window:
sudo port install enlightenment
At this point, you can go make a sandwich or catchup on some TiVo.
.xinitrc: Once your build has finished you should have a working executable. Now you need your own .xinitrc file. This is how you will: tell X11 what WM to run, and pass options, and so on and so on...
The best option here, is to just copy the system's file locally and use it. We're going to copy the system's default into our own dir. Note, if you have an .xinitrc file already, this will overwrite it, so you might want to back it up (or just use it as is). To get the default, type:
cp /etc/X11/xinit/xinitrc ~/.xinitrc
Now, this is where it gets interesting. Open this file up in your favorite text editor (such as vi). The last line is the window manager (Quartz). You'll want to replace that line with something like:
exec /opt/local/bin/e16
But wait... There's more... The quartz WM isn't ALL bad. It's going to stick around and let us copy/paste from Aqua. Before the previous line, put:
exec quartz-wm --only-proxy &
Now you have a functioning .xinitrc. If this was too much for ya, here's