If I do the character sequence to toggle the printer on manually (cntrl +
F2) on the terminal, all subsequent output goes to the printer.
I've modified the appropriate termcap (vt220), by adding the line
:PN=\E[5i:PS=\E[4i:
and updated /usr/lib/terminfo/v/vt220 adding the lines:
mc4=\E[4i, mc5=\E[5i,
Do I perhaps need to send escape sequences with the print command? Modify
the printer definition in SCO 5.05?
Thanks for any help
where is ctrl-F2 documented? That sounds like a hardware hot-key that only
works by physically pressing those keys, not an escape sequence that can be
sent from software.
*1*
Does the documentation for the terminal claim that the terminal recognizes
ansi printer control sequences? (The sequences you describe above are
ansi/vt compatible)
Some terminals have other escape codes they use to do that job. examples
culled from linux termcap file (pf is another name for PS, and po is another
name for PN, (don't ask me!))
whether you shoule put pf/po or PS/PN or both in your termcap depends on
which one your application recognizes. Seems to me most sco apps use the
PN/PS version. these are termcap entries, for terminfo it is always mc5 and
mc4
altos: :pf=\EJ:po=\Ed#:
hp: :pf=\E&p13C:po=\E&p11C:
qume: :pf=\EA:po=\E@:
televideo: :pf=\Ea:po=\E`:
wyse: :pf=^T:po=^X:
*2*
next, suppose your terminal does say it uses the ansi/vt codes ( \E[5i
\E[4i ), is it possible to put the terminal into a mode where it emulates
some other terminal that does not use ansi codes but perhapse wyse or
televideo instead?
*3*
next, suppose the terminal is in ansi mode, and does respect the ansi
local-print codes. you have updated the termcap and terminfo entries for
"vt220". When you log in, does "echo $TERM" return "vt220" exactly? (without
the quotes in both cases)
what happens if you brute force it and send the actual escape codes yourself
instead of relying on all the automagical stuff? To test what I mean, run
the following while logged in at one of these terminals:
echo "\033[5ithis is a test\033[4i"
if your terminal really reuses the ansi passthru print codes, then you
should get "this is a test" on your printer. For the above test it does not
matter what $TERM is set to, nor does it matter if the termcap or terminfo
are configured properly or not. the only thing that is necessary is that you
are running the default sco sh or ksh (not bash or csh) or else the \033
will not be interpreted correctly.
if you do not get the test line from your printer, then the printer is
broken, or the parallel port is fried, or the terminal does not use ansi/vt
escape codes, or passthru-print has been disabled somewhere in the terminals
config.
if you do get the test line, then one of 1, 2, or 3 above needs closer
examination.
--
Brian K. White -- br...@aljex.com -- http://www.aljex.com/bkw/
+++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
filePro BBx Linux SCO Prosper/FACTS AutoCAD #callahans Satriani
I usually do a page form feed (^L) as well, in case it's a page printer:
echo "\033[5i,this is a test,\014\033[4i"
The Link MC5 terminal is documented by Wyse (?) at
http://www.wyse.com/service/support/kbase/Specs5.asp?Q=9 ,
which doesn't go down to escape sequences or this kind
of detail of printer support. The terminal isn't reported
to have its own badged printer - just a parallel printer port.
For the record, what is your printer?
Of course if the terminal is found to support different control
code sequences for printing instead then a similar test to the
above should verify _that_, and you can go on from there.