Technical article 107673

How can I bypass the filter on a non-SCO lpd server using lp(C)?

OpenServer 5.0.0OpenServer 5.0.2OpenServer 5.0.4OpenServer 5.0.5OpenServer 5.0.6

Written · Last revised

Problem

I want to print a file from an SCO system to a non-SCO lpd server and I want to flag to the lpd server not to filter the file before printing it. BSD versions of lpr provide a -l (literal) option to specify that the file should be printed literally. That is, that the file should not be sent through a printer filter, but sent directly to the printer instead.

You may want to do this if you have a raw postscript file and you do not want the file to be processed by another postscript filter when it is sent to the printer server.

Please note: This function is similar to the -o raw option of lp(C) but for remote, as opposed to local, printers.

Solution

There is a -T option to lp(C) that can be used to perform the same function that the -l switch does for BSD implementations of lpr.

Use lp(C) as follows to request of the lpd that the file be printed without filtering:

lp -d <printer> -T l /etc/motd

where <printer> is the name of the remote printer and /etc/motd is the name of the file you want to print.

Using the -T l option to lp(C) changes the control file that is sent by lp(C) to lpd(ADMN) as follows:

lp(C) of a file without the -T l switch results in a control file
in /usr/spool/lpd/<printer> containing:

Hjrb.sco.com Proot Jmotd Cjrb.sco.com Lroot S298 21503 fdfA001jrb.sco.com UdfA001jrb.sco.com N/etc/motd

lp(C) of the same file with the -T l switch results in the following
control file:

Hjrb.sco.com Proot Jmotd Cjrb.sco.com Lroot S298 21503 ldfA001jrb.sco.com UdfA001jrb.sco.com N/etc/motd

NOTE:     The flag on the datafile on the third to last line of the file
          has changed from "f" (for filter) to "l" (for literal).

From the Xinuos technical article database, record 107673. Reproduced with permission. The original is at www.sco.com/ta/107673, which is reachable but blocked from search engines. Xinuos marks this article against a retired product line. That refers to the product’s lifecycle, not to whether the advice still works — plenty of it still applies to running systems.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.