Skip Navigation Links | |
Exit Print View | |
![]() |
System Administration Guide: Printing Oracle Solaris 10 8/11 Information Library |
1. Introduction to Printing in the Oracle Solaris Operating System
2. Planning for Printing (Tasks)
3. Setting Up Network Printing Services (Tasks)
4. Setting Up and Administering Printers by Using Oracle Solaris Print Manager (Tasks)
5. Setting Up Printers by Using LP Print Commands (Tasks)
Setting Up Printers by Using LP Print Commands (Task Map)
Setting Up Directly Attached Printers by Using LP Print Commands
Specifying a PPD File When Setting Up a Printer
How to Add a New Directly Attached Printer by Using LP Print Commands
How to Add a Print Queue With localhost Specified as the Host Name (LP Print Commands)
Setting Up Network-Attached Printers by Using LP Print Commands
Oracle Support for Network Printers
Invoking Network Printer Support
Selecting the Printer Node Name
Selecting the Destination Name (Also Called the Network Printer Access Name)
Selecting the Network Printing Protocol
Managing Network-Attached Printer Access
How to Add a New Network-Attached Printer by Using LP Print Commands
How to Set Up a Remote Printer That is Connected to a Print Server by Using IPP
Adding a New Network-Attached Printer by Using Printer Vendor-Supplied Software
How to Add a Attached Network Printer by Using Printer Vendor-Supplied Tools
Setting Up and Administering Printers on a Print Client (Task Map)
Adding Printer Access by Using LP Print Commands
How to Add Printer Access by Using LP Print Commands
How to Set Up a .printers File
How to Delete a Printer and Remove Printer Access by Using LP Print Commands
6. Administering Printers by Using LP Print Commands (Tasks)
7. Customizing LP Printing Services and Printers (Tasks)
8. Administering the LP Print Scheduler and Managing Print Requests (Tasks)
9. Administering Printers on a Network (Tasks)
10. Administering Character Sets, Filters, Forms, and Fonts (Tasks)
11. Administering Printers by Using the PPD File Management Utility (Tasks)
12. Printing in the Oracle Solaris Operating System (Reference)
13. Troubleshooting Printing Problems in the Oracle Solaris OS (Tasks)
The following table describes each of the printer definitions that you can define when setting up a new printer or modifying an existing printer by using the lpadmin command.
|
To specify a PPD file when adding or modifying a printer by using LP print commands, use the lpadmin command with the -n option. For example, to add a print queue named foobar for a Lexmark printer, you would type the following command:
# lpadmin -p foobar -v device -I postscript -m standard_foomatic \ -n /path/Lexmark-Optra_E312-Postscript.ppd.gz
When using the lpadmin -n command to specify a PPD file, you must provide the full path to the PPD file.
If you use the lpadmin -n command to add a PPD file, and the repository that you specify in the PPD file path does not exist on the system, a copy of the PPD file is stored in the user label directory, within the user repository. This directory is located at /var/lp/ppd/user/manufacturer/ppd-file. The Oracle Solaris Print Manager cache is then updated to reflect the printer information from the recently added PPD file. For more information, see the ppdmgr(1M) man page.
This procedure describes how to add a new attached printer specifying a PPD file by using the lpadmin command with the -n option. Two examples follow this procedure. The first example illustrates how to add a new attached printer that is associated with a PPD file. The second example shows how to add a new attached printer that is not associated with a PPD file.
Consult the printer vendor's installation documentation for information about the hardware switches and cabling requirements.
Printer name and port device
File content type
PPD file
To determine the PPD file that the printer will use, first define the printer make, model, and driver.
For overview information about using PPD files when adding a new printer or modifying an existing printer by using LP print commands, see What's New in Printing?.
When using PPD files, the file content type is typically PostScript.
# lpadmin -p printer-name -v /dev/printers/0
The device to use is /dev/printers/0.
You can now 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).
# lpadmin -p printer-name -m standard_foomatic
# lpadmin -p printer-name -I content-type -n /path/ppdfile
The PPD file that you supply is located in the /path directory.
Note - If /path is not a PPD file repository on the system, then a copy of the PPD file is placed in the user label directory in the user PPD file repository. For more information, see Administering PPD Files by Using the PPD File Management Utility (Task Map).
# lpadmin -p printer-name -D "printer-description"
For more information, see the lpadmin(1M) man page.
# cd /etc/lp/fd # for filter in *.fd;do > name=`basename $filter .fd` > lpfilter -f $ name-F $ filter > done
# accept printer-name # enable printer-name
# lpstat -p printer-name -l
The output of the lpstat command will list the PPD file that you used.
Example 5-1 Adding a New Directly Attached Printer by Specifying a PPD File
This example shows how to add a new attached printer with PPD files. Using the -n option with the lpadmin command enables you to add a new print queue by specifying PPD files. The following information is used as an example only.
Printer name: paper
Port device: /dev/printers/0
File content type: postscript
PPD file: /path/Lexmark-Optra_E312-Postscript.ppd.gz
# lpadmin -p paper -v /dev/printers/0 (1) # lpadmin -p paper -I postscript (2) # lpadmin -p paper -m standard_footmatic (3) # lpadmin -p paper -n /path/Lexmark-Optra_E312-Postscript.ppd.gz(4) # lpadmin -p paper -D "Color printer on third floor, rm 3003" (5) # cd /etc/lp/fd # accept paper destination “paper” now accepting requests # enable paper (6) printer “paper” now enabled # lpstat -p paper (7) printer paper is idle. enabled since Feb 28 11:21 2004...
Defines the printer name and the port device that the printer will use
Sets the file content types to which the printer can print to directly
Specifies the interface script for utilizing PPD files
Note - This command also copies the PPD file to the user label in the user PPD file repository, if /path is not in an existing PPD file repository on the system.
Specifies the path to the PPD file and the PPD file name
Adds a description for the printer
Accepts print requests for the printer and enables the printer
Verifies that the printer is ready for printing
Example 5-2 Adding a New Directly Attached Printer Without Specifying a PPD File
This example shows how to add a new attached printer without associating it with a PPD file. The commands in this example must be executed on the print server where the printer is connected. The following information is used as an example only.
Printer name: luna
Port device: /dev/term/b
Printer type: PS
File content type: postscript
# chown lp /dev/term/b # chmod 600 /dev/term/b (1) # lpadmin -p luna -v /dev/term/b (2) # lpadmin -p luna -T PS (3) # lpadmin -p luna -I postscript (4) # lpadmin -p luna -D "Room 1954 ps" (5) # cd /etc/lp/fd # accept luna destination “luna” now accepting requests # enable luna (6) printer “luna” now enabled # lpstat -p luna (7) printer luna is idle.enabled since Feb 28 11:21 2003.available
Gives lp ownership and sole access to a port device
Defines the printer name and the port device that the printer will use
Sets the printer type of the printer
Specifies the file content types to which the printer can print directly
Adds a description for the printer
Accepts print requests for the printer and enables the printer
Verifies that the printer is ready for printing
See Also
How to Add Printer Access by Using Oracle Solaris Print Manager to add printer access on a print client.
How to Set Up a .printers File to allow users to customize printer aliases.
This procedure shows how to use LP print commands to add a local print queue with the localhost option specified as the host name in the print system databases. Note that you can also modify a configured print queue to use localhost as the host name.
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.
# lpadmin -p new-print-queue -s localhost -v device
# lpget new-print-queue new-print-queue: bsdaddr=abc,new-print-queue,Solaris
If the print queue was created or modified successfully, the output of the lpget command returns the name of the new or modified print queue.
Example 5-3 Adding a Print Queue With localhost Specified as the Host Name
This example shows how to add a new print queue, paper, by using the lpadmin command with the -s option to specify localhost as the host name.
$ su - root # lpadmin -p paper -s localhost -v /dev/ecpp0 # lpget paper paper: bsdaddr=localhost,paper,Solaris
Example 5-4 Adding a Print Queue by Using the Default Behavior of lpadmin to Specify the Host Name
This example shows the default behavior of the lpadmin command for using system host name, abc, when adding a new print queue.
$ su - root # lpadmin -p newspaper -v /dev/printers/0 # lpget newspaper fargo: bsdaddr=abc,newspaper,Solaris
Example 5-5 Modifying a Print Queue to Use localhost as the Host Name
This example shows how to modify an existing print queue, newspaper, and specify localhost as the new print server name.
$ su - root # lpadmin -p newspaper -s localhost # lpget newspaper newspaper: bsdaddr=localhost,newspaper,Solaris
See Also
For information about specifying localhost as the print server's host name when adding or modifying a print queue with Oracle Solaris Print Manager, see How to Add a Print Queue With localhost Specified as the Host Name (Oracle Solaris Print Manager).