Problem
I have an HP LaserJet 4M printer, and I want to print to it from clients connected to a server via AFPS. The printer's queue is on another SCO OpenServer server; I want to print between the servers via LPD. The clients are Windows 95 and Windows NT workstations.
Solution
Follow the steps detailed below.In this example, "servera" connects to the printer and "serverb" runs AFPS.
+-------+ +---------+ +---------+ +---------+
| HP 4M | --hpnp-- | servera | --lpd-- | serverb | --afps-- | clients |
+-------+ +---------+ +---------+ +---------+1. The print queue for the printer HP LaserJet 4M called "unixprintername" is configured on servera as an HPNP Printer created via hpnpcfg(ADM).
Confirm that the print jobs come out at the Unix level.
Also check that there are no "stty" entries in the interfaces/model.orig/<printer> file, that is, that these are hashed out. Otherwise, you may get this error message via email:
tcgetattr: Inappropriate ... error 252. In order for serverb to see and print to the printer, ensure
that "mkdev rlp" has been run on both servers. Check the directory
/usr/lpd. If there is a directory there called "remote" then mkdev
rlp has been configured on your server. If not, run mkdev rlp and
install the Remote Line Printing service. This must be done on
both servers.The lpd daemon may not always start correctly after a reboot, in which case it may require a stop and start by doing the following:
ps -ef | grep lpd
kill -9 <x> ; where x is the lpd process
cd /usr/lib
./lpd &3. Once the lpd daemon is working on both servers, you can then use the rlpconf(ADMN) command on serverb to configure the printer as unixprintername.
Follow the instructions in rlpconf(ADMN) and you should then be able to print via lpd from serverb to servera using lp.
For example:Remote Printing ConfigurationEnter information for remote printers or local printers accepting remote printing requests
Please enter the printer name (q to quit): unixprintername
Is unixprintername a remote printer or a local printer (r/l)? r
Please enter the the name of the remote host that unixprintername is attached to: servera
Printer unixprintername is connected to host serveraIs this correct? (y/n) yIf 'servera' currently runs SCO OpenServer Release 5 or above, it can support the extended remote line printer protocol. Do you want to turn on the "extended RLP protocol" support flag.
If you're not sure, answer 'n'? (y/n) [n] y Would you like this to be the system default printer? (y/n) [n]
Make sure your host name appears in servera's /etc/hosts.equiv or /etc/hosts.lpd file Make sure that unixprintername appears in servera's /etc/printcap file (BSD form at) Make sure that unixprintername has a spool directory on servera
Please hit <return> to continueta107218 describes in more detail how to configure rlp, but the above instruction will assist in ensuring that at the Unix level the printer can be printed to from both servers.
4. The printer then needs to be configured within AFPS on serverb.
This can be done using the following method:
To make the network-accessible printers available to clients:
net share sh_unixprintername /print /ycd /usr/net/servers/lanman/customsCreate a file called unixprintername, and add the following line to it:
lp -c -dunixprintername $FILENAMEEnter the following commands:chmod 755 unixprintername
net print sh_unixprintername /processor:unixprintername5. In order for the client to print, create a printer on the client and connect to the serverb print queue for sh_unixprintername.
Within the printer's properties, print a Test Page to ensure the printer works successfully.
TROUBLESHOOTING:Should the print job not come out or produce garbage, try the following:
1. Within the /etc/printcap file, remove ":ex:", which is the Extended Protocol flag.
2. Add "-oraw,stty=-post" to the printer custom script in /usr/net/servers/lanman/customs.
Note that the printer may be passed different lp options. These
can be seen by looking at the /usr/spool/lp/temp/<job-id>-0. If
serverb has a duplicate printer enabled under AFPS that doesn't
print via lpd, then this printer could be "disable unixprintername2".
Sending a print job to it via AFPS and looking at the O section in
the file in /usr/spool/lp/temp may reveal more information.3. See /usr/net/servers/lanman/shares/printlog for more information. See also
ta107218, "Configuring SCO UNIX or SCO Open Desktop remote line printing (rlp)."