Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ apsd(8) — NEWS-os 4.2.1R

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

atlookup(1)

atxadmin(1)

atprint(1)

atstatus(1)

atfontlist(1)

atconfig(8)

APSD(8)  —  NEWS-OS Programmer’s Manual

NAME

apsd − Print spooler with PAP support

SYNOPSIS

apsd [ −c ] [ −q ] [ −r ] [ −n spooler_name ] [ −t tmp_dir ] [ −e exec_prog ] [ −p unix_printer −d dict_dir −f font_list
 

DESCRIPTION

apsd uses PAP (AppleTalk Printer Access Protocol) to exchange data with client (Macintosh) machines.  By using this server, NEWS can be made to function as a print spooler.  Spooled data is printed out based on the UNIX printer settings and functions. 
 

OPTIONS

−c CR/LF conversion is performed during spooling. 
This may be necessary for some print filters. It it normally not needed, however.
The default value is “off”.

−q Any characters other than printable ASCII to be quoted in octal format during spooling. 
This may be necessary for some print filters. It it normally not needed, however.
The default value is “off”.

−r apsd reuses working dictionary files among sessions.  Some files are left in the ’dict_dir’.  If this option is specified, every dictonary file is erased each session.  It may help the space optimaization. 
The default value is “off”.

−n spooler name
Specifies the spooler name (object name) on the AppleTalk network. The type name (type) is LaserWriter. 
The default is <hostname> Sony NEWS. 

−p unix_printer
Specifies the printer to be used for printing after spooling. One of the printer names listed in /etc/printcap must be specified here. 
This option may not be omitted.

−d dict_dir
Specifies the directory where files necessary for the operation of apsd are stored. 
This option may not be omitted.

−t tmp_dir
apsd makes a temporary file during a session.  This option specifies the directory to keep the temporary file. 
The default is /tmp. 

−f font_list
apsd exchanges data with the client during spooling.  During this process, requests for a list of supported fonts may be issued by the client.  This option specifies the font list to be returned in response to such requests. It is advisable that the list specified be a list of the fonts the printer is actually capable of printing. 
This option may not be omitted.
 

−eexec_prog
This option specifies the UNIX command to print out the file. The argument is the output file.
For example, −e /usr/local/mylpr is specified, apsd will execute the /usr/local/mylpr <file> instead of ’lpr’. 
This option may not be omitted.
 

SETUP PROCEDURE

In this section the typical setup procedure for apsd is described.  The output printer is chang printer:LaserWriter@LocalTalk. 

1. OBTAINING A FONT LIST

Obtain a font list for the output printer.  atfontlist ’chang printer:LaserWriter@LocalTalk’ > /usr/local/chang.fnt This will generate a font list in /usr/local/chang.fnt.  For cases in which a font list cannot be generated in the above manner, the files /usr/sony/etc/LWFonts and /usr/sony/etc/LWPlusFonts are available.  These files can be used on a temporary basis. 

2. UNIX PRINTER SETUP

Next, set up the UNIX printer.  Entries such as the following should be added to /etc/printcap.  PSPrinter:chang’s LaserWriter Sample:\

:lp=/dev/null:\
:sd=/usr/spool/PSPrinter:\
:lf=/usr/adm/PSPrinter-errs:\
:af=/usr/adm/PSPrinter-acct:\
:if=/usr/local/lib/PSPrinter:

This creates a directory corresponding to sd and files corresponding to af and lf.  if is the filter used when output is produced.  Its contents will be something like the following. 

#! /bin/sh
# Sample of /usr/local/lib/PSPrinter
/usr/sony/bin/atprint ’chang printer:LaserWriter@LocalTalk’
exit $?

Also, the setting chmod +x /usr/local/lib/PSPrinter is made so that output is also possible via lpr. 
 

3. STARTING apsd

After the above preparations have been completed, start apsd by issuing the following command.  # apsd −p PSPrinter −d /usr/spool/PSPrinter −f /usr/local/chnag.fnt

EXITING

If SIGHUP is sent, all of the operation files in use by apsd are cleared, but apsd does not terminate. 
Sending SIGTERM causes all operation files to be cleared and terminates apsd. 

BUGS

The files used by apsd during its operation are stored in the directory specified with −d and their names all start with PSet.  These files are not deleted automatically. 

apsd can handle one printer spooling.  Multiple apsd running is needed to handle multiple printers. 

SEE ALSO

atlookup(1), atxadmin(1), atprint(1), atstatus(1), atfontlist(1), atconfig(8)

NEWS-OSRelease 4.2.1R

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026