Adding and Removing Shared Printers

This topic presents instructions for:

Adding a Shared Printer

Removing a Shared Printer

Adding a Shared Printer

When adding a shared printer, watch for these caveats:

lpr -Pprinter19

/etc/inittab

pid {port#}

The PID should be 0 (zero) and nothing should be started on that port yet. Make sure port# is a real, usable port not a phantom PIB. The port# must be a port number less than the spooler port number.

The End of Job text tells the lppick daemon when to route the job to the proper UNIX print queue, the same UNIX print queue tested in Step 1 above.

NOTE

If the UNIX print queue is the default UNIX print queue (for example, you can type lpr /etc/inittab), the lpr... argument is not needed in the startshp command.

Shared printers must specify a device name for the printer. lp.unix (located in the file devices in the account dm) is provided for simple ASCII printers. The purpose of this form queue is to define an inter-job sequence that the filter uses to cut the D3 printer process data stream into UNIX print jobs. The inter-job sequence is defined as function @(-269).

To add a shared printer:

  1. Ensure that the UNIX spooler is started and at least one UNIX queue is started. Type:

lpstat 

  1. Ensure that the printer works with UNIX.

For example, type:

lpr -P[unix.formqueue.name] unix.file.name

When the unix.file.name prints on the printer, the printer is shared in UNIX and is ready to be shared in D3.

  1. Insert these statements in the user-coldstart macro in the dm account:

startshp 1,1,0,s126,lp.unix

startshp 2,2,0,s127,lp.unix,(lpr -Plp1)

printer#,formqueue#,page.eject,S{port#},lp.unix,(lpr command)

where printer#,formqueue#,page.eject,S{port#} are all the same values as used with a regular startptr command. For more information, see the D3 Reference Manual.

NOTE

In UNIX, it is always a Serial (S) printer, and the port# must be less than npibs (never put a printer on D3 port 0).

The startshp command:

To use a more complex printer definition item:

  1. Locate the line containing =x in the item.

This entry corresponds to @(-99).

  1. Locate the line which should be associated to @(-269), 170 entries later.

Note that a line starting with an exclamation mark is a comment and does not count.

  1. Add the line:

d,c'End of Job',< -269

  1. Compile the form queue item, then enter:

assignfq formqueue,device (c

With this setting, the printer process sends an End of Job string between each job. The filter scans the data stream, looking for this inter-job sequence to separate the data into different UNIX print jobs.

The inter-job sequence can be any character or sequence of characters that does not occur in a normal print job.

NOTE

  • It is strongly advised to include a nonprintable character in the inter-job sequence, such as:

d,x'ff',c'End of Job',x'ff',< -269

  • Never use the TCL command startptr on a shared printer as it does not spawn the necessary filter process.

Removing a Shared Printer

A shared printer can be stopped with the shp-kill command. This command executes an sp-kill of the D3 printer and kills the underlying D3 process and the filter. For example:

shp-kill printer.number 

See Also

Shared Printers

Troubleshooting