|
|
![]() |
|
|
X11 is what is known as a windowing system. It was created to give UNIX workstations some semblance of graphical programs. It's simply a program that runs by that UNIX programs can send graphical information to and draw windows, graphics, etc. MacOS X has its own graphical system, but by supporting X11 they allow developers of UNIX software to rather easily support running them on OS X. It is not a particularly Mac like experience, but it works, and if you've used IRAF you're used to UNIX by now anyway. Rootless Most uers will want to run X11 rootless, and the best way to do this is to run Panther (MacOS X 10.3) and use Apple's X11. X11 is an optional install on the Panther CDs. If you bought a new Mac with Panther pre-installed, you have X11 hidden on a CD somewhere, but it may be difficul to find. You can download it at the Apple X11 site linked to above, but it does only run on Panther. Full Screen The only reason to not use Apple's X11 is if for some reason you insist on staying with MacOS X 10.2. For Jaguar users, you'll need to installing the non-Apple distribution of X11, from Xfree86. Download the GUI installers from the XonX project. They have a 4.3 installer now. This may not work in Panther, but it should work fine in Jaguar. The very hard way to get Xfree86 4.3.0. Warning: these instructions are quite dated and it's possible that Xfree86 4.4 is out now. I suggest you just use the installers at XonX, or better yet - just run the latest version of OS X - Panther. The hard way to install Xfree86 is to download about a dozen GZipped tarballs from their ftp site. The files I would suggest you get are: Xbin.tgz Xetc.tgz Xfenc.tgz Xfscl.tgz Xlib.tgz Xprog.tgz Xvfb.tgz Xdoc.tgz Xf100.tgz Xfnts.tgz Xfsrv.tgz Xman.tgz Xquartz.tgz Xxserv.tgz and of course the install script Xinstall.sh. This is actually the most robust way to install Xfree86, and you get the newest release. It's still tedious. I can make it a little easier though. I have written a shell script that will download everything you need for Xfree86 4.3. Download this file, and put it in a folder called "Xfree86" or something and then navigate there via the Terminal.
This will proceed to download all the aforementioned .tgz files. This will take a long time, as there are lots of files, totalling over 50MB I think. Once you've done that, you can run the install script:
Xfree86 installs an "XDarwin" application in /Applications. Go there and launch it. For Apple's X11 it's an application called "X11" and in /Applications/Utilities. Apple's X11 has very few options, XDarwin has many more. The biggest choices are color-bit-depth and full screen vs. rootless. I might here recommend you pick up a three-button scroll-wheel USB mouse; they're very inexpensive and make UNIX life much easier. X Windows itself is really not much of a Windowing environment. It just specifies how programs can draw pixels on the screen, but there are no standard APIs for doing anything, so every X11 application can behave totally differently. In addition, there's no standard way to manage all the windows that each application creates. You can choose from a variety of windows managers which while they don't affect how applications behave, they do change the look and feel of how you keep track of various programs and windows. In full screen mode you can toggle back and forth to the MacOS X desktop via a key-combination. All your OS X applications keep running, so you can listen to iTunes while working in X11. The screen shot at the top of the page was taken running the enlightenment window manager. I really like the enlightenment as a window manager. It's very customizable, it supports multiple and virtual desktops, which I like since I usually run more than instance of IRAF. Alas, it's not the easiest thing to install, at least as far as the standard unix-way goes. Fink is very useful for installing enlightenment and other unix packages, but be prepared to deal with, well, UNIX, if you start. Fink has lots of helpful documentaion and nice program called the Fink Commander, but be sure to read everything carefully. There are some great other packages in Fink, so it's useful if you're an astronomer. Anyway, it can install the enlightenment pretty easily, though it is a large download. If anyone finds a simple non-fink way to get the enlightenment, please tell me. In order to get the wm you want running, at least in full screen mode, you must edit your .xinitrc file. Actually, come to think this file may not exist until you explicitly create it. The system-wide xinitrc file is located at
You can place a .xinitrc file in your home directory that will supercede the system-wide file. It's best just to copy the system-wide file (renamed that is) to your home directory and use it as a template. The file starts with a period, so it's invisible in the Finder. You can use BBEdit Lite's "Open Hidden" feature or you can use the command line pico text editor. Navigate to your home directory and
Towards the end of the file, you'll find a couple of lines that launch applications. By default you'll see some line that says "quartz-vm &" or "twm" if you're not using Apple X11. You need to replace that line with "enlightenment." You also can add a couple of xterms or an xgterm, etc. Whatever you put at the bottom are programs that'll be executed when you start X Windows. Actually, at least one program should be launched in the background with an &. Since the .xinitrc file is a shell script we want it to keep running. Generally, the window manager is launched with an "exec twm" or without an & so thatwhen the window manager is quit, X11 will shut down. Some .xinitrc files create an xterm named login, and when that is quit, X11 shuts down. But, it's best to let the wm be the one non-backgcround process in your xinitrc file. Okay, now it's time to install X11 IRAF. |