[an error occurred while processing this directive]

HP OpenVMS Systems Documentation

Content starts here

HP DECwindows Motif for OpenVMS
New Features


Previous Contents Index

2.5.2.8 Generating Authorization Keys

When the SECURITY extension is enabled on an X display server, you can generate additional authorization keys. Generated keys enable you to further manage server access and control the type of operations performed over the connection. For example, you can revoke a generated key at will, set it to expire after a certain time period, or use it to further grant or restrict the operations (at the X atom level) that can be performed over the connection.

Use the XAUTH GENERATE command to produce a new authorization key. Note that the generated key overwrites any existing key for the current session. To preserve the existing key, specify an alternate X authority file on the XAUTH command line.

For example, the following commands specify the alternate X authority file UNTRUSTED.DECW$XAUTH, generate and display a new key for the local display, and write the generated key to the alternate file:


$  XAUTH -f UNTRUSTED.DECW$XAUTH
Using authority file untrusted.decw$xauth
xauth> LIST :0
local/ZEPHYR:0  MIT-MAGIC-COOKIE-1  cfcc5ef98f9718f90154f355c0ae9f62
xauth> GENERATE :0
xauth> LIST :0
local/ZEPHYR:0  MIT-MAGIC-COOKIE-1  cfcc4ff77f3709c46222c355f0ea1c93
xauth> EXIT
Writing X authority file untrusted.decw$xauth

2.5.3 X Keyboard Compiler Utility (xkbcomp)

V1.3

The Keyboard Compiler utility (xkbcomp) compiles X Keyboard source files into loadable X Keyboard layout (.XKM) files. Using xkbcomp, you can customize the standard layouts provided with the X Window System by creating or modifying the component source files.

For information about enabling and using XKB and X Keyboard keymaps, see the HP DECwindows Motif for OpenVMS Management Guide.

To run this utility, define xkbcomp as a foreign command:


$ xkbcomp == "$SYS$SYSTEM:DECW$XKBCOMP"

The command format for xkbcomp is as follows:


$ xkbcomp [-options...] input-file [output-file]

Table 2-9 Keyboard Compiler Options
Option Description
-a Specifies that all user actions be displayed.
-C Creates a C header file during compilation.
-em1 message Prints the specified message before printing any informational or error messages.
-emp message Prints the specified message at the start of each line of messages.
-eml message Prints the specified message after any informational or error messages.
-dflts Specifies that the compiler generate default values for any missing parameters.
-I [ directory] Specifies the top level directory for include statements. A comma-separated list of multiple directories is allowed.
-l [ flags] Specifies that a list of matching keymap files be displayed, where flags can be one or more of the following options:
  • f: lists fully-specified filenames
  • h: lists hidden keymap files
  • l: generates a long list
  • p: lists partial keymap files
  • r: lists recursive subdirectories

The default of -l with no flags turns all options off.

-map keymap file Specifies the keymap file to compile.
-merge Merges the keymap file with the keymap currently residing on the server.
-o file Specifies the fully-qualified name of the compiled keymap (.XKM) file.
-optional parts Specifies optional components of a keymap file, where parts can be any combination of:
  • c: compatibility map
  • g: geometry
  • k: keycodes
  • s: symbols
  • t: types

Note that errors in specifying optional components are not fatal.

-R [ DIRECTORY] Specifies the directory in which the component source files are located.
-synch Forces keymap synchronization.
-w [ level] Sets the warning level for compiler errors, ranging from 0 (none) to all (10).
-xkb Generates an X keyboard (.XKB) source file.
-xkm Generates a compiled keymap (.XKM) file.

For information about the keyboard components database, see the HP DECwindows Motif for OpenVMS Management Guide.

2.5.4 Window Dump to Print File (xpr) Utility

V1.2

The Window Dump to Print File utility prints an X Window dump using the xpr program.

The xpr program receives as input a window dump file produced by the Window Dump utility (xwd) and formats it for output on the following printers:

  • PostScript
  • DIGITAL LN03 or LA100
  • IBM PP3812 page printer
  • HP LaserJet (or other PCL printers)
  • HP PaintJet

To use the xpr program, define xpr as a user-defined command:


$ xpr == "$DECW$UTILS:XPR"

You must specify an input file. The xpr program prints the largest possible representation of the window on the output page. Options allow the user to add headers and trailers, specify margins, adjust the scale and orientation, and append multiple window dumps to a single output file.

Use the following command format:


$ xpr input_file [options...]

Options include:


    -append filename  -noff  -output filename
    -compact
    -device {ln03 | la100 | ps | lw | pp | ljet | pjet | pjetxl}
    -dump
    -gamma correction
    -gray {2 | 3 | 4}
    -height inches  -width inches
    -header string  -trailer string
    -landscape  -portrait
    -left inches  -top inches
    -noposition
    -nosixopt
    -plane n
    -psfig
    -render type
    -report
    -rv
    -scale scale
    -slide
    -split n-pages

Table 2-10 defines the available options.

Table 2-10 Window Dump to Print File Options
Option Description
-device devtype Specifies the device on which the file is printed.

Currently supported devices:

la100 DIGITAL LA100.
ln03 DIGITAL LN03.
ljet HP LaserJet series and other monochrome PCL devices such as ThinkJet, QuietJet, RuggedWriter, HP series, and HP-series printers.
pjet HP PaintJet (color mode).
pjetxl HP PaintJet XL Color Graphics Printer (color mode).
pp IBM PP3812.
ps PostScript printer.
lw LaserWriter is equivalent to -device ps and is provided only for backwards compatibility.

The default is PostScript.

-scale scale Affects the size of the window on the page. The PostScript, LN03, and HP printers can translate each bit in a window pixel map into a grid of a specified size. For example, each bit might translate into a 3x3 grid. This would be specified by -scale 3. By default, a window is printed with the largest scale that will fit onto the page for the specified orientation.
-height inches Specifies the maximum height of the page.
-width inches Specifies the maximum width of the page.
-left inches Specifies the left margin in inches. Fractions are allowed. By default the window is centered in the page.
-top inches Specifies the top margin for the picture in inches. Fractions are allowed.
-header string Specifies a header string to be printed above the window.
-trailer string Specifies a trailer string to be printed below the window.
-landscape Forces the window to be printed in landscape mode. By default, a window is printed so that its longest side follows the long side of the paper.
-portrait Forces the window to be printed in portrait mode. By default a window is printed so that its longest side follows the long side of the paper.
-plane number Specifies which bit plane to use in an image. The default is to use the entire image and map values into black and white based on color intensities.
-gray Uses a 2x2, 3x3, or 4x4 gray scale conversion on a color image, rather than mapping to strictly black and white. This doubles, triples, or quadruples the effective width and height of the image.
-rv Forces the window to print in reverse video.
-compact Uses run-length encoding for compact representation of windows with white pixels.
-output filename Specifies an output file name.
-append filename Specifies a file name previously produced by xpr to which the window is to be appended.
-noff When specified in conjunction with -append, the window appears on the same page as the previous window.
-split n-pages Allows the user to split a window onto several pages. This might be necessary for very large windows that would otherwise cause the printer to overload and print the page in an obscure manner.
-psfig Suppresses translation of the PostScript picture to the center of the page.
-density dpi Indicates dot-per-inch density to be used by the HP printer.
-cutoff level Changes the intensity level where colors are mapped to either black or white for monochrome output on a LaserJet printer. The level is expressed as percentage of full brightness. Fractions are allowed.
-noposition Causes header, trailer, and image positioning command generation to be bypassed for LaserJet, PaintJet and PaintJet XL printers.
-gamma correction Changes the intensity of the colors printed by the PaintJet XL printer. The correction is a floating-point value in the range 0.00 to 3.00. Consult the operator's manual to determine the correct value for the specific printer.
-render algorithm Allows the PaintJet XL printer to render the image with the best quality versus performance tradeoff. Consult the operator's manual to determine the available algorithms.
-slide filename Allows overhead transparencies to be printed using the PaintJet and PaintJet XL printers.

The program contains the following limitations:

  • Support for PostScript output currently cannot use the -append, -noff, or -split options.
  • The -compact option is only supported for PostScript output. It compresses white space but not black space, so it is not useful for reverse-video windows.
  • For color images, map directly to PostScript image support.

Program limitations with an LN03 printer:

  • The current version of xpr can print most X Windows that are not larger than two-thirds of the screen.
    For example, the LN03 prints a large Emacs window, but fails when trying to print the entire screen.
  • The LN03 has memory limitations that cause it to incorrectly print large or complex windows. The two most common errors encountered are "band too complex" and "page memory exceeded" and are described as follows:
    • "band too complex"
      A window may have a particular six pixel row that contains too many changes (from black to white to black). This causes the printer to drop part of the line and possibly drop parts of the page. The printer flashes the number "1" on its front panel when this problem occurs. A possible solution to this problem is to increase the scale of the picture or to split the picture onto two or more pages.
    • "page memory exceeded"
      This occurs if the picture contains too much black space, or if the picture contains complex half-tones, such as the background color of a display. When this problem occurs, the printer automatically splits the picture onto two or more pages. The number "5" may flash on its front panel. As a possible solution to the problem, it might be necessary to either cut and paste or to rework the application to produce a less complex picture.

Program limitations with a LA100 printer:

  • The picture is always printed in portrait mode.
  • The scale is ignored.
  • The scale factor will be different in the horizontal and vertical directions.

Program limitations with an HP printer:

  • If the -density option is not specified, 300 dots-per-inch (dpi) is assumed for the ljet device and 90-dpi for the pjet device. The LaserJet printer supports 300-, 150-, 100-, and 75-dpi. Consult the operator's manual to determine the densities supported by other printers.
  • If the -scale option is not specified, the image is expanded to fit the printable page area.
  • The default printable page area is 8x10.5 inches. Other paper sizes can be accommodated using the -height and -width options.
  • Note that a 1024x768 image fits the default printable area when processed at 100-dpi with scale=1; the same image can also be printed using 300-dpi with scale=3, but it requires more data to be transferred to the printer.
  • The xpr program may be tailored for use with monochrome PCL printers other than the LaserJet. To print on a ThinkJet (HP 2225A) printer, invoke xpr as follows:


    xpr -density 96 -width 6.667 filename
    
    To print black-and-white output on a PaintJet printer, invoke xpr as follows:


    xpr -density 180 filename
    
  • The monochrome intensity of a pixel is computed as 0.30*R + 0.59*G + 0.11*B. If the computed intensity of a pixel is less than the -cutoff level, it prints white. This maps light-on-dark display images to black-on-white hard copy. The default cutoff intensity is 50% of full brightness. For example, specifying -cutoff 87.5 means that a pixel will be displayed as black if the computed intensity is less than 85% of full brightness.
  • A LaserJet printer must be configured with sufficient memory to print the image. To print a full page at 300-dpi, approximately 2 MB of printer memory is required.
  • Color images are produced on the PaintJet printer at 90-dpi. The PaintJet is limited to 16 colors from its 330 color palette on each horizontal print line. The xpr program issues a warning message if more than 16 colors are encountered on a line. Xpr programs the PaintJet for the first 16 colors encountered on each line and uses the nearest matching programmed value for other colors on the line.
  • Specifying the -rv option on the PaintJet printer causes black and white to be interchanged on the output image. No other colors are changed.
  • Multiplane images must be recorded by xwd in ZPixmap format. Single-plane (monochrome) images may be in either XYPixmap or ZPixmap format.
  • Some PCL printers do not recognize image positioning commands. Output for these printers is not centered on the page, and header and trailer strings may not appear where expected.
  • The -gamma and -render options are supported only on the PaintJet XL printers.
  • The -slide option is not supported on LaserJet printers.
  • The -split option is not supported on HP printers.
  • The -gray option is not supported on HP or IBM printers.


Previous Next Contents Index