X Myths 135 Don’t ever believe the installation instructions of an X server exten- sion. Just don’t, it’s an utter waste of time. You may be thinking to yourself, “I’ll just install this piece of code and recompile my X server and then X will be JUST a LITTLE BIT less MORONIC it’ll be EASY. I’ll have worked around another STUPID MISDESIGN, and I’ll be WINNING.” Ha! Consider whether chewing on glass might have more of a payoff than what you're about to go through. After four hours of pain, including such loveliness as a dozen direc- tories in which you have to make a symlink called “X11” pointing at wherever the real X includes are, because the automatically gener- ated makefiles are coming out with stuff like: -I../../../../../../include instead of: -I../../../../include, or, even better: -I../../.././../mit/./../../../include and then having to hand-hack these automatically generated make- files anyway because some random preprocessor symbols weren’t defined and are causing spurious “don’t know how to make” errors, and then realizing that “makedepend,” which you don’t really care about running anyway, is getting errors because the extension’s installation script made symlinks to directories instead of copies, and “. .” doesn’t WORK with symlinks, and, and, and… You’ll finally realize that the only way to compile anything that’s a basic part of X is to go to the top of the tree, five levels higher than the executable that you actually want to generate, and say “make Everything.” Then come back an hour later when it’s done making the MAKEFILES to see if there were any actual COMPILATION problems. And then you’ll find yourself asking questions like, “why is it com- piling that? I didn't change that, what’s it DOING?” And don’t forget that you HAVE to compile ALL of PEX, even though none of it actually gets linked in to any executables that you’ll ever run. This is for your OWN GOOD!
136 The X-Windows Disaster And then you’ll realize what you did wrong, of course, you’ll realize what you should have done ALL ALONG: all:: $(RM) -rf $(TOP) But BE CAREFUL! That second line can’t begin with a space. On the whole, X extensions are a failure. The notable exception that proves the rule is the Shaped Window extension, which was specifically designed to implement round clocks and eyeballs. But most application writers just don’t bother using proprietary extensions like Display PostScript, because X terminals and MIT servers don’t support them. Many find it too much of a hassle to use more ubiquitous extensions like shared memory, double buffering, or splines: they still don’t work in many cases, so you have to be prepared to do without them. If you really don’t need the extension, then why complicate your code with special cases? And most applications that do use extensions just assume they’re supported and bomb if they’re not. The most that can be said about the lowest-common-denominator approach that X takes to graphics is that it levels the playing field, allowing incredi- bly stupid companies to jump on the bandwagon and sell obsolete junk that’s just as unusable as high-end, brand-name workstations: Date: Wed, 10 Apr 91 08:14:16 EDT From: Steve Strassmann straz@media-lab.mit.edu To: UNIX-HATERS Subject: the display from hell My HP 9000/835 console has two 19” color monitors, and some extremely expensive Turbo SRX graphics hardware to drive them. You'd think that I could simply tell X windows that it has two dis- plays, the left one and the right one, but that would be unthinkably simple. After all, if toys like the Macintosh can do this, Unix has to make it much more difficult to prove how advanced it is. So, what I really have is two display devices, /dev/crt0 and /dev/crt1. No, sorry, I lied about that. You see, the Turbo SRX display has a graphics plane (with 24 bits per pixel) and an overlay plane (with 4 bits per pixel). The overlay plane is for things like, well, window systems, which need things like