Problem
What do I need to configure to print to a Lexmark Print Server using SCO OpenServer?
Solution
First, add the IP address of the printer to /etc/hosts.
Next, check network connectivity by pinging the printer name.
The printer name must be the same name as defined on the Lexmark Printer server.
Run the command:scoadmin "Printer Manager"Select "Printer".Select "Add Remote".Select "UNIX".If the "Remote Printing Service" is not present (rlp), you
will be prompted to add it. Select "OK" to add the service.For the "Host" name, enter the name of the printer.
For the Printer Name, put the name of the printer for port 0, for example:
lexmark0Additional ports will have a numeric extension, for example:
lexmark1Do not try to use the "Select" command to browse the printer as this will not be able to communicate with the Lexmark printer. This tool is expecting another Unix server to be present.
De-select the Extended remote printing protocol (only available if
printer host is running SCO OpenServer Release 5 or above). If
you select this by mistake, it can be removed manually by taking
out the ":ex" entry in /etc/printcap.You can then press "OK" to add the printer.
Once the printer is added, select "Host", then select "Exit".
You should now be able to print to the printer. You may need
to add carriage return line feeds to the end of each line using
the "addcr" command. Such as::
# addcr/addcrff - filters to add CARRIAGE RETURN to LINEFEED in text
#
# Usage: addcr [file]
# or: addcrff [file]
#
# where: file - is file name. Defaults to stdin
#
# addcr adds CR to each LF
# addcrff also appends a FORMFEED at end of input
#
# eg: addcr my.file | lp
# addcrff < my.file > /dev/lp
#
# Portability:
# Should run on any version of shellCR=`echo | tr '\012' '\015'`
sed "s/$/$CR/" $*
case "$0" in
*addcrff) echo | tr '\012' '\014';;
esacNOTE: Once the "rlp" service has been installed take care when using
the "custom -V quick" or "integrity" commands as this will report
errors for the files "lp", "lpstat", "lpmove" and "cancel".This is not correct as these files now have different permissions
as they have been copied in from /usr/lpd/remote and "custom" is
comparing against the original file permissions. These files were
copied into /usr/lpd/local when the Remote Printing Service (rlp)
was added.NOTE: It would not be possible to have a different name other than the
printer queue name in /etc/hosts or have a class of printer with a
pseudo-name. The name of the printer must match the name of the
queue.NOTE: To add the filter permanently to OpenServer 5.0.6 you can add it to
/etc/printcap as:# Remote Line Printer (BSD format)
p-supadm:\
:lp=:rm=p-supadm:rp=p-supadm:sd=/usr/spool/lpd/p-supadm:mx#0:
of=/local/bin/lp_addcr:Where /local/bin/lp_addcr is in the format:#!/bin/sh
exec /local/bin/addcrand /local/bin/addcr is the script as defined above.
This will automatically filter the text file and add carriage returns.
Ensure there is sufficient permission for "lp" to access these files.
TROUBLESHOOTING:
---------------- Not adding the line in /etc/hosts can result in the error message:
UNABLE TO GET HOSTNAME FOR REMOTE MACHINEwhen trying to print as /etc/printcap "rp" can't resolve it.
- I've deleted the printer using /usr/lib/lpadmin -x and it's still there in "scoadmin printer".
It is recommended to use "scoadmin printer" to delete the printers from the lp print queue.
- I've added the printer but I can't print, says it doesn't exist:
UX:accept: ERROR: Destination "pcanon" is unknown to the LP print service.
Try:# /usr/lib/lpshut
# /usr/lib/lpsched
# enable <printer>
# accept <printer> See also
ta107426, "How to set up rlp after removing and re-installing the LPR package."
ta107448, "Get error "UX:LP:ERROR: Can't establish contact with
lp print services."ta107455, "Root can print locally but users cannot. Remote printing is configured."
ta107488, "Invoke lp as non-superuser, reports "lp: cannot execute 'lp' command."