Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
Technical Print Service System Administrator's Guide: > Chapter 4 Chapter 4: Configuring an X Print Server

X Print Server Configuration Files

» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

SAM creates or modifies these configuration files:

  • /etc/X11/X*screens

  • /etc/X11/X*devices

  • /etc/X11/X*printers

  • /etc/rc.config.d/tps

  • /etc/dt/config/LANG/sys.resources

X*screens file

During configuration, an X*screens file is created in the /etc/X11 directory. The newly created file replaces * with the X print server's display number, which was specified in SAM.

The X*screens file contains this entry:

serverMode XPrint

which specifies that the X server is to be configured as an X print server. If no server option is specified in the X*screens file, the server will default to video mode.

X*devices file

The X*devices file defines the input devices opened by the X server during initialization. When an X print server is configured using SAM, typical input devices such as a keyboard and pointer are turned off. For example, this entry excludes the keyboard and pointer for an X print server.

first NULL keyboard
first NULL pointer

X*printers file

The X*printers file contains a list of printers that are managed by a specific X print server. The Technical Print Service provides a template Xprinters file in /usr/lib/X11/C/print. When you configure an X print server using SAM, this template is copied to /etc/X11. The template file is renamed to reflect the X print server display number.

The X print server reads the X*printers file during initial startup to determine which printers it will manage. The X print server's default behavior is to use lpstat to generate a printer list. If you want, you can also explicitly identify a list of printers (see "To Specify A Printer Explicitly").

Keywords and Values

The X*printers file consists of several keywords followed by a value. Keywords are case sensitive. Comments are preceded by the # (pound sign) character.

The X*printers file uses the following keywords.

Augment_Printer_List

Specifies whether to use lpstat to generate the printer list managed by the X print server. This is the X print server's default behavior. However, you can also explicitly identify a list of printers.

If an Augment_Printer_List entry is absent in the X*printers file, the X print server will invoke the lpstat command.

Valid values for Augment_Printer_List are:

Title not available (X*printers file )

%default%

Invokes lpstat to generate a list of printers. If printers have also been explicitly specified, they are merged with the generated list.

%none%

Specifies that the list of explicitly specified printers should not be supplemented using lpstat.

You can also substitute a different command or modify the default lpstat command.

To do so, place the command line string you want to execute following the Augment_Printer_List keyword.

For example, this entry:

Augment_Printer_List lpstat -a | cut -f1 -d " " | sort

is similar to the default command string used by the X print server. It takes the output from lpstat -a, deletes all but the first field delimited by a space, and pipes the output to the sort command.

Other keywords used in the X*printers file include:

Title not available (X*printers file )

Printer

Specifies a list of printer names managed by the X print server. Each name is separated with a blank space.

Omit

Specifies a list of printer names to exclude from the printer list. Each name is separated with a blank space.

Map

Specifies an alternate name for a printer whose name does not conform to the character set allowable within XRM resource definitions.

NOTE: If you create an X print server and later modify its X*printers file, restart the X print server to have your changes take effect.

To Specify a Printer Explicitly

The X print server's default behavior is to use lpstat to generate a printer list. If you want, you can also explicitly identify a list of printers by editing the X*printers file. To do so, you must have root or superuser permission.

To add a printer, complete these steps:

  1. Edit /etc/X11/X*printers where * represents the X print server display number.

  2. Add this line below the Printer List comment field:

    Printer printername

    where Printer is a keyword and printername is the name of the printer you are adding.

  3. Save your changes.

Example

This entry:

Printer laserjet7 deskjet-admin deskjet-bay2

identifies three printers to be managed by the X print server.

NOTE: If explicitly listed printers are the only printers to be supported by an X print server, be sure that Augment_Printer_List is set to %none%.

Refer to Chapters 5 and 6 for instructions to configure a printer for use with the Technical Print Service.

/etc/rc.config.d/tps

The Technical Print Service uses the XPRINTSERVERS environment variable to identify a list of X print servers to be started at boot time. The file, /etc/rc.config.d/tps, specifies the values for the XPRINTSERVERS environment variable.

Each value consists of two items — an X print server display number and a locale name. Each pair uses this syntax:

displaynumber
locale_name

If multiple pairs are specified, each pair is separated with a blank space.

When the system is booted, the system rc script, /sbin/init.d/tps.rc, reads these values. It starts an X print server with the display number and associated locale for each pair specified in the XPRINTSERVERS variable.

For example, suppose you configure an X print server in a C locale. The system hostname is aurora and the X print server display number is 20.

After configuration, this entry appears in the /etc/rc.config.d/tps file on aurora.

XPRINTSERVERS="20 C"

sys.resources

Applications integrated for use with the Technical Print Service must be able to identify available X print servers. The XpServerList resource is used to maintain a list of local and remote X print servers available for a given locale. The file, /etc/dt/config/LANG/sys.resources, contains this information.

The XpServerList resource uses this syntax:

hostname:displaynumber

where hostname is the name of the local or remote system running an X print server and displaynumber is the X print server display number. Each entry is separated by one or more blank spaces.

Example

This entry in the sys.resources file on workstation1:

*XpServerList: workstation1:12  workstation2:8  workstation3:15

identifies that the X print server on workstation1 (local system) uses display number 12 and that there are two additional remote X print servers available on workstation2 and workstation3.

NOTE: When you create or remove an X print server, the value of the XpServerList resource is modified. This resource is read by all CDE sessions running on the workstation. Your changes will not take effect until you restart your CDE session.

Specifying the X Print Server Interactively

If an application uses the DtPrint Print Setup Dialog box, a user can interactively specify an X print server and printer. This information is entered in the Description field of the Print Setup Dialog.

Specify the name using this syntax:

printer_name@hostname[:displaynumber]

For example, this entry:

colorlj7@printhub:2

instructs the application to use the X print server, printhub:2, and to send the print job to the printer named colorlj7 on that server. This assumes that colorlj7 has already been configured for use with the Technical Print Service.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1997 Hewlett-Packard Development Company, L.P.