Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
5.  Administering Printers (Tasks) Setting or Resetting Miscellaneous Printer Definitions How to Add a Printer Description  Previous   Contents   Next 
   
 

Example--Adding a Printer Description

The following example shows how to add a printer description for the printer luna.

# lpadmin -p luna -D "Nathans office"

Setting Up a Default Printer Destination

You can specify a default printer destination for a user so the user doesn't need to type the printer name when using the print commands. Before you can designate a printer as the default, the printer must be known to the print service on the system. You can set a user's default printer destination by setting any of the following:

  • LPDEST environment variable

  • PRINTER environment variable

  • The _default variable in the user's .PRINTERS file

  • The system's default printer (by using the lpadmin -d command or Solaris Print Manager

When an application provides a printer destination, that destination is used by the print service, regardless of whether you have set a system's default printer destination. If an application doesn't provide a printer destination or if you don't provide a printer name when using a print command, the print command searches for the default printer in a specific order. The following table shows the search order for a system's default printer destination.

Table 5-1 Search Order for Default Printer Destinations

Search Order

Using /usr/bin/lp Command

Using lpd-Based Compatibility Commands (lpr, lpq, and lprm)

First

LPDEST variable

PRINTER variable

Second

PRINTER variable

LPDEST variable

Third

System's default printer

System's default printer

How to Set a System's Default Printer

  1. Log in as superuser, lp, or assume an equivalent role on the system where you want to set a default printer.

  2. Set the system's default printer.

    # lpadmin -d [printer-name]

    -d printer-name

    Name of the printer you are assigning as the system's default printer. If you don't specify printer-name, the system is set up with no default printer.

    The default printer name is entered in the system's /etc/lp/default file.

  3. Check the system's default printer.

    $ lpstat -d

Example--Setting a System's Default Printer

The following example shows how to set the printer luna as the system's default printer. This means that luna is used as the system's default printer if the LPDEST or PRINTER environment variables are not set.

# lpadmin -d luna
# lpstat -d
system default destination: luna

Printing Banner Pages

A banner page identifies who submitted the print request, the print request ID, and when the request was printed. A banner page will also have a modifiable title to help users identify their printouts.

Banner pages make identifying the owner of a print job easy, which is especially helpful when many users submit jobs to the same printer. Printing banner pages uses more paper, however, and might not be necessary if a printer has only a few users. In some cases, printing banner pages is undesirable. For example, if a printer has special paper or forms mounted, like paycheck forms, printing banner pages might cause problems.

By default, the print service forces banner pages to be printed. However, you can give users a choice to turn off printing of a banner page when they submit a print request. You can set this choice through the lpadmin command or through Solaris Print Manager. If you give the users a choice, they have to use the -o banner option to turn off banner page printing.

Also, you can turn off banner pages for a printer so they are never printed. This is important if you have a situation where you don't need or want banner pages. You can turn off banner page printing by using the lpadmin command.

Table 5-2 Banner Page Printing

Command Used

Banner Page Printing

Override?

lpadmin -p printer -o banner or

lpadmin -p printer -o banner=always

Required and printed

If you are a regular user and use p -o nobanner, the request is printed, but the nobanner argument is ignored.

If you are root or another privileged user, the nobanner argument is honored.

lpadmin -p printer -o nobanner

lpadmin -p printer -o banner=optional

On by default, but can be disabled on a per request basis with the lp -o nobanner command.

N/A

lpadmin -p printer -o banner=never

Disabled

No

For step-by-step command-line instructions, see "How to Turn Off Banner Pages".

How to Make Banner Pages Optional

  1. Log in as superuser, lp, or assume an equivalent role on the print server.

  2. Make banner pages optional.

    # lpadmin -p printer-name -o banner=optional

    -p printer-name

    Name of the printer for which you are making banner pages optional.

    -o banner=optional

    Enables users to specify no banner page when they submit a print request.

    If you want to force a banner page to print with every print request, specify the -o banner=always option.

    The banner page setting is entered in the print server's /etc/lp/printers/printer-name/configuration file.

  3. Verify that the output from the following command contains the line Banner not required.

    $ lpstat -p printer-name -l

Example--Making Banner Pages Optional

The following example shows how to make the banner page optional on the printer luna.

# lpadmin -p luna -o banner=optional

How to Turn Off Banner Pages

  1. Log in as superuser, lp, or assume an equivalent role on the print server.

  2. Turn off banner printing.

    lpadmin -p printer-name -o banner=never

    -p printer-name

    Name of the printer for which you are making banner pages optional.

    -o banner=never

    Disables banner page printing under all circumstances.

    The banner page setting is entered in the print server's /etc/lp/printers/printer-name/configuration file.

  3. Verify that the output from the following command contains the line Banner not printed.

    $ lpstat -p printer-name -l
  4. Submit a print request to the printer to make sure a banner page does not print.

Example--Turning Off Printing Banner Pages

The following example shows how to disable printing banner pages on the printer luna.

# lpadmin -p luna -o banner=never

Setting Up Printer Classes

The print service enables you to group several locally attached printers into one class. You can perform this task only by using the lpadmin -c command.

When you have set up a printer class, users can then specify the class (rather than individual printers) as the destination for a print request. The first printer in the class that is free to print is used. The result is faster turnaround because printers are kept as busy as possible.

There are no default printer classes known to the print service. Printer classes exist only if you define them. Here are some ways you could define printer classes:

  • By printer type (for example, PostScript)

  • By location (for example, 5th floor)

  • By work group or department (for example, Accounting)

Alternatively, a class might contain several printers that are used in a particular order. The LP print service always checks for an available printer in the order in which printers were added to a class. Therefore, if you want a high-speed printer to be accessed first, you would add it to the class before you add a low-speed printer. As a result, the high-speed printer would handle as many print requests as possible. The low-speed printer would be reserved as a backup printer when the high-speed printer is in use.


Note - Print requests are balanced between printers in a class only for local printers.


Class names, like printer names, must be unique and can contain a maximum of 14 alphanumeric characters and underscores.

You are not obligated to define printer classes. You should add them only if you determine that using printer classes would benefit users on the network.

 
 
 
  Previous   Contents   Next