X Myths 133 directory pointed to by the XAPPLRESDIR environment variable). The default for this directory may have been changed by whoever built and installed the x libraries. Or, the truly inventive program may actively seek out and merge resource databases from other happy places. The Motifified xrn posted recently had a retarded resource editor that drops modified resources in files in the current directory as well as in the user’s home. On startup, it happily looks all over the place for amusing- looking file names to load, many of them starting with dots so they won’t ‘bother’ you when you list your files. Or, writers of WCL-based applications can load resource files that actually generate new widgets with names specified in those (or other) resource files. What this means is that the smarter-than-the-average-bear user who actually managed to figure out that snot.goddamn.stupid.widget.fontList: micro is the resource to change the font in his snot application, could be unable to figure out where to put it. Joe sitting in the next cubicle over will say, “just put it in your .Xdefaults,” but if Joe happens to have copied Fred’s .xsession, he does an xrdb .xresources, so .Xdefaults never gets read. Joe either doesn’t xrdb, or was told by someone once to xrdb .Xdefaults. He wonders why when he edits .Xdefaults, the changes don’t happen until he ‘logs out,’ since he never reran xrdb to reload the resources. Oh, and when he uses the NCD from home, things act ‘different,’ and he doesn’t know why. “It’s just different sometimes.” Pat Clueless has figured out that XAPPLRESDIR is the way to go, as it allows separate files for each application. But Pat doesn’t know what the class name for this thing is. Pat knows that the copy of the executable is called snot, but when Pat adds a file Snot or XSnot or Xsnot, nothing happens. Pat has a man page that forgot to mention the application class name, and always describes resources starting with ‘*’, which is no help. Pat asks Gardner, who fires up emacs on the executable, and searches for (case insensitive) snot, and finds a few SNot strings, and suggests that. It works, hooray. Gardner figures Pat can even use SNot*fontList: micro to change all the fonts in the application, but finds that a few widgets don’t get that font for some reason. Someone points out that there is a line in Pat’s
134 The X-Windows Disaster .xresources (or was it a file that was #included in .xresources) of the form *goddamn*fontList: 10x22, which he copied from Steve who quit last year, and that, of course, that resources is ‘more specific’ than Pat’s, whatever the hell that means, so it takes precedence. Sorry, Steve. You can’t even remember what application that resource was supposed to change anymore. Too bad. Sigh. It goes on and on. Try to explain to someone how to modify some behavior of the window manager, with having to re-xrdb, then select the window manager restart menu item (which most people don’t have, as they copied the guy next door’s .mwmrc), or logging out. Which file do I have to edit? .mwmrc? Mwm? .Xdefaults? .xrdb? .xresources? .xsession? .xinitrc? .xinitrc.ncd? Why doesn’t all this work the way I want? How come when I try to use the workstation sitting next to mine, some of the windows come up on my workstation? Why is it when I rlogin to another machine, I get these weird X messages and core dumps when I try to run this application? How do I turn this autoraising behavior off? I don’t know where it came from, I just #included Bob’s color scheme file, and everything went wrong, and I can't figure out why! SOMEBODY SHOOT ME, I’M IN HELL!!! Myth: X Is “Portable” …And Iran-Contra wasn’t Arms for Hostages. Even if you can get an X program to compile, there’s no guarantee it’ll work with your server. If an application requires an X extension that your server doesn’t provide, then it fails. X applications can’t extend the server themselves—the extension has to be compiled and linked into the server. Most interesting extensions actually require extensive modification and recompilation of the X server itself, a decidedly nontrivial task. The fol- lowing message tells how much brain-searing, eye-popping fun compiling “portable” X server extensions can be: Date: Wed, 4 Mar 92 02:53:53 PST X-Windows: Boy, Is my Butt Sore From: Jamie Zawinski [jwz@lucid.com] To: UNIX-HATERS Subject: X: or, How I Learned to Stop Worrying and Love the Bomb