xpdfrc

package: xpdf-common

title: xpdfrc(5)

text:
# xpdfrc(5)

## NAME
xpdfrc - configuration file for Xpdf tools (version 4.05)

## DESCRIPTION
All of the Xpdf tools read a single configuration file.

On Linux/Unix/MacOS: if you have a .xpdfrc file in your home directory, it will be read. Otherwise, a system-wide configuration file will be read from /etc/xpdfrc, if it exists. (This is its default location; depending on build options, it may be placed elsewhere.)

On Windows: the file must be named xpdfrc (no leading dot, no extension), and must be placed in the same directory as the executable (pdftotext.exe, xpdf.exe, etc.)

The xpdfrc file consists of a series of configuration options, one per line. Blank lines and lines starting with a ´#' (comments) are ignored.

Arguments can be single-quoted or double-quoted, e.g., for file names that contain spaces ("aaa bbb", 'aaa bbb'). This quoting does not provide any escaping, so there's no way to include a double quote in a double-quoted argument or a single quote in a single-quoted argument.

Arguments can also be at-quoted: @"aaa bbb". At-quoted strings allow use of the DATADIR variable, which is set to the 'data' subdirectory in the xpdf install directory. The percent sign (%) is an escape character: a percent sign followed by any other character is replaced with that character.

```
@"abc %"def%" ghi" --> abc "def" ghi
@"${DATADIR}/foo"  --> ...install-dir.../data/foo
@"%${DATADIR}/foo" --> ${DATADIR}/foo
```

The following sections list all of the configuration options, sorted into functional groups. There is an examples section at the end.

## INCLUDE FILES
include config-file

Includes the specified config file. The effect of this is equivalent to inserting the contents of config-file directly into the parent config file in place of the include command. Config files can be nested arbitrarily deeply.

## GENERAL FONT CONFIGURATION
fontFile PDF-font-name font-file

Maps a PDF font, PDF-font-name, to a font for display or PostScript output. The font file, font-file, can be any type allowed in a PDF file. This command can be used for 8-bit or 16-bit (CID) fonts.

fontDir dir

Specifies a search directory for font files. There can be multiple fontDir commands; all of the specified directories will be searched in order. The font files can be Type 1 (.pfa or .pfb) or TrueType (.ttf or .ttc); other files in the directory will be ignored. The font file name (not including the extension) must exactly match the PDF font name. This search is performed if the font name doesn't match any of the fonts declared with the fontFile command. There are no default fontDir directories.

fontFileCC registry-ordering font-file

Maps the registry-ordering character collection to a font for display or PostScript output. This mapping is used if the font name doesn't match any of the fonts declared with the fontFile, fontDir, psResidentFont16, or psResidentFontCC commands.

## POSTSCRIPT FONT CONFIGURATION
psFontPassthrough yes | no

If set to "yes", pass 8-bit font names through to the PostScript output without substitution. Fonts which are not embedded in the PDF file are expected to be available on the printer. This defaults to "no".

psResidentFont PDF-font-name PS-font-name

When the 8-bit font PDF-font-name is used (without embedding) in a PDF file, it will be translated to the PostScript font PS-font-name, which is assumed to be resident in the printer. Typically, PDF-font-name and PS-font-name are the same. By default, only the Base-14 fonts are assumed to be resident.

psResidentFont16 PDF-font-name wMode PS-font-name encoding

When the 16-bit (CID) font PDF-font-name with writing mode wMode is used (without embedding) in a PDF file, it will be translated to the PostScript font PS-font-name, which is assumed to be resident in the printer. The writing mode must be either ´H' for horizontal or ´V' for vertical. The resident font is assumed to use the specified encoding (which must have been defined with the unicodeMap command).

psResidentFontCC registry-ordering wMode PS-font-name encoding

When a 16-bit (CID) font using the registry-ordering character collection and wMode writing mode is used (without embedding) in a PDF file, the PostScript font, PS-font-name, is substituted for it. The substituted font is assumed to be resident in the printer. The writing mode must be either ´H' for horizontal or ´V' for vertical. The resident font is assumed to use the specified encoding (which must have been defined with the unicodeMap command).

psEmbedType1Fonts yes | no

If set to "no", prevents embedding of Type 1 fonts in generated PostScript. This defaults to "yes".

psEmbedTrueTypeFonts yes | no

If set to "no", prevents embedding of TrueType fonts in generated PostScript. This defaults to "yes".

psEmbedCIDTrueTypeFonts yes | no

If set to "no", prevents embedding of CID TrueType fonts in generated PostScript. For Level 3 PostScript, this generates a CID font, for lower levels it generates a non-CID composite font. This defaults to "yes".

psEmbedCIDPostScriptFonts yes | no

If set to "no", prevents embedding of CID PostScript fonts in generated PostScript. For Level 3 PostScript, this generates a CID font, for lower levels it generates a non-CID composite font. This defaults to "yes".

## POSTSCRIPT CONTROL
psPaperSize width(pts) height(pts)

Sets the paper size for PostScript output. The width and height parameters give the paper size in PostScript points (1 point = 1/72 inch).

psPaperSize letter | legal | A4 | A3 | match

Sets the paper size for PostScript output to a standard size. The default paper size is set when xpdf and pdftops are built, typically to "letter" or "A4". This can also be set to "match", which will set the paper size to match the size specified in the PDF file.

psImageableArea llx lly urx ury

Sets the imageable area for PostScript output. The four integers are the coordinates of the lower-left and upper-right corners of the imageable region, specified in points (with the origin being the lower-left corner of the paper). This defaults to the full paper size; the psPaperSize option will reset the imageable area coordinates.

psCrop yes | no

If set to "yes", PostScript output is cropped to the CropBox specified in the PDF file; otherwise no cropping is done. This defaults to "yes".

psUseCropBoxAsPage yes | no

If set to "yes", PostScript output treats the CropBox as the page size. By default, this is "no", and the MediaBox is used as the page size.

psExpandSmaller yes | no

If set to "yes", PDF pages smaller than the PostScript imageable area are expanded to fill the imageable area. Otherwise, no scaling is done on smaller pages. This defaults to "no".

psShrinkLarger yes | no

If set to yes, PDF pages larger than the PostScript imageable area are shrunk to fit the imageable area. Otherwise, no scaling is done on larger pages. This defaults to "yes".

psCenter yes | no

If set to yes, PDF pages smaller than the PostScript imageable area (after any scaling) are centered in the imageable area. Otherwise, they are aligned at the lower-left corner of the imageable area. This defaults to "yes".

psDuplex yes | no

If set to "yes", the generated PostScript will set the "Duplex" pagedevice entry. This tells duplex-capable printers to enable duplexing. This defaults to "no".

psLevel level1 | level1sep | level2 | level2gray | level2sep | level3 | level3gray | level3Sep

Sets the PostScript level to generate. This defaults to "level2".

psPreload yes | no

If set to "yes", PDF forms are converted to PS procedures, and image data is preloaded. This uses more memory in the PostScript interpreter, but generates significantly smaller PS files in situations where, e.g., the same image is drawn on every page of a long document. This defaults to "no".

psOPI yes | no

If set to "yes", generates PostScript OPI comments for all images and forms which have OPI information. This option is only available if the Xpdf tools were compiled with OPI support. This defaults to "no".

psASCIIHex yes | no

If set to "yes", the ASCIIHexEncode filter will be used instead of ASCII85Encode for binary data. This defaults to "no".

psLZW yes | no

If set to "yes", the LZWEncode filter will be used for lossless compression in PostScript output; if set to "no", the RunLengthEncode filter will be used instead. LZW generates better compression (smaller PS files), but may not be supported by some printers. This defaults to "yes".

psUncompressPreloadedImages yes | no

If set to "yes", all preloaded images in PS files will uncompressed. If set to "no", the original compressed images will be used when possible. The "yes" setting is useful to work around certain buggy PostScript interpreters. This defaults to "no".

psMinLineWidth float

Set the minimum line width, in points, for PostScript output. The default value is 0 (no minimum).

psRasterResolution float

Set the resolution (in dpi) for rasterized pages in PostScript output. (Pdftops will rasterize pages which use transparency.) This defaults to 300.

psRasterMono yes | no

If set to "yes", rasterized pages in PS files will be monochrome (8-bit gray) instead of color. This defaults to "no".

psRasterSliceSize pixels

When rasterizing pages, pdftops splits the page into horizontal "slices", to limit memory usage. This option sets the maximum slice size, in pixels. This defaults to 20000000 (20 million).

psAlwaysRasterize yes | no

If set to "yes", all PostScript output will be rasterized. This defaults to "no".

psNeverRasterize yes | no

Pdftops rasterizes an pages that use transparency (because PostScript doesn't support transparency). If psNeverRasterize is set to "yes", rasterization is disabled: pages will never be rasterized, even if they contain transparency. This will likely result in incorrect output for PDF files that use transparency, and a warning message to that effect will be printed. This defaults to "no".

fontDir dir

See the description above, in the DISPLAY FONTS section.

## TEXT CONTROL AND CHARACTER MAPPING
textEncoding encoding-name

Sets the encoding to use for text output. (This can be overridden with the "-enc" switch on the command line.) The encoding-name must be defined with the unicodeMap command (see above). This defaults to "Latin1".

textEOL unix | dos | mac

Sets the end-of-line convention to use for text output. The options are:

```
    unix = LF

    dos  = CR+LF

    mac  = CR

```

(This can be overridden with the "-eol" switch on the command line.) The default value is based on the OS where xpdf and pdftotext were built.

textPageBreaks yes | no

If set to "yes", text extraction will insert page breaks (form feed characters) between pages. This defaults to "yes".

textKeepTinyChars yes | no

If set to "yes", text extraction will keep all characters. If set to "no", text extraction will discard tiny (smaller than 3 point) characters after the first 50000 per page, avoiding extremely slow run times for PDF files that use special fonts to do shading or cross-hatching. This defaults to "yes".

nameToUnicode map-file

Specifies a file with the mapping from character names to Unicode. This is used to handle PDF fonts that have valid encodings but no ToUnicode entry. Each line of a nameToUnicode file looks like this: hex-string name

The hex-string is the Unicode (UCS-2) character index, and name is the corresponding character name. Multiple nameToUnicode files can be used; if a character name is given more than once, the code in the last specified file is used. There is a built-in default nameToUnicode table with all of Adobe's standard character names.

cidToUnicode registry-ordering map-file

Specifies the file with the mapping from character collection to Unicode. Each line of a cidToUnicode file represents one character: hex-string

The hex-string is the Unicode (UCS-2) index for that character. The first line maps CID 0, the second line CID 1, etc. File size is determined by size of the character collection. Only one file is allowed per character collection; the last specified file is used. There are no built-in cidToUnicode mappings.

unicodeToUnicode font-name-substring map-file

This is used to work around PDF fonts which have incorrect Unicode information. It specifies a file which maps from the given (incorrect) Unicode indexes to the correct ones. The mapping will be used for any font whose name contains font-name-substring. Each line of a unicodeToUnicode file represents one Unicode character: in-hex out-hex1 out-hex2 ...

The in-hex field is an input (incorrect) Unicode index, and the rest of the fields are one or more output (correct) Unicode indexes. Each occurrence of in-hex will be converted to the specified output sequence.

unicodeRemapping remap-file

Remap Unicode characters when doing text extraction. This specifies a file that maps from a particular Unicode index to zero or more replacement Unicode indexes. Each line of the remap file represents one Unicode character: in-hex out-hex1 out-hex2 ...

Any Unicode characters not listed will be left unchanged. This function is typically used to remap things like non-breaking spaces, soft hyphens, ligatures, etc.

unicodeMap encoding-name map-file

Specifies the file with mapping from Unicode to encoding-name. These encodings are used for text output (see below). Each line of a unicodeMap file represents a range of one or more Unicode characters which maps linearly to a range in the output encoding:

```
     in-start-hex in-end-hex out-start-hex

```

Entries for single characters can be abbreviated to:

```
     in-hex out-hex

```

The in-start-hex and in-end-hex fields (or the single in-hex field) specify the Unicode range. The out-start-hex field (or the out-hex field) specifies the start of the output encoding range. The length of the out-start-hex (or out-hex) string determines the length of the output characters (e.g., UTF-8 uses different numbers of bytes to represent characters in different ranges). Entries must be given in increasing Unicode order. Only one file is allowed per encoding; the last specified file is used. The Latin1, ASCII7, Symbol, ZapfDingbats, UTF-8, and UCS-2 encodings are predefined.

cMapDir registry-ordering dir

Specifies a search directory, dir, for CMaps for the registry-ordering character collection. There can be multiple directories for a particular collection. There are no default CMap directories.

toUnicodeDir dir

Specifies a search directory, dir, for ToUnicode CMaps. There can be multiple ToUnicode directories. There are no default ToUnicode directories.

mapNumericCharNames yes | no

If set to "yes", the Xpdf tools will attempt to map various numeric character names sometimes used in font subsets. In some cases this leads to usable text, and in other cases it leads to gibberish -- there is no way for Xpdf to tell. This defaults to "yes".

mapUnknownCharNames yes | no

If set to "yes", and mapNumericCharNames is set to "no", the Xpdf tools will apply a simple pass-through mapping (Unicode index = character code) for all unrecognized glyph names. (For CID fonts, setting mapNumericCharNames to "no" is unnecessary.) In some cases, this leads to usable text, and in other cases it leads to gibberish -- there is no way for Xpdf to tell. This defaults to "no".

mapExtTrueTypeFontsViaUnicode yes | no

When rasterizing text using an external TrueType font, there are two options for handling character codes. If mapExtTrueTypeFontsViaUnicode is set to "yes", Xpdf will use the font encoding/ToUnicode info to map character codes to Unicode, and then use the font's Unicode cmap to map Unicode to GIDs. If mapExtTrueTypeFontsViaUnicode is set to "no", Xpdf will assume the character codes are GIDs (i.e., use an identity mapping). This defaults to "yes".

useTrueTypeUnicodeMapping yes | no

If set to "yes", the Xpdf tools will use the Unicode encoding information in TrueType fonts (16-bit only), if avaiable, to override the PDF ToUnicode maps. Otherwise, the ToUnicode maps are always used when present. This defaults to "no".

ignoreWrongSizeToUnicode yes | no

If set to "yes", Xpdf will ignore any ToUnicode CMaps that don't match the font type (8-bit vs 16-bit). The PDF spec requires ToUnicode CMaps match, and Adobe appears to ignore CMaps that don't match. This defaults to "no" (for backward compatibility).

dropFont font-name

Drop all text drawn in the specified font. To drop text drawn in unnamed fonts, use:

```
    dropFont ""

```

There can be any number of dropFont commands.

separateRotatedText yes | no

If set to "no", pdftotext will attempt to place rotated text into the "correct" location in the output. If set to "yes", when using reading order mode, pdftotext will append rotated text to the end, after unrotated text. This defaults to "no".

## RASTERIZER SETTINGS
enableFreeType yes | no

Enables or disables use of FreeType (a TrueType / Type 1 font rasterizer). This is only relevant if the Xpdf tools were built with FreeType support. ("enableFreeType" replaces the old "freetypeControl" option.) This option defaults to "yes".

disableFreeTypeHinting yes | no

If this is set to "yes", FreeType hinting will be forced off. This option defaults to "no".

antialias yes | no

Enables or disables font anti-aliasing in the PDF rasterizer. This option affects all font rasterizers. ("antialias" replaces the anti-aliasing control provided by the old "t1libControl" and "freetypeControl" options.) This default to "yes".

vectorAntialias yes | no

Enables or disables anti-aliasing of vector graphics in the PDF rasterizer. This defaults to "yes".

imageMaskAntialias yes | no

Enables or disables anti-aliasing of image masks (when downsampling or upsampling) in the PDF rasterizer. This defaults to "yes".

antialiasPrinting yes | no

If this is "yes", bitmaps sent to the printer will be antialiased (according to the "antialias" and "vectorAntialias" settings). If this is "no", printed bitmaps will not be antialiased. This defaults to "no".

strokeAdjust yes | no | cad

Sets the stroke adjustment mode. If set to "no", no stroke adjustment will be done. If set to "yes", normal stroke adjustment will be done: horizontal and vertical lines will be moved by up to half a pixel to make them look cleaner when vector anti-aliasing is enabled. If set to "cad", a slightly different stroke adjustment algorithm will be used to ensure that lines of the same original width will always have the same adjusted width (at the expense of allowing gaps and overlaps between adjacent lines). This defaults to "yes".

forceAccurateTiling yes | no

If this is set to "yes", the TilingType is forced to 2 (no distortion) for all tiling patterns, regardless of the setting in the pattern dictionary. This defaults to "no".

screenType dispersed | clustered | stochasticClustered

Sets the halftone screen type, which will be used when generating a monochrome (1-bit) bitmap. The three options are dispersed-dot dithering, clustered-dot dithering (with a round dot and 45-degree screen angle), and stochastic clustered-dot dithering. By default, "stochasticClustered" is used for resolutions of 300 dpi and higher, and "dispersed" is used for resolutions lower then 300 dpi.

screenSize integer

Sets the size of the (square) halftone screen threshold matrix. By default, this is 4 for dispersed-dot dithering, 10 for clustered-dot dithering, and 100 for stochastic clustered-dot dithering.

screenDotRadius integer

Sets the halftone screen dot radius. This is only used when screenType is set to stochasticClustered, and it defaults to 2. In clustered-dot mode, the dot radius is half of the screen size. Dispersed-dot dithering doesn't have a dot radius.

screenGamma float

Sets the halftone screen gamma correction parameter. Gamma values greater than 1 make the output brighter; gamma values less than 1 make it darker. The default value is 1.

screenBlackThreshold float

When halftoning, all values below this threshold are forced to solid black. This parameter is a floating point value between 0 (black) and 1 (white). The default value is 0.

screenWhiteThreshold float

When halftoning, all values above this threshold are forced to solid white. This parameter is a floating point value between 0 (black) and 1 (white). The default value is 1.

minLineWidth float

Set the minimum line width, in device pixels. This affects the rasterizer only, not the PostScript converter (except when it uses rasterization to handle transparency). The default value is 0 (no minimum).

enablePathSimplification yes | no

If set to "yes", simplify paths by removing points where it won't make a significant difference to the shape. The default value is "no".

overprintPreview yes | no

If set to "yes", generate overprint preview output, honoring the OP/op/OPM settings in the PDF file. Ignored for non-CMYK output. The default value is "no".

## VIEWER SETTINGS
These settings only apply to the Xpdf GUI PDF viewer.

initialZoom percentage | page | width

Sets the initial zoom factor. A number specifies a zoom percentage, where 100 means 72 dpi. You may also specify ´page', to fit the page to the window size, or ´width', to fit the page width to the window width.

defaultFitZoom percentage

If xpdf is started with fit-page or fit-width zoom and no window geometry, it will calculate a desired window size based on the PDF page size and this defaultFitZoom value. I.e., the window size will be chosen such that exactly one page will fit in the window at this zoom factor (which must be a percentage). The default value is based on the screen resolution.

zoomScaleFactor ratio | actual

Zoom percentages will be scaled by this factor. By default, 100% zoom corresponds to 72 dpi. Setting zoomScaleFactor to 1.5 will make 100% zoom 1.5x larger, i.e., 108dpi. If this is set to ´actual', the zoom scale factor will be computed based on the screen resolution. The default value is 1.0.

zoomValues zoom1 zoom2 zoom3 ...

Sets the list of zoom values (percentages) displayed in the zoom combo box. The default list is: 25 50 75 100 110 125 150 175 200 300 400 600 800.

initialDisplayMode single | continuous | sideBySideSingle | sideBySideContinuous | horizontalContinuous

Sets the initial display mode. The default setting is "continuous".

initialToolbarState yes | no

If set to "yes", xpdf opens with the toolbar visible. If set to "no", xpdf opens with the toolbar hidden. The default is "yes".

initialSidebarState yes | no

If set to "yes", xpdf opens with the sidebar (tabs, outline, etc.) visible. If set to "no", xpdf opens with the sidebar collapsed. The default is "yes".

initialSidebarWidth width

Sets the initial sidebar width, in pixels. This is only relevant if initialSidebarState is "yes". The default value is zero, which tells xpdf to use an internal default size.

initialSelectMode block | linear

Sets the initial selection mode. The default setting is "linear".

paperColor color

Set the "paper color", i.e., the background of the page display. The color can be #RRGGBB (hexadecimal) or a named color. This option will not work well with PDF files that do things like filling in white behind the text.

matteColor color

Set the matte color, i.e., the color used for background outside the actual page area. The color can be #RRGGBB (hexadecimal) or a named color.

fullScreenMatteColor color

Set the matte color for full-screen mode. The color can be #RRGGBB (hexadecimal) or a named color.

selectionColor color

Set the selection color. The color can be #RRGGBB (hexadecimal) or a named color.

reverseVideoInvertImages yes | no

If set to "no", xpdf's reverse-video mode inverts text and vector graphic content, but not images. If set to "yes", xpdf inverts images as well. The default is "no".

popupMenuCmd title command ...

Add a command to the popup menu. Title is the text to be displayed in the menu. Command is an Xpdf command (see the COMMANDS section of the xpdf(1) man page for details). Multiple commands are separated by whitespace.

maxTileWidth pixels

Set the maximum width of tiles to be used by xpdf when rasterizing pages. This defaults to 1500.

maxTileHeight pixels

Set the maximum height of tiles to be used by xpdf when rasterizing pages. This defaults to 1500.

tileCacheSize tiles

Set the maximum number of tiles to be cached by xpdf when rasterizing pages. This defaults to 10.

workerThreads numThreads

Set the number of worker threads to be used by xpdf when rasterizing pages. This defaults to 1.

allowLinksToChangeZoom yes | no

PDF links, including outline items, can include a new zoom level. If this setting is "yes", Xpdf changes the zoom when links are clicked; if "no", Xpdf moves to the destination but does not change the zoom. This defaults to "yes".

launchCommand command

Sets the command executed when you click on a "launch"-type link. The intent is for the command to be a program/script which determines the file type and runs the appropriate viewer. The command line will consist of the file to be launched, followed by any parameters specified with the link. Do not use "%s" in "command". By default, this is unset, and Xpdf will simply try to execute the file (after prompting the user).

movieCommand command

Sets the command executed when you click on a movie annotation. The string "%s" will be replaced with the movie file name. This has no default value.

defaultPrinter printer

Sets the default printer used in the viewer's print dialog.

bind modifiers-key context command ...

Add a key or mouse button binding. Modifiers can be zero or more of:

```
    shift-

    ctrl-

    alt-

```

Key can be a regular ASCII character, or any one of:

```
    space

    tab

    return

    enter

    backspace

    esc

    insert

    delete

    home

    end

    pgup

    pgdn

    left / right / up / down                (arrow keys)

    f1 .. f35                               (function keys)

    mousePress1 .. mousePress7              (mouse buttons)

    mouseRelease1 .. mouseRelease7          (mouse buttons)

    mouseClick1 .. mouseClick7              (mouse buttons)

    mouseDoubleClick1 .. mouseDoubleClick7  (mouse buttons)

    mouseTripleClick1 .. mouseTripleClick7  (mouse buttons)

```

Context is either "any" or a comma-separated combination of:

```
    fullScreen / window       (full screen mode on/off)

    continuous / singlePage   (continuous mode on/off)

    overLink / offLink        (mouse over link or not)

    scrLockOn / scrLockOff    (scroll lock on/off)

```

The context string can include only one of each pair in the above list. Command is an Xpdf command (see the COMMANDS section of the xpdf(1) man page for details). Multiple commands are separated by whitespace.

The bind command replaces any existing binding, but only if it was defined for the exact same modifiers, key, and context. All tokens (modifiers, key, context, commands) are case-sensitive.

Example key bindings:

```
    # bind ctrl-a in any context to the nextPage

    # command

    bind ctrl-a any nextPage

    # bind uppercase B, when in continuous mode

    # with scroll lock on, to the reload command

    # followed by the prevPage command

    bind B continuous,scrLockOn reload prevPage

```

See the xpdf(1) man page for more examples.

unbind modifiers-key context

Removes a key binding established with the bind command. This is most useful to remove default key bindings before establishing new ones (e.g., if the default key binding is given for "any" context, and you want to create new key bindings for multiple contexts).

tabStateFile path

Sets the file used by the loadTabState and saveTabState commands (see the xpdf(1) man page for more information). The default path is ~/.xpdf.tabstate.

sessionFile path

Sets the file used by the saveSession and loadSession commands (see the xpdf(1) man page for more information). The default path is ~/.xpdf.session. When xpdf automatically saves the session via a session manager, it appends ".managed" to the path.

saveSessionOnQuit yes | no

If set to "yes", xpdf will automatically save the current session (equivalent to the saveSession command) when quitting (via the menu or a key binding). The default value is "yes".

## MISCELLANEOUS SETTINGS
drawAnnotations yes | no

If set to "no", annotations will not be drawn or printed. The default value is "yes".

drawFormFields yes | no

If set to "no", form fields will not be drawn or printed. The default value is "yes".

enableXFA yes | no

If an XFA form is present, and this option is set to "yes", Xpdf will parse the XFA form and use certain XFA information to override AcroForm information. If set to "no", the XFA form will not be read. The default value is "yes".

savePageNumbers yes | no

If set to "yes", xpdf will save the current page numbers of all open files in ~/.xpdf.pages when the files are closed (or when quitting xpdf). Next time the file is opened, the last-viewed page number will be restored. The default value is "yes".

printCommands yes | no

If set to "yes", drawing commands are printed as they're executed (useful for debugging). This defaults to "no".

printStatusInfo

If set to "yes", print a status message (to stdout) before each page is processed. This defaults to "no".

errQuiet yes | no

If set to "yes", this suppresses all error and warning messages from all of the Xpdf tools. This defaults to "no".

## EXAMPLES
The following is a sample xpdfrc file.

```
# from the Thai support package
nameToUnicode /usr/local/share/xpdf/Thai.nameToUnicode
# from the Japanese support package
cidToUnicode Adobe-Japan1 /usr/local/share/xpdf/Adobe-Japan1.cidToUnicode
unicodeMap   JISX0208     /usr/local/share/xpdf/JISX0208.unicodeMap
cMapDir      Adobe-Japan1 /usr/local/share/xpdf/cmap/Adobe-Japan1
# use the Base-14 Type 1 fonts from ghostscript
fontFile Times-Roman           /usr/local/share/ghostscript/fonts/n021003l.pfb
fontFile Times-Italic          /usr/local/share/ghostscript/fonts/n021023l.pfb
fontFile Times-Bold            /usr/local/share/ghostscript/fonts/n021004l.pfb
fontFile Times-BoldItalic      /usr/local/share/ghostscript/fonts/n021024l.pfb
fontFile Helvetica             /usr/local/share/ghostscript/fonts/n019003l.pfb
fontFile Helvetica-Oblique     /usr/local/share/ghostscript/fonts/n019023l.pfb
fontFile Helvetica-Bold        /usr/local/share/ghostscript/fonts/n019004l.pfb
fontFile Helvetica-BoldOblique /usr/local/share/ghostscript/fonts/n019024l.pfb
fontFile Courier               /usr/local/share/ghostscript/fonts/n022003l.pfb
fontFile Courier-Oblique       /usr/local/share/ghostscript/fonts/n022023l.pfb
fontFile Courier-Bold          /usr/local/share/ghostscript/fonts/n022004l.pfb
fontFile Courier-BoldOblique   /usr/local/share/ghostscript/fonts/n022024l.pfb
fontFile Symbol                /usr/local/share/ghostscript/fonts/s050000l.pfb
fontFile ZapfDingbats          /usr/local/share/ghostscript/fonts/d050000l.pfb
# use the Bakoma Type 1 fonts
# (this assumes they happen to be installed in /usr/local/fonts/bakoma)
fontDir /usr/local/fonts/bakoma
# set some PostScript options
psPaperSize          letter
psDuplex             no
psLevel              level2
psEmbedType1Fonts    yes
psEmbedTrueTypeFonts yes
# assume that the PostScript printer has the Univers and
# Univers-Bold fonts
psResidentFont Univers      Univers
psResidentFont Univers-Bold Univers-Bold
# set the text output options
textEncoding UTF-8
textEOL      unix
# misc options
enableFreeType  yes
launchCommand   viewer-script
```

## FILES
/etc/xpdfrc

This is the default location for the system-wide configuration file. Depending on build options, it may be placed elsewhere.

$HOME/.xpdfrc

This is the user's configuration file. If it exists, it will be read in place of the system-wide file.

## AUTHOR
The Xpdf software and documentation are copyright 1996-2024 Glyph & Cog, LLC.

## SEE ALSO
xpdf(1), pdftops(1), pdftotext(1), pdftohtml(1), pdfinfo(1), pdffonts(1), pdfdetach(1), pdftoppm(1), pdftopng(1), pdfimages(1)

http://www.xpdfreader.com/


gfx.toml

package: xrdp

title: gfx.toml(5)

text:
# gfx.toml(5)

## NAME
gfx.toml - Configuration file for xrdp(8) graphics pipeline extension

## DESCRIPTION
This file configures the detailed settings of the Graphics Pipeline Extension for xrdp(8). The file format is TOML. See the link in the SEE ALSO section for TOML syntax.

The file contains following sections:

[codec] - configure preferred codec and encoders for xrdp(8).

[x264] - parameters for x264 encoder.

[OpenH264] - parameters for Cisco OpenH264 encoder.

All options and values are case-sensitive, with some exception, and are described in detail below.

## CODEC
[codec] section defines preferred codec order and encoder. The options to be specified in this section are the following:

order = <array>

Define the order in which codecs should be used, "H.264" and "RFX". Specify as an array of strings like [ "H.264", "RFX ]. Strings in the array are case-insensitive, while others are case-sensitive.

h264_encoder = <string>

Specify a preferred H.264 encoder, "x264" or "OpenH264". This parameter takes effect only when more than one encoder is enabled at compile time. If only one H.264 encoder is enabled, the encoder will be used regardless the value of this parameter. Defaults to "x264" if not specified or if an invalid encoder is specified. The encoder name is case-insensitive.

## X264
[x264] section defines encoding parameters that will be passed to x264 encoder. See x264 --fullhelp for the detailed explanations of the parameters. The options to be specified in this section are following:

preset = <string>

Select a preset encoding settings. Slower presets result in higher CPU usage but offer better screen image quality and require lower network bandwidth. Here are available presets: ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow, placebo

Presets slower than medium may not suitable for use with xrdp.

tune = <string>

Select a tune for source or situation. zerolatency is most appropriate for use with xrdp. Here are available options: film, grain, stillimage, psnr, ssim, fastdecode, zerolatency

profile = <string>

Select a profile. Here are available options: main, baseline, high, high10, high422, high444

vbv_max_bitrate = <integer>

Set the maximum fill rate for the VBV (Video Buffering Vefifier) buffer in kbps.

vbv_buffer_size = <integer>

Set the size of the VBV buffer size in kilobits.

fps_num = <integer>

Set the fps numerator.

fps_den = <integer>

Set the fps denominator.

threads = <integer>

Specify how many CPU threads to use for H.264 encoding per screen (0 for auto). Carefully evaluate this value when configuring it to avoid exhausting the available threads. For example, if 3 users are connected simultaneously with dual screens, xrdp may use up to <threads> * 3 * 2 threads for H.264 encoding. Please also note that too many threads can hurt quality.

## OPENH264
[OpenH264] section defines encoding parameters that will be passed to OpenH264 encoder. The options to be specified in this section are following:

EnableFrameSkip = <boolean>

Allows the encoder to skip frames in order to keep the bitrate within the limits if it is about to exceed the maximum bitrate set by MaxBitrate.

TargetBitrate = <integer>

Sets the target average bitrate (in bps) that the encoder will attempt to achieve throughout the encoding process.

MaxBitrate = <integer>

Sets an upper limit of the bitrate in bps.

MaxFrameRate = <float>

Sets the maximum frame rate that the encoder will process per second.

## CONNECTION TYPES
[x264] and [OpenH264] section are tables (also known as dictionaries) that have subtables with connection types in their keys. For example, [x264.lan], [OpenH264.wan].

You can configure different parameters such as bitrate for the encoder per connection type. Define the default parameter set first, this will be inherited to all connection types unless explicitly overridden in each connection type.

List of available connection types are:

lan, wan, broadband_high, satellite, broadband_low, modem, and default

Currently, xrdp does not support connection type autodetection. If autodetect is selected on the client side, it will be treated as if LAN is selected.

## EXAMPLES
This is an example gfx.toml:

```
[codec]
order = [ "H.264", "RFX" ]
h264_encoder = "x264"
[x264.default]
preset = "ultrafast"
tune = "zerolatency"
profile = "main"     # profile is forced to baseline if preset == ultrafast
vbv_max_bitrate = 0
vbv_buffer_size = 0
fps_num = 60
fps_den = 1
[x264.lan]
# inherits default, everything is same with the default
[x264.wan]
# parameters that are not explicitly overridden inherit the default values
preset = "veryfast"
vbv_max_bitrate = 15_000
vbv_buffer_size = 1_500
```

There are multiple ways to represent the data structure in TOML format. The following two representations are semantically equivalent but the latter is discouraged due to concerns about complexity and readability.

```
[x264.default]
preset = "ultrafast"
tune = "zerolatency"
```

```
x264 = { default = { preset = "ultrafast", tune="zerolatency" } }
```

## SEE ALSO
For more information on gfx.toml configuration, see the wiki page.

https://github.com/neutrinolabs/xrdp/wiki/H.264-encoding

The syntax for TOML files can be found at the following page.

https://toml.io/en/v1.0.0


sesman.ini

title: sesman.ini(5)

summary: Configuration file for xrdp-sesman(8)

text:
# sesman.ini(5)

## NAME
sesman.ini - Configuration file for xrdp-sesman(8)

## DESCRIPTION
sesman.ini consists of several sections. Each section starts with the section name in square brackets, followed by a list of parameter=value lines. Following sections are recognized:

[Globals]

Global configuration

[Logging]

Logging subsystem

[Sessions]

Session management

[Security]

Access control

[Chansrv]

Settings for xrdp-chansrv(8)

[ChansrvLogging]

Logging settings for xrdp-chansrv(8)

[SessionVariables]

Environment variables for the session

All parameters and values (except for file names and paths) are case insensitive, and are described in detail below. If any parameter is specified more than once, the last entry will be used. Options specified outside their proper section will be ignored.

## GLOBALS
Following parameters can be used in the [Globals] section.

ListenPort=path-to-socket

UNIX domain socket for xrdp-sesman(8) to listen on.

The default value of this setting is 'sesman.socket'. An absolute path can be specified by starting this parameter with a '/'. In this instance, the system administrator is responsible for ensuring the socket can only be created by a suitably privileged process.

If the parameter does not start with a '/', a name within /var/run/xrdp is used.

EnableUserWindowManager=[true|false]

If set to 1, true or yes, this option enables user specific startup script. That is, xrdp-sesman will execute the script specified by UserWindowManager if it exists.

UserWindowManager=filename

Path of the startup script relative to the user's home directory. If present and enabled by EnableUserWindowManager, that script is executed instead of DefaultWindowManager.

DefaultWindowManager=filename

Full path or relative path of the default startup script used by xrdp-sesman to start a session. If the path is not a full path, it will be resolved as relative path to /etc/xrdp. If not specified, defaults to /etc/xrdp/startwm.sh.

ReconnectScript=filename

Full path or relative path if the script which executed when users reconnects to the existing session. If the path is not a full path, it will be resolved as relative path to /etc/xrdp. If not specified, defaults to /etc/xrdp/reconnectwm.sh.

## LOGGING
Following parameters can be used in the [Logging] and [ChansrvLogging] sections.

LogFile=filename

Log file path. It can be either absolute or relative. If not specified, defaults to ./sesman.log. If set to <stdout>, log will go to stdout. Use for debugging only It is ignored in the [ChansrvLogging] section since the channel server creates one log file per display and instead uses the following log file naming convention xrdp-chansrv.${DISPLAY}.log. For details of the chansrv log file location, see LogFilePath.

LogFilePath=string

Directory for storing the chansrv log file. This setting only applies to chansrv. The sesman log file is always created in /var/log. Created if it doesn't exist. If first character is not a '/', this is relative to $HOME, where chansrv is normally started.

The following substitutions are made in this string:-

%U - Username

%u - Numeric UID

%% - Percent character This is most useful if you are using NFS-mounted home directories, and wish to move the chansrv log file to the local disk.

If this parameter isn't specified, the log file is stored in one of the following locations :-

- $CHANSRV_LOG_PATH

- $XDG_DATA_HOME/xrdp

- $HOME/.local/share/xrdp

LogLevel=level

This option can have one of the following values: CORE or 0 - Log only core messages. Those messages are logged regardless of the selected logging level.

ERROR or 1 - Log only error messages.

WARNING, WARN or 2 - Logs warnings and error messages.

INFO or 3 - Log errors, warnings and informational messages.

DEBUG or 4 - Log everything. If xrdp-sesman is compiled in debug mode, this options will output many more low-level messages.

EnableSyslog=[true|false]

If set to 1, true or yes, this option enables logging to syslog.

SyslogLevel=level

Logging level for syslog. It can have the same values as LogLevel. Defaults to DEBUG.

EnableConsole=[true|false]

If set to 1, true or yes, this option enables logging to the console (ie. stdout).

ConsoleLevel=level

Logging level for the console. It can have the same values as LogLevel. Defaults to DEBUG.

EnableProcessId=[true|false]

If set to 1, true or yes, this option enables logging the process id in all log messages. Defaults to false.

## SESSIONS
Following parameters can be used in the [Sessions] section.

X11DisplayOffset=number

The first X display number available for xrdp-sesman. This prevents xrdp-sesman from interfering with real X11 servers. If not specified, defaults to 10.

MaxSessions=number

Sets the maximum number of simultaneous sessions. If not set or set to 0, unlimited session are allowed.

MaxDisplayNumber=number

Sets the maximum number which can be assigned to an X11 $DISPLAY. The default is compatible with IANA TCP port allocations. If you are not allowing TCP connections to your X servers you may safely increase this number.

KillDisconnected=[true|false]

If set to 1, true or yes, every session will be killed within DisconnectedTimeLimit seconds after the user disconnects. This setting currently only works with xorgxrdp sessions.

DisconnectedTimeLimit=number

Sets the time limit for KillDisconnected to a value greater than 60. Values less than 60 are to be overridden with 60. This setting currently only works with xorgxrdp sessions.

IdleTimeLimit=number

Sets the time limit (in seconds) before an idle session is disconnected. Idle means no keyboard inputs and no mouse moves/clicks here. If set to 0, idle sessions will never be disconnected by timeout. This works only with xorgxrdp sessions. Moreover, xorgxrdp must be v0.2.9 or later.

Policy=[Default|Separate|{UBDI}]

Session allocation policy. Used to decide when to allocate a new session. Set to one of the following values:

Default - Currently the same as "UB" for all session types

Separate - All sessions are separate. Sessions can never be rejoined, and will need to be cleaned up manually, or automatically by setting other sesman options.

Alternatively combine one-or-more of the following options

U - Sessions are separated per user

B - Sessions are separated by bits-per-pixel

D - Sessions are separated by initial display size

I - Sessions are separated by IP address

Note that the U and B criteria cannot be turned off. DisplaySize refers to the initial geometry of a connection, as actual display sizes can change dynamically.

## SECURITY
Following parameters can be used in the [Security] section.

AllowRootLogin=[true|false]

If set to 1, true or yes, enables root login on the terminal server.

MaxLoginRetry=number

The number of login attempts that are allowed on terminal server. If set to 0, unlimited attempts are allowed. If not specified, defaults to 3.

TerminalServerUsers=group

Only the users belonging to the specified group are allowed to login on terminal server. If unset or set to an invalid or non-existent group, login for all users is enabled.

TerminalServerAdmins=group

This option is currently ignored! Only members of this group can have session management rights.

RestrictOutboundClipboard=[all|none|text|file|image]

If set to all, will restrict the clipboard outbound from the server, to prevent data copied inside the xrdp session to be pasted in the client. Default value is none. In addition, you can control text/file/image transfer restrictions respectively. It also accepts comma separated list such as text,file,image. none - No restriction about copying inbound clipboard data.

all - Restrict to copy inbound clipboard data.

text - Restrict to copy only inbound text clipboard data.

file - Restrict to copy only inbound file clipboard data.

image - Restrict to copy only inbound image clipboard data.

To keep compatibility, the following aliases are also available.

true - an alias of all.

false - an alias of none.

yes - an alias of all.

RestrictInboundClipboard=[none|all|text|file|image]

If set to all, will restrict the clipboard inbound from the client, to prevent data copied inside the client to be pasted in the xrdp session. Default value is none. In addition, you can control text/file/image transfer restrictions respectively. It also accepts comma separated list such as text,file,image. none - No restriction about copying inbound clipboard data.

all - Restrict to copy inbound clipboard data.

text - Restrict to copy only inbound text clipboard data.

file - Restrict to copy only inbound file clipboard data.

image - Restrict to copy only inbound image clipboard data.

To keep compatibility, the following aliases are also available.

true - an alias of all.

false - an alias of none.

yes - an alias of all.

AlwaysGroupCheck=[true|false]

If set to 1, true or yes, require group membership even if the group specified in TerminalServerUsers doesn't exist.

AllowAlternateShell=[true|false]

Set to 1, true or yes, to allow alternate shells to be specified by users.

PassShellAsEnv=<name-of-environment-variable>

If this is set, alternate shells are not actioned directly, but passed in to the default window manager in the specified environment variable. This allows the system manager more control over exactly what alternate shells are permitted. This will override any setting of the same environment variable in the [SessionVariables] section.

XorgNoNewPrivileges=[true|false]

Only applicable on Linux. If set to 0, false or no, do not use the kernel's no_new_privs restriction when invoking the Xorg X11 server. The use of no_new_privs is intended to prevent issues due to a setuid Xorg executable. However, if a kernel security module (such as AppArmor) is used to confine xrdp, no_new_privs may interfere with transitions between confinement domains.

SessionSockdirGroup=group

Sets the group owner of the directories containing session sockets. This MUST be the same as runtime_group in xrdp.ini, or xrdp will not be able to connect to any sessions.

## X11 SERVER
Following parameters can be used in the [Xvnc] and [Xorg] sections.

param=string

Multiple param lines are supported. This first line specifies the path to the X11 server executable. Following lines specify command line arguments passed to the X11 server.

## CHANSRV
Following parameters can be used in the [Chansrv] section.

FuseMountName=string

Directory for drive redirection. Created if it doesn't exist. If not specified, defaults to xrdp_client. If first character is not a '/', this is relative to $HOME.

The following substitutions are made in this string:-

%U - Username

%u - Numeric UID

%d - Numeric display number (ex 10)

%D - Display environment variable (ex :10.0)

%% - Percent character 1) The directory path permissions MUST be configured correctly by the system administrator or the system itself - xrdp-chansrv will not do this for you (although it will create the final directories owned by the user).

2) The desktop may not automatically display a link for the redirected drive. To fix this, consult the docs for your chosen desktop.

FuseMountNameColonCharReplacement=string

Character to replace colon in redirected drive mount point names. If not specified no colon will not be replaced. If empty then colon will be replaced by null character. If longer than one character, only first character used. Only last colon replaced.

FuseDirectIO=[false|true]

Defaults to false. Set to true to disable page caching in FUSE when opening files on a redirected drive. Direct I/O can impact the performance of file operations.

FileUmask=mode

Additional umask to apply to files in the FuseMountName directory. The default value of 077 prevents other users on the system from reading files on your redirected drives. This may not be appropriate for all environments, and so you can change this value to allow other users to access your remote files if required.

EnableFuseMount=[true|false]

Defaults to true. Set to false to disable xrdp-chansrv's use of the FUSE system feature, even if it has been built with this feature enabled.

Setting this value to false will disable the following application features:- - drive redirection

- copying-and-pasting of files

UseNautilus3FlistFormat=[false|true]

Defaults to false. Set to true to make file copy-paste compatible with Nautilus from GNOME 3 versions later than 3.29.92. Do not use this for any other reason. This setting will be removed in a later version of xrdp, when GNOME 3 is no longer supported.

FuseRootReportMaxFree=[false|true]

The existing FUSE implementation reports free space on remote drives in a way which can confuse some file managers if they check for free space at the FUSE mountpoint before copying files. KDE Dolphin is affected by this, and will report 'no space available' when trying to copy to remote drives. Setting this option will cause the FUSE fileystem to report a very large amount of free space for the root of the FUSE mountpoint. This will allow Dolphin to copy files to remote drives, but introduces a risk that the remote filesystem will run out of space during the copy.

This setting will be removed in a later version of xrdp, when remote drives receive unique mountpoints.

SoundNumSilentFramesAAC=number

Sets the number of silent frames which are sent to client before close message is sent, when AAC is selected. If set to 0, no silent frame is sent. If not specified, defaults to 4.

SoundNumSilentFramesMP3=number

Sets the number of silent frames which are sent to client before close message is sent, when MP3 is selected. If set to 0, no silent frame is sent. If not specified, defaults to 2.

SoundMsecDoNotSend=number

Sets the duration(msec). Sound data is not send to client during number millisecond(s) after close message is sent, when AAC/MP3 is selected. If set to 0, all the data is sent. If not specified, defaults to 1000.

## SESSIONS VARIABLES
All entries in the [SessionVariables] section are set as environment variables in the user's session.

## FILES
/etc/xrdp/sesman.ini

## SEE ALSO
xrdp-sesman(8), xrdp-sesrun(8), xrdp(8), xrdp.ini(5)

For more info on xrdp see http://www.xrdp.org/


xrdp.ini

title: xrdp.ini(5)

summary: Configuration file for xrdp(8)

text:
# xrdp.ini(5)

## NAME
xrdp.ini - Configuration file for xrdp(8)

## DESCRIPTION
This is the man page for xrdp.ini, xrdp(8) configuration file. It is composed by a number of sections, each one composed by a section name, enclosed by square brackets, followed by a list of <parameter>=<value> lines.

xrdp.ini supports the following sections:

[Globals] - sets some global configuration settings for xrdp(8).

[Logging] - logging subsystem parameters

[Channels] - channel subsystem parameters

All options and values (except for file names and paths) are case insensitive, and are described in detail below.

## GLOBALS
The options to be specified in the [Globals] section are the following:

port=port_specification [ port_specification ... ]

Specify the port(s) that xrdp should listen on. More instructions and examples can be found within xrdp.ini itself.

vmconnect=[true|false]

(Hyper-V VMs only). Enables a wider support of security protocols when a virtual machine running xrdp is hosted on Hyper-V, and the user connects to it via the vmms service on TCP port 2179. In this configuration, RDP security is handled by the vmms service, and security features which are not yet added to xrdp itself can be supported. This parameter is required in environments which do not support 'classic' RDP encryption.

The parameter is ignored for connections which are not made to the virtual machine over the vsock transport.

autorun=session_name

Section name for automatic login. If set and the client supplies valid username and password, the user will be logged in automatically using the connection specified by session_name. If session_name is empty, the LOGIN DOMAIN from the client with be used to select the section. If no domain name is supplied, the first suitable section will be used for automatic login.

bitmap_cache=[true|false]

If set to 1, true or yes this option enables bitmap caching in xrdp(8).

bitmap_compression=[true|false]

If set to 1, true or yes this option enables bitmap compression in xrdp(8).

bulk_compression=[true|false]

If set to 1, true or yes this option enables compression of bulk data in xrdp(8).

certificate=/path/to/certificate

key_file=/path/to/private_key

Set location of TLS certificate and private key. They must be written in PEM format. If not specified, defaults to /etc/xrdp/cert.pem, /etc/xrdp/key.pem. This parameter is effective only if security_layer is set to tls or negotiate.

tls_pms_log_file=<path-to-log-file>

Logs TLS pre-master secrets to the specified file. This allows packet capture tools (e.g. Wireshark) to decrypt captured PDUs. The file must be writeable by xrdp and readable by the packet capture tool. A good way to achive this is to create a temporary directory with permissions 2750 owned by the user running xrdp, and in the group used by the packet sniffer.

SETTING THIS OPTION IS A SECURITY RISK. ONLY SET THIS OPTION FOR DEBUGGING COMMUNICATIONS BETWEEN XRDP AND A CLIENT.

channel_code=[true|false]

If set to 0, false or no this option disables all channels xrdp(8). See section CHANNELS below for more fine grained options.

crypt_level=[low|medium|high|fips]

Regulate encryption level of Standard RDP Security. This parameter is effective only if security_layer is set to rdp or negotiate. Encryption in Standard RDP Security is controlled by two settings: Encryption Level and Encryption Method. The only supported Encryption Method are 40BIT_ENCRYPTION and 128BIT_ENCRYPTION. 56BIT_ENCRYPTION is not supported. This option controls the Encryption Level:

low

All data sent from the client to the server is protected by encryption based on the maximum key strength supported by the client. This is the only level that the traffic sent by the server to client is not encrypted.

medium

All data sent between the client and the server is protected by encryption based on the maximum key strength supported by the client (client compatible).

high

All data sent between the client and the server is protected by encryption based on the server's maximum key strength (sever compatible).

fips

All data sent between the client and server is protected using Federal Information Processing Standard 140-1 validated encryption methods. This level is required for Windows clients (mstsc.exe) if the client's group policy enforces FIPS-compliance mode.

fork=[true|false]

If set to 1, true or yes for each incoming connection xrdp(8) forks a sub-process instead of using threads.

hidelogwindow=[true|false]

If set to 1, true or yes, xrdp will not show a window for log messages. If not specified, defaults to false.

max_bpp=[8|15|16|24|32]

Limit the color depth by specifying the maximum number of bits per pixel. If not specified or set to 0, unlimited.

pamerrortxt=error_text

Specify additional text displayed to user if authentication fails. The maximum length is 256. The use of 'pam' in the name of this option is historic

port=port

Specify TCP port and interface to listen on for incoming connections. Specifying only the port means that xrdp will listen on all interfaces. The default port for RDP is 3389. Multiple address:port instances must be separated by spaces or commas. Check the .ini file for examples. Specifying interfaces requires said interfaces to be UP before xrdp starts.

runtime_user=username

runtime_group=groupname

User name and group to run the xrdp daemon under. After xrdp starts, it sets its UID and GID to values derived from these settings, so that it's running without system privilege.

The runtime_group MUST be set to the same value as SessionSockdirGroup in sesman.ini if you want to run sessions.

A suitable user and group can be added with a command like this (Linux):-

useradd xrdp -d / -c 'xrdp daemon' -s /usr/sbin/nologin

In order to establish secure connections, the xrdp daemon needs permission to access sensitive cryptographic files. After changing either or both of these values, check that xrdp has access to required files by running this script:-

/usr/share/xrdp/xrdp-chkpriv

enable_token_login=[true|false]

If set to 1, true or yes, xrdp will scan the user name provided by the client for the ASCII field separator character (0x1F). It will then copy over what is after the separator as the password supplied by the user and treats it as autologon. If not specified, defaults to false.

domain_user_separator=separator

If specified the domain name supplied by the client is appended to the username separated by separator.

require_credentials=[true|false]

If set to 1, true or yes, xrdp requires clients to include username and password initial connection phase. In other words, xrdp doesn't allow clients to show login screen if set to true. It follows that an incorrect password will cause the login to immediately fail without displaying the login screen. If not specified, defaults to false.

security_layer=[tls|rdp|negotiate]

Regulate security methods. If not specified, defaults to negotiate.

tls

Enhanced RDP Security is used. All security operations (encryption, decryption, data integrity verification, and server authentication) are implemented by TLS.

rdp

Standard RDP Security, which is not safe from man-in-the-middle attack, is used. The encryption level of Standard RDP Security is controlled by crypt_level.

negotiate

Negotiate these security methods with clients.

ssl_protocols=[SSLv3] [TLSv1] [TLSv1.1] [TLSv1.2] [TLSv1.3]

Enables the specified SSL/TLS protocols. Each value should be separated by comma. SSLv2 is always disabled. At least one protocol should be given to accept TLS connections. This parameter is effective only if security_layer is set to tls or negotiate.

tcp_keepalive=[true|false]

Regulate if the listening socket uses socket option SO_KEEPALIVE. If set to 1, true or yes and the network connection disappears without closing messages, the connection will be closed.

tcp_nodelay=[true|false]

Regulate if the listening socket uses socket option TCP_NODELAY. If set to 1, true or yes, no buffering will be performed in the TCP stack.

tcp_send_buffer_bytes=buffer_size

tcp_recv_buffer_bytes=buffer_size

Specify send/recv buffer sizes in bytes. The default value depends on the operating system. It is recommended not to set these on systems with dynamic TCP buffer sizing

tls_ciphers=cipher_suite

Specifies TLS cipher suite. The format of this parameter is equivalent to which openssl(1) ciphers subcommand accepts. (ex. $ openssl ciphers 'HIGH:!ADH:!SHA1')

This parameter is effective only if security_layer is set to tls or negotiate.

use_fastpath=[input|output|both|none]

If not specified, defaults to none.

black=000000

grey=c0c0c0

dark_grey=808080

blue=0000ff

dark_blue=00007f

white=ffffff

red=ff0000

green=00ff00

background=000000

These options override the colors used internally by xrdp(8) to draw the login and log windows. Colors are defined using a hexadecimal (hex) notation for the combination of Red, Green, and Blue color values (RGB). The lowest value that can be given to one of the light sources is 0 (hex 00). The highest value is 255 (hex FF).

fv1_select=130:sans-18.fv1,0:sans-10.fv1

Selects a default fv1 font. This parameter is a comma-separated list of DPI:name pairs. The list is scanned from left-to-right. The font used is the first font whose DPI value is less-than-or-equal to the vertical DPI of the monitor used for the login screen.

default_dpi=96

Default DPI used for a monitor if the client does not send physical size information.

## LOGGING
The following parameters can be used in the [Logging] section:

LogFile=/var/log/xrdp.log

This options contains the path to logfile. It can be either absolute or relative. If set to <stdout>, log will go to stdout. Use for debugging only

LogLevel=level

This option can have one of the following values: CORE or 0 - Log only core messages. these messages are _always_ logged, regardless the logging level selected.

ERROR or 1 - Log only error messages

WARNING, WARN or 2 - Logs warnings and error messages

INFO or 3 - Logs errors, warnings and informational messages

DEBUG or 4 - Log everything. If xrdp-sesman is compiled in debug mode, this options will output many more low-level message, useful for developers

EnableSyslog=[true|false]

If set to 1, true or yes this option enables logging to syslog. Otherwise syslog is disabled.

SyslogLevel=level

This option sets the logging level for syslog. It can have the same values of LogLevel. If SyslogLevel is greater than LogLevel, its value is lowered to that of LogLevel.

EnableConsole=[true|false]

If set to 1, true or yes, this option enables logging to the console (ie. stdout).

ConsoleLevel=level

Logging level for the console. It can have the same values as LogLevel. Defaults to DEBUG.

EnableProcessId=[true|false]

If set to 1, true or yes, this option enables logging the process id in all log messages. Defaults to false.

## CHANNELS
The Remote Desktop Protocol supports several channels, which are used to transfer additional data like sound, clipboard data and others. Channel names not listed here will be blocked by xrdp. Not all channels are supported in all cases, so setting a value to true is a prerequisite, but does not force its use.

Channels can also be enabled or disabled on a per connection basis by prefixing each setting with channel. in the channel section.

rdpdr=[true|false]

If set to 1, true or yes using the RDP channel for device redirection is allowed.

rdpsnd=[true|false]

If set to 1, true or yes using the RDP channel for sound is allowed.

drdynvc=[true|false]

If set to 1, true or yes using the RDP channel to initiate additional dynamic virtual channels is allowed.

cliprdr=[true|false]

If set to 1, true or yes using the RDP channel for clipboard redirection is allowed.

rail=[true|false]

If set to 1, true or yes using the RDP channel for remote applications integrated locally (RAIL) is allowed.

xrdpvr=[true|false]

If set to 1, true or yes using the RDP channel for XRDP Video streaming is allowed.

## CONNECTIONS
A connection section is made of a section name, enclosed in square brackets, and the following entries:

name=<session name>

The name displayed in xrdp(8) login window's combo box.

lib=../vnc/libvnc.so

Sets the library to be used with this connection.

username=<username>|{base64}<base64-encoded-username>|ask

Specifies the username used for authenticating in the connection. If set to ask, user name should be provided in the login window. If the username includes comment out symbols such as '#', or ';', the username can be provided in base64 form prefixing "{base64}".

password=<password>|{base64}<base64-encoded-password>|ask

Specifies the password used for authenticating in the connection. If set to ask, password should be provided in the login window. This parameter can be provided in base64 form as well as username. See also examples below.

ip=127.0.0.1

Specifies the ip address of the host to connect to.

port=<number>|-1

Specifies the port number to connect to. If set to -1, the default port for the specified library is used.

xserverbpp=<number>

Specifies color depth of the backend X server. The default is the color depth of the client. Only Xvnc uses that setting. Xorg runs at 24 bpp.

disabled_encodings_mask=<number>

Set this bitmask to a non-zero value to prevent xrdp(8) requesting some features from the Xvnc server. You should only need to set this to a non-zero value to work around bugs in your Xvnc server. The bit values supported for a particular release of xrdp(8) are documented in xrdp.ini.

code=<number>|0

Specifies the session type. 0 is Xvnc over TCP, 1 is Xvnc over a UNIX domain socket, and 20 is Xorg with xorgxrdp modules. The default is 0 on non-FIPS systems, and 1 on FIPS systems.

chansrvport=DISPLAY(n)|DISPLAY(n,u)||/path/to/domain-socket

Asks xrdp to connect to a manually started xrdp-chansrv instance. This can be useful if you wish to use to use xrdp to connect to a VNC session which has been started other than by xrdp-sesman, as you can then make use of xrdp-chansrv facilities in the VNC session. Either the first or second form of this setting is recommended. Replace n with the X11 display number of the session, and (if applicable) u with the numeric ID of the session. The second form is only required if xrdp is unable to determine the session uid from the other values in the connection block.

h264_frame_interval=<integer>

[Xorg only] Specify frame capture interval for H.264 captures in milliseconds.

rfx_frame_interval=<integer>

[Xorg only] Specify frame capture interval for RemoteFX captures in milliseconds.

normal_frame_interval=<integer>

[Xorg only] Specify frame capture interval for normal captures in milliseconds.

## EXAMPLES
This is an example xrdp.ini:

```
[Globals]
bitmap_cache=true
bitmap_compression=true
[Xorg]
name=Xorg
lib=libxup.so
username=ask
password=ask
ip=127.0.0.1
port=-1
code=20
h264_frame_interval=16
rfx_frame_interval=32
normal_frame_interval=40
[vnc-any]
name=vnc-any
lib=libvnc.so
ip=ask
port=ask5900
username=na
password={base64}cGFzc3dvcmQhCg==
```

## FILES
/etc/xrdp/xrdp.ini

## SEE ALSO
xrdp(8), xrdp-chansrv(8), xrdp-sesman(8), xrdp-sesrun(8), sesman.ini(5)

For more info on xrdp see http://www.xrdp.org/


alerts.cfg

package: xymon-man

title: alerts.cfg(5)

text:
# alerts.cfg(5)

## NAME
alerts.cfg - Configuration for for xymond_alert module

## SYNOPSIS
~xymon/server/etc/alerts.cfg

## DESCRIPTION
The alerts.cfg file controls the sending of alerts by Xymon when monitoring detects a failure.

## FILE FORMAT
The configuration file consists of rules, that may have one or more recipients associated. A recipient specification may include additional rules that limit the circumstances when this recipient is eligible for receiving an alert.

Blank lines and lines starting with a hash mark (#) are treated as comments and ignored. Long lines can be broken up by putting a backslash at the end of the line and continuing the entry on the next line.

## RULES
A rule consists of one of more filters using these keywords:

PAGE=targetstring Rule matching an alert by the name of the page in Xymon. This is the path of the page as defined in the hosts.cfg file. E.g. if you have this setup:

```
page servers All Servers
subpage web Webservers
10.0.0.1 www1.foo.com
subpage db Database servers
10.0.0.2 db1.foo.com
```

Then the "All servers" page is found with PAGE=servers, the "Webservers" page is PAGE=servers/web and the "Database servers" page is PAGE=servers/db. Note that you can also use regular expressions to specify the page name, e.g. PAGE=%.*/db would find the "Database servers" page regardless of where this page was placed in the hierarchy.

The PAGE name of top-level page is an empty string. To match this, use PAGE=%^$ to match the empty string.

EXPAGE=targetstring Rule excluding an alert if the pagename matches.

DISPLAYGROUP=groupstring Rule matching an alert by the text of the display-group (text following the group, group-only, group-except heading) in the hosts.cfg file. "groupstring" is the text for the group, stripped of any HTML tags. E.g. if you have this setup:

```
group Web
10.0.0.1 www1.foo.com
10.0.0.2 www2.foo.com
group Production databases
10.0.1.1 db1.foo.com
```

Then the hosts in the Web-group can be matched with DISPLAYGROUP=Web, and the database servers can be matched with DISPLAYGROUP="Production databases". Note that you can also use regular expressions, e.g. DISPLAYGROUP=%database. If there is no group-setting for the host, use "DISPLAYGROUP=NONE".

EXDISPLAYGROUP=groupstring Rule excluding a group by matching the display-group string.

HOST=targetstring Rule matching an alert by the hostname.

EXHOST=targetstring Rule excluding an alert by matching the hostname.

SERVICE=targetstring Rule matching an alert by the service name.

EXSERVICE=targetstring Rule excluding an alert by matching the service name.

GROUP=groupname Rule matching an alert by the group name. Groupnames are assigned to a status via the GROUP setting in the analysis.cfg file.

EXGROUP=groupname Rule excluding an alert by the group name. Groupnames are assigned to a status via the GROUP setting in the analysis.cfg file.

CLASS=classname Rule matching an alert by the class that the host belongs to. By default, the classname is the operating system name; you can set another class either in hosts.cfg(5) using the CLASS tag, or a client running on the server can set the class (via a parameter to the client startup-script).

EXCLASS=classname Rule excluding an alert by the class name.

COLOR=color[,color] Rule matching an alert by color. Can be "red", "yellow", or "purple". The forms "!red", "!yellow" and "!purple" can also be used to NOT send an alert if the color is the specified one.

TIME=timespecification Rule matching an alert by the time-of-day. This is specified as the DOWNTIME timespecification in the hosts.cfg file.

EXTIME=timespecification Rule excluding an alert by the time-of-day. This is specified as the DOWNTIME timespecification in the hosts.cfg file.

DURATION>time, DURATION<time Rule matching an alert if the event has lasted longer/shorter than the given duration. E.g. DURATION>1h (lasted longer than 1 hour) or DURATION<30 (only sends alerts the first 30 minutes). The duration is specified as a number, optionally followed by 'm' (minutes, default), 'h' (hours) or 'd' (days).

RECOVERED Rule matches if the alert has recovered from an alert state.

NOTICE Rule matches if the message is a "notify" message. This type of message is sent when a host or test is disabled or enabled.

The "targetstring" is either a simple pagename, hostname or servicename, OR a '%' followed by a Perl-compatible regular expression. E.g. "HOST=%www(.*)" will match any hostname that begins with "www". The same for the "groupname" setting.

## RECIPIENTS
The recipients are listed after the initial rule. The following keywords can be used to define recipients:

MAIL address[,address] Recipient who receives an e-mail alert. This takes one parameter, the e-mail address. The strings "&host&", "&service&" and "&color&" in an address will be replaced with the hostname, service and color of the alert, respectively.

SCRIPT /path/to/script recipientID Recipient that invokes a script. This takes two parameters: The script filename, and the recipient that gets passed to the script. The strings "&host&", "&service&" and "&color&" in the recipientID will be replaced with the hostname, service and color of the alert, respectively.

IGNORE This is used to define a recipient that does NOT trigger any alerts, and also terminates the search for more recipients. It is useful if you have a rule that handles most alerts, but there is just that one particular server where you don't want cpu alerts on Monday morning. Note that the IGNORE recipient always has the STOP flag defined, so when the IGNORE recipient is matched, no more recipients will be considered. So the location of this recipient in your set of recipients is important.

FORMAT=formatstring Format of the text message with the alert. Default is "TEXT" (suitable for e-mail alerts). "PLAIN" is the same as text, but without the URL link to the status webpage. "SMS" is a short message with no subject for SMS alerts. "SCRIPT" is a brief message template for scripts.

REPEAT=time How often an alert gets repeated. As with DURATION, time is a number optionally followed by 'm', 'h' or 'd'.

UNMATCHED The alert is sent to this recipient ONLY if no other recipients received an alert for this event.

STOP Stop looking for more recipients after this one matches. This is implicit on IGNORE recipients.

Rules You can specify rules for a recipient also. This limits the alerts sent to this particular recipient.

## MACROS
It is possible to use macros in the configuration file. To define a macro:

$MYMACRO=text extending to end of line

After the definition of a macro, it can be used throughout the file. Wherever the text $MYMACRO appears, it will be substituted with the text of the macro before any processing of rules and recipients.

It is possible to nest macros, as long as the macro is defined before it is used.

## ALERT SCRIPTS
Alerts can go out via custom scripts, by using the SCRIPT keyword for a recipient. Such scripts have access to the following environment variables:

BBALPHAMSG The full text of the status log triggering the alert

ACKCODE The "cookie" that can be used to acknowledge the alert

RCPT The recipientID from the SCRIPT entry

BBHOSTNAME The name of the host that the alert is about

MACHIP The IP-address of the host that has a problem

BBSVCNAME The name of the service that the alert is about

BBSVCNUM The numeric code for the service. From the SVCCODES definition.

BBHOSTSVC HOSTNAME.SERVICE that the alert is about.

BBHOSTSVCCOMMAS As BBHOSTSVC, but dots in the hostname replaced with commas

BBNUMERIC A 22-digit number made by BBSVCNUM, MACHIP and ACKCODE.

RECOVERED Is "0" if the service is alerting, "1" if the service has recovered, "2" if the service was disabled.

EVENTSTART Timestamp when the current status (color) began.

SECS Number of seconds the service has been down.

DOWNSECSMSG When recovered, holds the text "Event duration : N" where N is the DOWNSECS value.

CFID Line-number in the alerts.cfg file that caused the script to be invoked. Can be useful when troubleshooting alert configuration rules.

## SEE ALSO
xymond_alert(8), xymond(8), xymon(7), the "Configuring Xymon Alerts" guide in the Online documentation.