Solaris 1.x to 2.x Transition Guide
  Rechercher uniquement dans ce livre
Télécharger cet ouvrage au format PDF

Setting Up and Using Printers

11

This chapter describes how to set up and administer printers after you install Solaris 2.5 software. This chapter also describes the changes to printer commands that have taken place between the SunOS release 4.x and the Solaris 2.5 release.
Summary of Printing Differencespage 117
Print Commands and the Compatibility Packagepage 118
Using Printer Commandspage 118

Summary of Printing Differences

The SunOS release 5.5 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. Admintool 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 5.5 printers. For detailed information about Admintool and the command-line interface to the LP service, see System Administration Guide, Volume I.
The services provided by the /etc/printcap file in SunOS release 4.x are handled in the Solaris 2.5 operating environment by the terminfo database and by the files in the /etc/lp directory.

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.5 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.5 system, the commands create message files that are handled by the SunOS release 5.5 LP print service scheduler.
Solaris 2.5 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-1 shows the basic user print command equivalents.
Table 11-1
SunOS Release 4.xSunOS Release 5.5Function
lpr filenamelp filenamePrint a file to the default printer
lpr -Pprinter filenamelp -d printer filePrint a file to a specific printer
lpqlpstat -o printerLook at a list of the files waiting to print on the default printer
check /etc/printcaplpstat -dDetermine which is the default printer
check /etc/printcaplpstat -aDetermine which printers are available
lprm jobnumbercancel jobidCancel a print job on the default printer

Using SunOS 5.5 Printer Administration Commands

This section describes differences between printer setup and administration on SunOS release 4.x and Solaris 2.5 systems. All the underlying system services described are available only in the Solaris 2.5 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 System Administration Guide, Volume II for details.
Table 11-2 shows the command equivalents for setting up printing.
Table 11-2
SunOS Release 4.xSunOS Release 5.5Function
lpclpadminControl line printer functions
/etc/printcapterminfo database and /etc/lp/printers/ printername/*File that defines printer functions
/var/spool/var/spool/lpDirectory where printing system stores spool and lock files
Not availablelpmoveMove print queues between printers
lpc downrejectStop queueing to a printer

Printing troff

In SunOS release 4.x, the following command sent your file to the default printer.

  % troff filename  

In the Solaris 2.5 operating environment, you must specify that you want the file printed by piping (|) the output to the lp command. Table 11-3 shows the SunOS release 5.5 troff commands.
Table 11-3 troff
SunOS 5. 2 CommandFunction
troff file |/usr/lib/lp/postscript/dpost|lpSends to default printer that supports troff jobs
troff file |/usr/lib/lp/postscript/dpost|lp -dprinterSends to a particular printer
troff file |lp -TtroffSends to any printer that supports troff jobs