Refer to the section Printer Configuration Information on page 213 if you need more information. Follow these steps to configure a local printer:
- 1. Connect the printer to the system and turn on the power to the printer. See the printer manual for setup information. Printer cables usually are connected to a serial port.
- 2. Become superuser.
- 3. Type chown lp /dev/term/address and press Return. The lp user now owns the port device to which the printer is connected. For a serial port, address is usually a or b.
- 4. Type chmod 600 /dev/term/address and press Return. Now only lp can access the printer port device.
- 5. Type lpadmin -p printer-name -v /dev/term/address and press Return. The printer is registered with the LP print service.
- 6. Type lpadmin -p printer-name -T printer-type and press Return. Use PS for PostScript or PSR for PostScript reverse (to reverse the order of the pages) as the printer type for a PostScript printer. The printer type is registered with the LP print service.
NOTE: If you specify printer type PS and pages print in reverse order, try printer type PSR.
- 7. Type lpadmin -p printer-name -I file-content-type and press Return. The file-content type is specified. If you specify more than one type, separate the names with commas. Alternatively, you can enclose the list in double quotes and separate the names with spaces.
- 8. Type cd /etc/lp/fd and press Return. You are in the directory that contains the print filter descriptor files.
- 9. Type the following script to install the PostScript filters:
# sh
# for f in download dpost postio postior postprint postreverse
> do
> lpfilter -f $f -F $f.fd
> done
#
- 10. Type accept printer-name and press Return. The printer is now ready to begin accepting (queuing) print requests.
- 11. Type enable printer-name and press Return. The printer is now ready to process print requests in the print queue.
- 12. (Optional) Type lpadmin -p printer-name -D comment and press Return. Attaching a description can give users helpful information, such as where the printer is located. The comment is displayed as part of the printer status.
- 13. (Recommended) Type lpadmin -d printer-name and press Return. The printer you specify is established as the default printer for the system.
- 14. Type lpstat -t and press Return. Check the messages displayed to verify that the printer is accepted and enabled.
- 15. Type lp filename and press Return. If you specified a default printer in step 13, you do not need to include the printer destination (-d printer-name). The file you choose is sent to the default printer.
- 16. If the file does not print correctly or is not printed on the correct printer, see the section Printing Problems later in this chapter for help.
After you have set up the local printer, you can set the system up to become a print server. See Print Server Setup for instructions.
The following example is based on a network of five systems. You have one PostScript printer on the network. You designate pine as the print server, because it can support printing for all five systems.
The following characteristics are established for this printer:
- Printer name: pinecone
- Printer type: PS
- File content type: PS
- Device name: /dev/term/b (the port used to connect the printer)
pine% su
# lpstat -r
scheduler is running
# chown lp /dev/term/b
# chmod 6ØØ /dev/term/b
# lpadmin -p pinecone -v /dev/term/b
# lpadmin -p pinecone -T PS
# lpadmin -p pinecone -I PS
# cd /etc/lp/fd
# lpfilter -f download -F download.fd
# lpfilter -f dpost -F dpost.fd
# lpfilter -f postio -F postio.fd
# lpfilter -f postior -F postior.fd
# lpfilter -f postprint -F postprint.fd
# lpfilter -f postreverse -F postreverse.fd
# accept pinecone
destination pinecone now accepting requests
# enable pinecone
printer pinecone now enabled
# lpadmin -p pinecone -D PostScript Laser printer in Building 5,
Room 262
# lpadmin -d pinecone
# lpstat -t
scheduler is running
system default destination: pinecone
device for pinecone: /dev/term/b
pinecone accepting requests since Mon Mar 4 14:37:55 PST 1991
printer pinecone is idle. enabled since Mon Mar 4 14:37:59 PST
1991.available.
# lp -d pinecone /etc/passwd
request id is pinecone-1 (1 file)
#