April 9th, 2009

Enterprise Bridge

Proper terminal console on Windows

On Windows boxes I own or abuse regularly, cygwin has been a required install for years. I get a proper command-line tool set (proper shells, perl interpreter, enscript, pipe behavior) and archive tools (tar, gzip, bzip2). The installation has come a long way, and more so than I'd realized. First, the included ssh/scp installation is now fully functional. Previously, scp hadn't worked for me, which was okay, since pscp (included with putty) worked just fine. Unfortunately, even though I wasn't running cmd.exe, these were all still running inside Windows' standard command line window, with all its requisite flaws: Crappy scrollback, iffy fonts, and a truly craptacular cut-and-paste mechanism.

MARK_NOTARUS and Sean T. Fucking O'Connor pointed me at the now-fully-functional cygwin native (read: doesn't require an X server) rxvt. Two minor obstacles and I'm up and running. One: You have to install the Bitstream Vera font set into Control Panels/Fonts. If you don't, you get windows where each character is double-spaced horizontally. You can turn off the font and boldFont resources in /etc/X11/app-defaults/Rxvt, but then you get a small font that's kind of hard to read at a comfortable seating distance. Two, you have to stop using pscp and use the now-functional cygwin scp. pscp, when NOT built against cygwin (in other words, its binary distribution) doesn't grok cygwin's tty mechanism, so it doesn't know how to handle non-echoed passwords properly. (It echos your password (!!) and then doesn't pass it on correctly, so the connect fails.)

So here's my app-defaults file:
Rxvt*background:        black
Rxvt*foreground:        green
Rxvt*cursorColor:       red
Rxvt*scrollBar:         true
Rxvt*scrollBar_right:   true
Rxvt*font:              -bitstream-bitstream vera sans mono-medium-r-normal--*-160-*-*-m-*-iso8859-1
Rxvt*boldfont:          -bitstream-bitstream vera sans mono-bold-r-normal--*-160-*-*-m-*-iso8859-1
Rxvt*saveLines:         2000
Rxvt*loginshell:        true
Rxvt.backspacekey:      ^H

The shortcut in the Quick Launch bar uses the target C:\cygwin\bin\rxvt.exe -title rxvt -e tcsh -l

Also, rxvt properly groks the xterm title bar control character sequence. Finally, I get my usual title bar back (pwd user@host). It's been a bitch without that, having eight or ten windows stacked in the task bar with no way to tell which 'tcsh' window is the one I want.

[Edit 4/13/09] Per jessebunbun, there's a screen shot in the comments. Also, Bitstream Vera has a lower-case 'l' that is very distinct from the digit '1'. That's a HUGE win there.