PFPRINTER

Brian K. White brian at aljex.com
Thu Jun 23 15:41:40 PDT 2005


----- Original Message ----- 
From: "Joe Chasan" <joe at magnatechonline.com>
To: "Steven Waters" <swaters at triumphinstruments.com>
Cc: "Filepro List" <filepro-list at lists.celestial.com>
Sent: Thursday, June 23, 2005 4:12 PM
Subject: Re: PFPRINTER


> On Thu, Jun 23, 2005 at 11:06:56AM -0700, Steven Waters wrote:
>> Hello,
>> SCO UNIX FP 5.0.14
>> I have been watching the "printing thru GoToMyPc" thread.
>> And I have a question about PFPRINTER.
>> I think I am looking for the proper destination command in
>> printer maintenance.
>>
>> If I use PFPRINTER=local export PFPRINTER
>> the print job prints at the console printer. The destination command
>> in printer maintenance looks like this
>>
>>  --Name--  --Type--  -Destination Command-  ------Comment------
>>  local   & hp-4000 & lp -dlocal -s        & HP-4000
>>
>> I have tried lp -L local  and lp -L spool. I can't
>> get the print job to print to the attached printer
>> with the environment set to PFPRINTER
>>
>> If I use the -PT printing works fine.
>> Anzio will give the message
>> Hit <Alt-A> to abort passthru print
>> Without -PT Anzio is silent and the print job
>> arrives at the console printer
>>
>> I am not sure if this issue is UNIX or Filepro.
>> Thanks for any help,
>> Steve
>
> if you are talking about SCO Unix/Openserver, the "-L" in the man
> page for lp(C) never worked, i suspect never will.
>
> you can use the keyword "LOCAL" instead of a command in printer
> maintenance destination command field.

Not quite true.

The -L option works fine.

It merely requires that your terminals terminfo entry includes the passthru 
print fields, mc4 & mc5, which is how it finds out what codes it is supposed 
to use in order to do local printing. Different terminals can have different 
codes for that just like they do for every other feature so just like 
recognizing Fkeys and arrow keys and displaying colors, any program that 
wants to use a particular feature can't reasonably include code inside 
itself to work on every type of terminal. It has to consult a terminal 
capabilities database be reading your TERM env variable and getting that 
entry from the database. If TERM=ansi, and the ansi entry in terminfo 
doesn't happen to include instructions for how to passthru print, then the 
program can only assume that "ansi" terminals don't have the feature.

Most of the terminal definitions in the stock terminfo database do not have 
the passthru codes in them.
This includes the terminfo entries for "ansi" and "scoansi" which are the 
ones that the console and any scoansi emulators use.

This is why most people would never see the -L option work unless they know 
enough about their system to know the above.

The reason scoansi probably doesn't include the passthru codes is probably 
because technically the only real scoansi terminal is the sco console, and 
the sco console doesn't in fact support passthru print, so it's technically 
correct that the definition for the sco console doesn't include features the 
sco console doesn't have.

However almost every terminal emulator out there does have a passthru print 
feature and it's harmless to add the codes to the ansi & scoansi entries. 
The worst thing that will happen is, if you do work at the console, you may 
send a print job to your screen because you've told any program that asks, 
that your terminal understands those 2 codes, when really it doesn't.

You can add the codes easily. I do on all my boxes because we use passthru 
print a lot and this lets several programs magically gain the ability to 
print.

log in to the server as root
echo $TERM to verify that TERM=ansi
# infocmp >ansi.ti
# echo ' mc4=\E[4i, mc5=\E[5i,' >> ansi.ti
# tic ansi.ti

note the echo command carefully,
those are single forward-quotes,
there is a leading space
there is a trailing comma

what those commands actually do is:

infocmp will fetch the terminfo entry for whatever TERM is set to and print 
out a human readable source version on stdout.
so you make sure TERM=ansi, then infocmp and capture it in a file.

Then add the 2 codes to the file and be aware of the special syntax required 
in that file while doing it
the syntax is just that every field is seperated by at least one whitespace 
and every field ends with a comma, even the last field on the end of the 
line on the last line in the file.

then "tic ansi.ti" reads ansi.ti and compiles it back into the terminfo 
database


You can do the same for other terminal types and the codes are even the same 
for most of the common ones in use today. They are all vt/ansi based and 
have many of the same codes including this one.
This includes xterm, linux, cons25 (freebsd console), vt100, vt220 etc...
some old serial terminals used other codes in place of  esc-[-4-i & 
esc-[-5-i
For linux & cons25, technically they are just like scoansi in that really 
they are definitions of the console, and the console doesn't have passthru 
print, but lts of terminal emulators include "linux" as a terminal type and 
it works on all of them. not all xterms have passthru, but some do. I use 
rxvt a lot and it does.


Brian K. White  --  brian at aljex.com  --  http://www.aljex.com/bkw/
+++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
filePro BBx  Linux SCO  Prosper/FACTS AutoCAD  #callahans Satriani



More information about the Filepro-list mailing list