XTerm: It's Better Than You Thought
<a href="https:&#x2F;&#x2F;medium.com&#x2F;@donhopkins&#x2F;the-x-windows-disaster-128d398ebd47" rel="nofollow">https:&#x2F;&#x2F;medium.com&#x2F;@donhopkins&#x2F;the-x-windows-disaster-128d39...</a><p>Date: Wed 10 Apr 91 08:14:16 EDT<p>From: Steve Strassmann &lt;straz@media-lab.mit.edu&gt;<p>To: UNIX-HATERS<p>Subject: the display from hell<p>I have a “window system” on my unix box. You see, in the unix world, “system” means “a bunch of unrelated programs.” But that’s not what I want to talk about here today. I want to talk about overlay planes.<p>My HP 9000&#x2F;835 console has two 19&quot; 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 displays, the left one and the right one, but that would be unthinkably simple. After all, if toys like Macintoshes can do this, unix has to make it much more difficult to prove how advanced it is.<p>So, what I really have is two display devices, &#x2F;dev&#x2F;crt0 and &#x2F;dev&#x2F;crt1. No, sorry, I lied about that.<p>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 cursors, and the graphics plane is to draw 3D graphics. So I really need four devices:<p>&#x2F;dev&#x2F;crt0 — — the graphics plane of the right monitor<p>&#x2F;dev&#x2F;crt1 — — the graphics plane of the left monitor<p>&#x2F;dev&#x2F;ocrt0 — — the overlay plane of the right monitor<p>&#x2F;dev&#x2F;ocrt1 — — the overlay plane of the left monitor<p>No, sorry, I lied about that.<p>&#x2F;dev&#x2F;ocrt0 only gives you 3 out of the 4 overlay bits. The fourth bit is reserved exclusively for the private use of federal emergency relief teams in case of a national outbreak of Pixel Rot. If you want to live dangerously and under threat of FBI investigation, you can use &#x2F;dev&#x2F;o4crt0 and &#x2F;dev&#x2F;o4crt1 in order to really draw on the overlay planes. So, all you have to do is tell X windows to use these o4 overlays, and you can draw graphics on the graphics plane.
No, sorry, I lied about that.<p>X will not run in these 4 bit overlay planes. This is because I’m using Motif, which is so sophisticated it forces you to put a 1&quot; thick border around each window in case your mouse is so worthless you can’t hit anything you aim at, so you need widgets designed from the same style manual as the runway at Moscow International Airport. My program has a browser that actually uses different colors to distinguish different kinds of nodes. Unlike a PC Jr, however, this workstation with $150,000 worth of 28 bits-per-pixel supercharged display hardware cannot display more than 16 colors at a time. If you’re using the Motif self-abuse kit, asking for the 17th color causes your program to crash horribly.<p>So, thinks I to myself cleverly, I shall run X windows on the graphics plane. This means X will not use the overlay planes, which have special hardware for cursors. This also means I cannot use the super cool 3D graphics hardware either, because in order to draw a cube, I would have to “steal” the frame buffer from X, which is surly and uncooperative about that sort of thing.
What it does give me, however, is a unique pleasure. The overlay plane is used for &#x2F;dev&#x2F;console, which means all console messages get printed in 10 Point Troglodyte Bold, superimposed in white over whatever else is on my screen, like for example, a demo that I may be happen to be giving at the time. Every time anyone in the lab prints to the printer attached to my machine, or NFS wets its pants with a timeout, or some file server threatens to go down in only 3 hours for scheduled maintenance, another message goes onto my screen like a court reporter with Turett’s syndrome.<p>The usual X commands for refreshing the screen are helpless to remove this incontinence, because X has no access to the overlay planes. I had to write a program in C to be invoked from some xterm window that does nothing but wipes up after the mess on the overlay planes.
My super 3D graphics, then, runs only on &#x2F;dev&#x2F;crt1, and X windows runs only on &#x2F;dev&#x2F;crt0. Of course, this means I cannot move my mouse over to the 3d graphics display, but as the HP technical support person said “Why would you ever need to point to something that you’ve drawn in 3D?”<p>Of course, HP claims X has a mode which allows you to run X in the overlay planes and “see through” to the graphics planes underneath. But of course, after 3 months of calls to HP technical support, we agreed that that doesn’t actually work with my particular hardware configuration. You see, I have the top-of-the-line Turbo SRX model (not one, but two on a single workstation!), and they’ve only tested it on the simpler, less advanced configurations. When you’ve got a hip, forward-thinking software innovator like Hewlett-Packard, they think running X windows release 2 is pretty advanced.