|
|
To configure a remote printer, execute the rlpconf command. For more information, refer to the rlpconf(ADMN) manual page. This command edits the /etc/printcap file for you. The following example illustrates the use of rlpconf to set up the sunlaser printer to produce an entry in the /etc/printcap file like the one shown at the beginning of this section. Assuming you are logged in as root, invoke the rlpconf command. You see output similar to the following:
Remote Printing ConfigurationEnter information for remote printers or local printers accepting remote printing requests
Please enter the printer name (q to quit):
sunlaser
Is sunlaser a remote printer or a local printer (r/l)?
r
Please enter the name of the remote host that sunlaser is attached to:
ohio
Printer sunlaser is attached to host ohio
Is this correct? (y/n)
y
If 'ohio' 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]
Would you like this to be the system default printer? (y/n)
y
Make sure that your host name appears in ohio's /etc/hosts.equiv or /etc/hosts.lpd file. Make sure that sunlaser appears in ohio's /etc/printcap file (BSD format) Make sure that sunlaser has a spool directory on ohio Putting sunlaser in printer description file and creating spool dir Updating LP information...done Updating /usr/spool/lp/default...done
The above example shows how to configure your client to use a remote printer called sunlaser attached to the print server ohio. After entering the name of the printer and the print server, you must verify the information just entered. If it is correct, enter y. If it is not, enter n, at which point you are asked if you want to try again. Answer y to be prompted again for the name of the printer and the print server. Answer n to exit and return to the shell prompt.
Continuing with the above example, you are asked if you wish to make the printer the system default. Answer y or n. If you answer n, users on the client that wish to route a print job to sunlaser must do so explicitly by using the -d option in the lp command.
Following this query, you are advised to verify certain things on the print server. The rlpconf command now checks that the printer is not already listed in /etc/printcap. If it is, a message to that effect is displayed. If it is not, the printer information is added to /etc/printcap.
In addition, the spool directory for the printer, in this case /usr/spool/lpd/sunlaser, is created and configuration information indicating the name of the printer and the print server is stored in a file called configuration. This file is located in a subdirectory bearing the printer's name under /usr/spool/lp/admins/lp/printers. In this example, the pathname of the file is /usr/spool/lp/admins/lp/printers/sunlaser/configuration. Finally, if the printer is to be the system default, the file /usr/spool/lp/default is updated to contain the name of the printer.
Once you have configured the printer, the screen clears and you see output similar to the following:
Remote Printing ConfigurationEnter q to exit rlpconf and return to the shell prompt.Enter information for remote printers or local printers accepting print jobs.
Please enter the printer name (q to quit):
q
Once you have finished configuring printers, ensure that the RLP daemon lpd is running. You can do this by entering the command ps -fe and verifying that the daemon appears in the listing.
See also: