Have a Question?
Print

00217: Spooled printers and lock files

Title:

Spooled printers and lock files

Description:

Spooled printers use a special system specified lock file. In order to avoid conflicts when accessing this device directly, the same lock file should be used for the LOCK= mode on the alias line. For example: 

alias LP “>lp -s 2>/dev/null” “Okidata 84” 
alias P0 /dev/tty010 “Okidata 84” CR,LOCK=/usr/spool/lp/interface/lp.lck 

The first alias line references the spooler, so it is responsible for the lockfile. The second alias line references the same device, but does so directly (bypassing the spooler). Consequently, it uses a LOCK mode that points to the same lockfile as the spooler to keep the print jobs separate. 

If more than one system spooler exists, begin by determining the device name(s). The following is a Xenix example: 

        $ lpstat -t 
        device for linepr:/dev/lp1 

In Config.bbx: 

alias P1 “>lp -s -dlinepr 2>/dev/null” “Spooler #2” CR 

Below is a list of parameters and descriptions. 

lp = open a pipe to lp 
-s = suppress all messages 
lp = open a pipe to lp 
-d = specifies device name” **needs to know which spooler! 
2 = dump all errors to error file; not to printer 
/dev/null = pipe output to system device spooler 
-N = may suppress page ejecting 

Xenix Spooled Printers: 

To use the spooler (lpinit), you must specify the kind of printer device (serial or parallel). Also, you must specify the port this printer is connected to /dev/lp0) and the type of printer it is, for example, “dumb serial or parallel”. 

An interface file is created in /usr/spool/lp/interface/[printername], which is ASCII (editable) and controls the spooler interface. 

Once you have completed the above, just type lp -dprintername filename and you’re ready to print. 

Unix Spooled Printers: 

Some of the Unix operating system spooled printers force a form feed before output. To eliminate the form feed, edit the Unix operating system script file /usr/spool/lp/interface/printer.name. 

Resolution:

See also articles KB00572 and KB00565 for additional information.



Last Modified: 03/27/2000 Product: PRO/5 Operating System: Unix

BASIS structures five components of their technology into the BBx Generations.

Table of Contents
Scroll to Top