Article Title : Solaris 2.5 print spoolers Creation Date : 03/18/96 Message ID : TGENNQ Last Update : 03/18/96 Expiration Rules : unknown Location : /NCD-Articles/Peripherals/ and /NCD-Articles/Host_Systems/Solaris ================================================================= Solaris 2.5 print spooling behaves similarly to the HP-UX 10.x print spooling. Please use the following information for setting up your printer. (This information may also be found on the NCDware Contribution CD-ROM 1.1, in /src/NCD/ncdprint/3.2_printing.txt) ------------------------------------------------------------------------- Solaris 2.5 Systems The Solaris 2.5 print spooler does not use an /etc/printcap file to specify the printer attributes. Nonetheless, the NCD print software: o Requires an /etc/printcap file to get the printer attributes o Recognizes all of the NCD-defined attributes (described in Tables 5-20 and Table 5-21 at the bottom of this document) o Recognizes the attribute lf as the name of a log file to which diagnostic information is sent You can use the NCD-supplied interface program, hpux_if, for all the supported printers. To determine what print options are available [via the -o option to lp (1)], look at the appropriate .driver file. hpux_if expects the print utilities to be installed in the default directory /usr/bin/X11. If the files have been installed somewhere else, you must modify the dir variable in hpux_if to the appropriate directory. To set up a printer attached to an NCD terminal: 1. Stop the lpscheduler: lpshut 2. Verify that the log file (lf) exists. 3. Make sure the log file (lf) is writable by the lpsched process. 4. Create an entry in the /etc/printcap file that defines the printer. For example: lablj|LaserJet III on NCD unit ncdu145:\ :lf=/usr/adm/lpd-errs:\ :PT=lj:\ :NP=/usr/local/bin/ncdprint/notify:\ :NT=ncdu145:\ :BP=/usr/local/bin/ncdprint/lj.banner:\ :TP=true: 5. Use the Solaris 2.5 lpadmin command to add the new printer to the spooling system. The printer name should correspond to the name used in the /etc/printcap file. The printer is not physically attached to the system, so the device argument may be set to /dev/null. For example: /usr/lib/lpadmin -plablj -v/dev/null -i/usr/local/bin/ncdprint/hpux_if 6. Restart the lp.scheduler: lpsched 7. Allow requests to be sent to the printer and enable the printer. For example: /usr/lib/accept lablj enable lablj ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- Table 5-20 System-Defined printcap Attributes Attribute Purpose Comments --------- --------- --------- lf= Log file This file contains the standard error report of the command pipeline used to print the job. It contains lines that tell when a job was started, when it finished, and any errors associated with that job. It is optional. See your vendor-supplied system administration documentation. if= Input filter This command is presented with the print job data as its standard input and is responsible for printing that data. At least one of these commands is required per printer. By convention, the input filter has the same name as the printer. sh Tells the spooler This attribute eliminates the confusion that to suppress the would occur when the PostScript header page generation of prevents bsd_if, the NCD-supplied input filter, header pages from detecting that the print job contains ASCII text. This attribute is necessary because bsd_if detects PostScript source automatically by looking at the first two characters of the print job data. If you want to use a header page with an ASCII print job, the input filter can generate it as specified by the BP attribute listed in Table 5-21. sd= Specifies the spool By convention, this directory has the same name directory as the printer. All spooled requests are stored in it until they are printed. lp= Specifies a printer The spooler also uses this file to lock it to device file prevent other programs from accessing the file at the same time. Normally this would be a device-special file, but a regular file is sufficient. If this file is shared with other printer entries in the printcap file, each printer is used in turn because they take turns locking the file. pw Specifies page width The input filter adjusts page orientation for HP printers based on page width. If the width is 80 or less, portrait mode is used; if more than 80, landscape mode is used. The default page width is 132, so make sure the printcap entry includes a pw#80 attribute if you want portrait output. ----------------------------------------------------------------------------- Table 5-21 Printcap Attributes That Define Printer Characteristics Attribute Purpose Description --------- --------- --------------- PT Defines the You must define PT because it is used to find printer type the appropriate printer driver. For example, if PT were set to lj, the input filter would call lj.driver to do the actual printing to the LaserJet. For supported values, see "Printer Types". NT Name or IP address If undefined, the name of the attached printer of the NCD terminal (for example, lablw) in the first line of the to which the printer printcap entries is used as the default name is attached of the NCD terminal. DF Defines additional See the description of ncdprint in "Print parameters to be Utility ncdprint" on page 5-79 for a list of passed to ncdprint valid parameters. In the example, the -i parameter indicates that the Printer daemon on ncdlablw is listening for TCP/IP connections on port 5963. NP Name of a The notification procedure is a Bourne shell notification procedure script. This allows system administration the that is called when ability to customize the notification mechanism printer problems are to their environment. In the example, the detected (for example, shell script /usr/local/bin/ncdprint/notify running out of paper) is invoked as follows: sh /usr/local/bin/ncdprint/notify ncd_terminal time date with the problem message text being received on the standard input. (The shell script notify is provided in the distribution as a sample notification procedure. Modify it to suit your environment.) BP Defines the banner "Undefined" specifies no banner page. NCD page procedure supplies sample banner page procedures for all supported printer types. TP Defines the trailer "Undefined" specifies that you do not want a page procedure trailer page. RP Determines page order "true" prints the pages in reverse order. "false" prints the pages in sequential order. The default depends on the printer type. -----------------------------------------------------------------------------