[PLUG-TALK] xterm .Xdefaults print() terminal escape codes (was: linux vs windows : google foo)

Richard Powell plug at hackhawk.net
Tue Jul 3 19:30:18 UTC 2007


Hello Again,

> Just doing a little research here in anticipation that one day, a Windows
> Vista upgrade from XP may be unavoidable at my company.

So, in my spare time I've been building an Ubuntu workstation and have
actually tested with some success with a few users.  Ubuntu looks quite
promising as an alternative to a Vista upgrade for dozens of computers
here.

I've encountered one minor stumbling block though, and was hoping someone
might have some insight.

I've managed to get nearly all of the key mappings migrated from Windows
Procomm over to the ".Xdefaults" file and working.  As in the following.

----------------------------------------------------
XTerm*font:             *-fixed-*-*-*-20-*
XTerm*reverseVideo:     on
*VT100*reverseVideo:    on
xterm*printerCommand: lp
xterm*vt100.translations: #override \
        Alt<KeyPress>L: print() \n\
        Shift<Key>F1:      string(0x1b) string("[37~")  \n\
        Shift<Key>F2:      string(0x1b) string("[38~")
<snip>
------------------------------------------------------

The last stumbling block is the mapping to the print() script.  It prints
the screen to the default printer OK.  However, most of the screens are
displaying ANSI escape codes to create lines.  When these codes are sent
to the printer, the escape sequences are stripped off, but the subsequent
commands following the escape sequences are not.  The script basically
sends an unreadable set of codes to the printer.  eg... (0m, 0m;4m, 50m).

I've been looking at conversion utilities such as enscript and textps, but
so far haven't been able to get the pretty lines to print to the printer.

Any ideas would certainly be appreciated.
Thanks
Richard





More information about the PLUG-talk mailing list