OpenWindows User's Guide

Changing the Print Method in the Print Tool

Note -

Depending upon your installation, certain printer filter programs should have been installed for the printers you use by the system administrator. If no print filters are installed, your print job will not be printed. Check with your system administrator for the filter programs installed for your printer, or for a complete listing of print filters available and information about the lpfilter command, refer to System Administration Guide.

The Override default print method option allows you to use alternate (command line) print methods within Print Tool. If you need to print a file with another print method (such as troff), you need to override the default print method. You must also use the following environment variables (listed here with their meaning):

$FILE=Name of your file

$PRINTER/$LPDEST=Printer name

$COPIES=Number of copies to be printed

$HEADER=Print header page with job

You can type any command line print method, including UNIX pipes and shell scripts. The print method must be an executable command in your path. For example, if you want to pretty-print a C source file using the vgrind command, you would follow these steps:

  1. Click SELECT on the Properties button.

  2. Click the Override Default Print Method checkbox, and press Apply.

  3. In the Print Method text field, type:

    vgrind $FILE | dpost | lp -d$PRINTER -n$COPIES -Tpostscript
  4. Type the name of the file in the File text field, or drag and drop the file to be printed onto the Print Tool icon or drag and drop target.

    Note -

    The SunOS 5.X print system does not recognize the type of the file to be printed. You must supply the appropriate filter for the file type when using an alternate print method. Otherwise, the file will be printed as a plain ASCII file.

Changing the Print Method with the Binder

You can use the Binder application to view or change the print method bound to specific types of files. This information is stored in the non-ASCII file called cetables in the /usr/openwin/lib/cetables directory and can be viewed using Binder. Once you use Binder to customize this file, the information is stored as .cetables directory in your home directory. For complete information on using Binder, refer to Chapter 16, Binder.