|
| 以 PDF 格式下載這本書
Setting Up and Using Printers
11
- This chapter describes how to set up and administer printers after you install Solaris 2.4 software. This chapter also describes the changes to printer commands that have taken place between the SunOS release 4.x and the Solaris 2.4 release.
-
-
User Accounts, Printers, and Mail Administration and Peripherals Administration describe the SunOS release 5.4 setup and installation procedures and user commands for these devices.
Summary of Printing Differences
- The SunOS release 5.4 LP print service replaces the SunOS release 4.x printing facilities, which were provided by the lpd daemon and lpr, lpq, lprm, and lpc commands. The Printer Manager in the Administration Tool lets you set up and administer printers through a graphical user interface. You can also use a command line interface for the LP print service to administer SunOS release
-
- 4 printers. For detailed documentation of the Printer Manager and the command-line interface to the LP service see User Accounts, Printers, and Mail Administration.
- The services provided by the /etc/printcap file in SunOS release 4.x are handled in the Solaris 2.4 operating environment by the terminfo database and by the files in the /etc/lp directory.
The Administration Tool's Printer Manager
- The Administration Tool's Printer Manager simplifies printer setup for local printers (or print servers and remote printing clients) by allowing you to avoid SunOS release 5.4 LP print service commands.
- Because the Printer Manager is a distributed application, you can use it from one system to add, modify, or delete printers on other systems as long as they also have the Printer Manager installed. You cannot set up a SunOS release 4.x system or a non-Solaris system as a print server or print client using Printer Manager, but you can set up a Solaris 2.4 system, which has the Printer Manager, as a print client of a SunOS release 4.x print server.
- The Printer Manager is a distributed Administration Tool application. Its graphical user interface guides you in setting up print servers and print clients as depicted in Figure 11-1.

Figure 11-1
- The Printer Manager has two main functions:
-
- Adds access to a remote printer
- Adds local printer
- You can use the Printer Manager with the following configurations:
-
- 1..................1 · SunOS release 5.x print clients with a SunOS release 5.x print server
- 1 · SunOS release 5.x and SunOS release 4.x print clients with a SunOS 1 release 5.x print server
- SunOS release 5.x1 and SunOS release 4.x print clients with a SunOS release 4.x print server
-
Note - If you want to administer a printer using the Administration Tool, ensure that you have an entry in /etc/group and that you are in group 14. You can edit the file /etc/group to add the entry if you have permissions.
-
Table 11-1 and Table 11-2 list the information you need to have ready for setting up local and remote printers.
-
Table 11-1
| Printer Name | A unique name for the printer (maximum of 14 characters) |
| Comment | A description of the printer |
| Printer Port | The port the printer is connected to |
| Printer Type | A designation for the type of printer that is used to identify the terminfo database entry containing the control sequences that initialize the printer |
| File Contents | The particular format of the file being printed without being filtered (as long as the correct printer software is available) |
| Fault Notification | The method of notifying the superuser in case of a printer error. Choices are: Write to superuser (in the console window), Mail to superuser, or None. |
| System Default | The default printer, the printer your print requests will be sent to if you do not specify a printer |
| User Access List | The print clients that can print to this printer. By default, all print
clients have access to this printer |
- 1. This is true for all SunOS 5.x systems except SunOS 5.0.
-
Table 11-2
| Printer Name | The remote printer name |
| Print Server | The name of the system the remote printer is connected to |
| Comment | Description of the printer that helps you identify it |
| Print Server OS | Print server's operating system, which is either Solaris release 2.x
(System V) or SunOS release 4.1.x (BSD) |
| Default System Printer | The printer your print requests will be sent to if you do not specify a printer |
Setting Up a Printer
- Set up a local printer using either the Administration Tool (if you can run OpenWindows) or the command-line interface. The Administration Tool is easier to use, but some people prefer to run the commands themselves. For detailed information about using the Administration Tool or the command-line interface to set up a local printer, See to User Accounts, Printers, and Mail Administration.
Print Commands and the Compatibility Package
- You can still use many SunOS release 4.x print commands if the system is running the SunOS/BSD Source Compatibility Package. Compatibility mode uses SunOS release 4.x command names as an interface to underlying Solaris 2.4 LP print services and does not actually run them the way a SunOS release 4.x system would. When a user types SunOS release 4.x commands to set up printing or to print files from a Solaris 2.4 system, the commands create message files that are handled by the SunOS release 5.4 LP print service scheduler.
- Solaris 2.4 printing provides additional capabilities not available in SunOS release 4.x systems. These capabilities enable you to control forms, print wheels, and interface programs, and to set up network print services.
Using Printer Commands
- As discussed in a previous section, you can continue to use SunOS release 4.x print commands if you have the SunOS/BSD Source Compatibility Package. Table 11-3 shows the basic user print command equivalents.
-
Table 11-3
| SunOS Release 4.x | SunOS Release 5.4 | Function |
| lpr filename | lp filename | Print a file to the default printer |
| lpr -Pprinter filename | lp -d printer file | Print a file to a specific printer |
| lpq | lpstat -o printer | Look at a list of the files waiting to print on the default printer |
| check /etc/printcap | lpstat -d | Determine which is the default printer |
| check /etc/printcap | lpstat -a | Determine which printers are available |
| lprm jobnumber | cancel jobid | Cancel a print job on the default printer |
Using SunOS 5.4 Printer Administration Commands
- This section describes differences between printer setup and administration on SunOS release 4.x and Solaris 2.4 systems. All the underlying system services described are available only in the Solaris 2.4 operating environment. The SunOS release 4.x counterparts are not available even in compatibility mode.
- You must use the System V printer administration commands, lpadmin(1M) and lpsystem(1M) instead. Use the terminfo database and the configuration files in the /etc/lp directory instead. See User Accounts, Printers, and Mail Administration for details.
-
Table 11-4 shows the command equivalents for setting up printing.
-
Table 11-4
| SunOS Release 4.x | SunOS Release 5.4 | Function |
| lpc | lpadmin | Control line printer functions |
| /etc/printcap | terminfo database and /etc/lp/printers/ printername/* | File that defines printer functions |
| /var/spool | /var/spool/lp | Directory where printing system stores spool and lock files |
| Not available | lpmove | Move print queues between printers |
| lpc down | reject | Stop queueing to a printer |
Printing troff
- In SunOS release 4.x, the following command sent your file to the default printer.
-
- In the Solaris 2.4 operating environment, you must specify that you want the file printed by piping (|) the output to the lp command. Table 11-5 shows the SunOS release 5.4 troff commands.
-
Table 11-5 troff
| SunOS 5. 2 Command | Function |
| troff file |/usr/lib/lp/postscript/dpost|lp | Sends to default printer that supports troff jobs |
| troff file |/usr/lib/lp/postscript/dpost|lp -dprinter | Sends to a particular printer |
| troff file |lp -Ttroff | Sends to any printer that supports troff jobs |
|
|