Terminal Happenings
Even though X Windows enables you to run all the coolest, awesomest, newest, most graphicalest programs, guess which program people use the most? It’s called xterm , and all it does is act like the kind of VT100 dumb terminal that window systems are supposed to save us from. Such are the ways of progress.The xterm program is one of the oldest programs that runs under X, and it has the greasy fingerprints of a dozen generations of programmers. As the README file in its source code notes, "This is undoubtedly the most ugly program in the distribution." Although xterm has more than 70 exciting options on its command line alone, we don’t tell you about them.
Click, click
One place where xterm acts a little better than the dumb terminal it purports to emulate is in mouse handling. You can select text with the mouse and then paste the selected text into either the same or a different xterm window.To select some text, move the mouse to the beginning of the text, press down the first (left) mouse button, and move the mouse to the end of the text. As you move the mouse, the selected text changes color. When you select it all, let go of the mouse button. Normally, xterm selects text character-by-character; if you double-click rather than just press the mouse button, however, it selects by word, and if you triple-click, it selects by line. Users who don’t believe in walking and chewing gum at the same time have an alternative way to select text: Move to the beginning of the selection, click the left button, and then move to the end of the selection and click the right button.
Either way, after you select the text, move the mouse to the window where you want to paste it and click the middle button. If, after you select the text, a program erases the window, you can’t see the selection anymore, although it’s still there and you can still paste it.Tip Because most other programs that have text type-in areas use the same mouse conventions xterm does, you can select text from an xterm and paste it into other programs and vice versa.
Coming in for a save
The other thing that makes xterm occasionally useful is that you can save in a log file a transcript of what goes on in the window. To turn on logging, move the cursor into the xterm window, hold down the Ctrl key with your nonmouse hand, and then press and hold down the left mouse button to get a little menu like the one shown in Figure 4-14. Next, move the mouse down to Log to File, and let go of the mouse button. (This sequence isn’t quite as hard as it sounds, fortunately.) A bunch of other options are on that menu, none of which we recommend other than the self-explanatory Redraw Window and Quit.

Figure 4-14: A few xterm menu options.After that, everything you type in that window — including all the backspaces and other correction characters to remind you of what a rotten typist you are and everything UNIX types back — is written to a file. Which file? The answer varies, although it’s usually a file in your home directory called XtermLog.12345 , where the last five digits are made up to be unique. Type ls Xterm*, and you’ll probably find it. When you finish, to turn off the log, do the same Ctrl-and-mouse dance and choose Log to File again (it’s checked to remind you that logging is turned on).
Warning Logging is an optional feature of xterm , and some systems have logging turned off permanently. In that case, if you try to turn on logging, the terminal just beeps.
One last stupid xterm trick
If the text in your xterm window is insufficiently or excessively legible, you can make the type larger or smaller. Hold down the Ctrl key and press the right mouse button to display the xterm VT Fonts menu, from which you can select font sizes ranging from Unreadable to Huge. We recommend the Unreadable font, which scrunches your typical 80x40 character text window to a one-inch square that is indeed unreadable. When you tire of that option, choose the Default font to return things to normal.