This procedure describes how to add a new network-attached printer with the expanded printer support that enables you to associate a PPD file with a printer during its configuration. There are two examples that follow this procedure. The first example illustrates how to add a new network-attached printer with PPD files by using lp commands. The second example shows how to add a new network printer without PPD files by using lp commands.
The following steps are required to set up a network-attached printer by using the network printer support software. The use of this software is intended for printers that do not come with vendor-supplied software.
Connect the printer to the network, and turn on the power to the printer.
Consult the printer vendor's installation documentation for information about the hardware switches and cabling requirements. Get an IP address and select a name for the printer node. This step is equivalent to adding any node to the network.
Collect the information that is required to configure a new network-attached printer with PPD files.
Printer name and port device
Network printer access name
Protocol
Timeout
File content type
PPD file
To determine the PPD file, first define the printer make, model, and driver that the printer will use.
For more information, see the terms that are described in Setting Up Network-Attached Printers by Using LP Print Commands.
On the print server, log in and become superuser or assume an equivalent role.
Define the printer name, port device, file content type, and PPD file that the printer will use. When using PPD files, the file content type is usually PostScript.
Specify the printer name and the port device that the printer will use.
# lpadmin -p printer-name -v /dev/null |
The device to use is /dev/null.
You can use the -s option with the lpadmin command to specify the print service host name as localhost. For more information, see How to Add a Print Queue With localhost Specified as the Host Name (LP Print Commands).
You can use the -v option to specify a device-uri. The protocol enables you to access remote printers. For more information, see Using Printing Protocols in the Oracle Solaris Release.
Specify the interface script that the printer will use.
# lpadmin -p printer-name -m netstandard_foomatic |
The interface script that is supplied with the support software for a network-attached printer is /usr/lib/lp/model/netstandard_foomatic.
Specify the file content type and PPD file that the printer will use.
When using PPD files, the file content type is usually PostScript.
# lpadmin -p printer-name -I content-type -n /path/ppdfile |
The PPD file that you specify is located in the /path directory.
If /path is not a PPD file repository on the system, then a copy of PPD file is placed in the user label directory in the user PPD file repository. For more information, see Chapter 11, Administering Printers by Using the PPD File Management Utility (Tasks).
For more information, see lpadmin(1M) man page.
Specify the printer description.
# lpadmin -p printer-name -D "printer-description" |
Set the printer destination, protocol, and timeout values.
# lpadmin -p printer-name -o dest=access-name:port -o protocol=protocol -o timeout=value |
Specifies the network printer name.
Sets the printer destination to the network printer access name and a designated printer vendor port, if the port is defined in the printer vendor documentation.
Sets the over-the-wire protocol used to communicate with the printer. Both BSD and raw TCP are supported.
Sets a retry timeout value that represents a number of seconds to wait between attempting connections to the printer.
(Optional) Add filters to the print server.
# cd /etc/lp/fd # for filter in *.fd;do > name=`basename $ filter .fd` > lpfilter -f $name -F $ filter > done |
Enable the printer to accept print requests and to print those requests.
# accept printer-name # enable printer-name |
Verify that the printer is correctly configured.
# lpstat -p printer-name |
Add client access to the new printer.
After the printer has been configured , create access to the printer for the print clients. For more information, see Adding Printer Access by Using LP Print Commands. For information about how to define a print client by using a naming service, see Printing Support in the Naming Service Switch.
Complete any optional tasks.
There are several optional tasks that you might want to complete when setting up a printer. For pointers to the remaining tasks, see Configuring the Internet Printing Protocol (Task Map). For information about how to define print clients by using the naming service, see Printing Support in the Naming Service Switch.
This example shows how to add a new network-attached printer with PPD files. The -n option of the lpadmin command enables you to add a new print queue by specifying a PPD file. The commands that are used in this example must be executed on the print server. The following information is used as an example only. The information that you provide will vary.
Printer name : luna1
Device: /dev/null
Interface: /usr/lib/lp/model/netstandard_foomatic
Network printer access name: nimquat:9100
Protocol: tcp
Timeout: 5
File content type: postscript
PPD file: /path/ppdfile
# lpadmin -p luna1 -v /dev/null (1) # lpadmin -p luna1 -m netstandard_foomatic (2) # lpadmin -p luna1 -o dest=nimquat:9100 -o protocol=tcp -o timeout=5 (3) |
# lpadmin -p luna1 -I postscript (4) # lpadmin -p luna1 -n /path/ppdfile (5) # lpadmin -p luna1 -D "Second floor color printer"(6) # cd /etc/lp/fd # for filterin *.fd;do > name =`basename $ filter .fd` > lpfilter -f $ name -F $ filter > done (7) # accept luna1 destination "luna1" now accepting requests # enable luna1 (8) printer "luna1" now enabled # lpstat -p luna1 (9) printer luna1 is idle. enabled since Mon Apr 19 15:31:15 2004. available. |
Defines printer name and sets the device to /dev/null
Defines the interface script for network printers
Sets the destination, protocol, and timeout
Specifies the file content types to which the printer can print to directly
Specifies the PPD file to use
Adds a description for the printer
Adds print filters to the print server
Accepts print requests for the printer and enables the printer
Verifies that the printer is ready for printing
This example shows how to add a new network-attached printer without specifying a PPD file. These commands must be executed on the print server. The following information is used for example purposes only.
Printer name: luna1
Device: /dev/null
Interface: /usr/lib/lp/model/netstandard
Network printer access name: nimquat:9100
Protocol: tcp
Timeout: 5
File content type: postscript
Printer type: PS
# lpadmin -p luna1 -v /dev/null (1) # lpadmin -p luna1 -m netstandard (2) # lpadmin -p luna1 -o dest=nimquat:9100 -o protocol=tcp -o timeout=5 (3) # lpadmin -p luna1 -I postscript -T PS (4) # lpadmin -p luna1 -D "Room 1954 ps" (5) # cd /etc/lp/fd # for filter in *.fd;do > name =`basename $ filter .fd` > lpfilter -f $ name -F $ filter > done (6) # accept luna1 destination "luna1" now accepting requests # enable luna1 (7) printer "luna1" now enabled # lpstat -p luna1 (8) printer luna1 is idle.enabled since Feb 28 11:21 2003.available. |
Defines printer name and sets the device to /dev/null
Defines the interface script for network printers
Sets the destination, protocol, and timeout
Specifies the file content type to which the printer can print directly, and the printer type
Adds a description for the printer
Adds print filters to the print server
Accepts print requests for the printer and enables the printer
Verifies that the printer is ready for printing