Note: You will need superuser privileges to perform this procedure.
In this procedure you will modify the /etc/hosts file to identify the printer to the workstation and modify the /etc/printcap file to describe the printer to the workstation.
- Log onto your system as root.
- Make a backup copy of the /etc/hosts file.
- Edit /etc/hosts and add a line that defines the printer's IP address and name.
The IP address entered here must be the same address you specified when configuring the printer's IP address. The name is the name by which your workstation identifies the printer. You will enter this same remote name in your /etc/printcap file in the next step.
Example:
In this example, 134.62.33.138 is the printer's IP address and phaser550 is the remote name.
- Make a backup copy of the /etc/printcap file.
- Edit /etc/printcap and add an entry for your Phaser printer. Refer to the example below and the descriptions of printcap parameters to create your entry.
Example:
# Printer: Tektronix Phaser 550
# Print queue name: colorprinter
# Remote machine name: phaser550
# Remote printer queue name: PS
# Spool directory: /usr/spool/lpd/colorprinter
colorprinter:\
:lp=/dev/null:\
:rm=phaser550:\
:rp=PS:\
:mx#0:\
:lf=/usr/spool/lpd/ERRORLOG:\
:sd=/usr/spool/lpd/colorprinter:
#
Printcap Parameters
You use these printcap parameters: lp, rm, rp, mx, lf and sd.
lp The name of the device to open. This parameter must be left empty or set to /dev/null.
rm The remote machine name. This is the name by which the workstation identifies the printer; it must match the name in the /etc/hosts file. For example, phaser550.
rp The remote printer queue name. This is the queue name that the printer recognizes, valid entries for internal TCP/IP are:
PS - PostScript
PCL - Text
HPGL - HP7475A
AUTO - Auto selection of the above three.
mx The maximum size of a file. Set mx to 0 for unlimited file size. This allows the print command to handle large PostScript or image files.
lf The name of the log file where print command error messages are collected. Some systems have a log file for each print queue, some have one log file for all queues. Refer to your workstation's documentation for more information.
sd The spool directory on your host. You must make a separate spool directory for each queue.
Set up spool directories
After you have edited the /etc/hosts and /etc/printcap files, you must create and set permissions for the spool directory you specified in /etc/printcap. These commands create and set permissions for the spool directory specified in the example above:
cd /usr/spool/lpd
mkdir colorprinter
chown daemon colorprinter
chgrp daemon colorprinter
chmod 770 colorprinter
Refer to your UNIX documentation for the correct command syntax for your workstation.