Table of Contents

Name

dtterm -- emulate a terminal window

Synopsis

dtterm [±132] [±aw] [-background background_color] [-bg background_color] [±bs] [-C] [-display display_name] [-e program_argument ...] [-fb fontset] [-fg foreground_color] [-fn fontset] [-font fontset] [-foreground foreground_color] [-geometry geometry_string] [-help] [±iconic] [±j] [±kshMode]
[±l] [-lf file_name] [±ls] [±map] [±mb] [-ms pointer_color] [-name prog_name] [-nb number] [±rw] [-S ccn] [-S c.n] [±sb] [±sf] [-sl screens [s! | !l ] ] [-ti term_id] [-title title_string] [-tm term_modes] [-tn term_name] [-usage] [±vb] [-xrm resource_string]

Description

The dtterm utility provides runtime support of legacy applications written for terminals conforming to ANSI X3.64-1979 and ISO 6429:1992(E), such as the DEC VT220.

Options

The following options are available:

-132
Recognize the DECCOLM escape sequence and resize the window appropriately. Normally, dtterm ignores the DECCOLM escape sequence, which switches between 80- and 132-column mode.
+132
Ignore the DECCOLM escape sequence. This is the default behavior.
-aw
Allow auto-wraparound. This option allows the cursor to automatically wrap to the beginning of the next line when it is at the right-most position of a line and text is output. This is the default behavior.
+aw
Do not allow auto-wraparound.
-background background_color
Specify the terminal window background and the default background for the scroll bar and the X11 pointer cursor. This option defaults to either the primary colorset background (default) or select pixel (see -bs ). The background_color argument describes the background color.
-bg background_color
The background_color argument describes the background color.
-bs
Use the Motif select color instead of the background color for the terminal window’s background color.
+bs
Do not use the Motif select color instead of the background color for the terminal window’s background color. This is the default behavior.
-C
Specify that output directed to /dev/console be directed instead to the terminal window. It is provided as a way to prevent output, which would normally be displayed on the internal terminal emulator (ITE), from overwriting the X server’s display. It is not provided as a general purpose mechanism to direct the output from an arbitrary system’s /dev/console to an arbitrary X server. Ownership of, and read-write permission for, /dev/console is required in order to redirect console output.
-display display_name
Specify the X11 display server. This defaults to the DISPLAY environment variable. The display_name argument specifies the X11 display to which dtterm connects.
-e program_argument
..." 10 Specify an executable program and any command-line arguments dtterm invokes as a subprocess when dtterm is started. It must be the last option on the command line. The program_argument arguments specify the program and any command-line arguments to be invoked by dtterm.
-fb fontset
Specify an XFontSet used by dtterm when displaying bold terminal text. The XFontSet should be specified as a Motif XmFontList(3) . The terminal emulator supports only character or mono-spaced fonts. When using proportional fonts, the behavior is undefined. The terminal emulator generates a default bold font based on the XLFD name of the userFont. If that font is not available, the terminal emulator generates bold text by overstriking (with a one pixel offset) the userFont. The fontset argument specifies the bold terminal XFontSet used by dtterm.
-fg foreground_color
Specify the foreground color of the terminal window as well as the default foreground color used by dtterm for the scroll bar and the for the X11 pointer cursor. This option defaults to either the primary colorset foreground (default) or select pixel. The foreground_color argument specifies the foreground color.
-fn fontset
Specify an XFontSet used by dtterm when displaying terminal text. It should be specified as a Motif XmFontList(3) . Only character or mono-spaced fonts are supported. When using proportional fonts, the behavior is undefined. This font is not used to display non-terminal text (such as menu bar, popup menus or dialogs). The default uses the XmNtextFontList value of the parent bulletin board (see the XmBulletinBoard widget) in the same manner as the XmText widget. The fontset argument specifies the terminal XFontSet.
-font fontset
Equivalent to -fn. The fontset argument specifies the terminal XFontSet.
-foreground foreground_color
Equivalent to -fg. The foreground_color argument specifies the foreground color used by dtterm.
-geometry geometry_string
Specify the terminal window’s preferred size and position. Width and height are expressed in characters. The default size is 24 lines of 80 characters each. There is no default position. The geometry_string argument specifies the terminal geometry used by dtterm.
-help
Display a message summarizing dtterm usage.
-iconic
Display the terminal emulator initially in an iconified state.
+iconic
Display the terminal emulator initially as a normal window. This is the default behavior.
-j
Use jump scrolling. With jump scrolling, the screen may be scrolled more than one line at a time. This provides for faster screen updates when multiple lines of text are sent to the terminal. The maximum number of lines that may be jump scrolled is limited to the number of lines in the terminal window. The dtterm terminal emulator guarantees that all lines are displayed. This is the default behavior.
+j
Do not use jump scrolling.
-kshMode
Enable ksh mode. In ksh mode, a key pressed with the extend modifier bit set generates an escape character followed by the character generated by the un-extended keystroke. This option is provided for use with emacs command-line editor mode of ksh(1) . It conflicts with the normal meta key use for generating extended single byte characters and for generating multi-byte Asian characters.
+kshMode
Do not enable ksh(1) mode. This is the default behavior.
-l
Enables output logging. When dtterm enables logging, all output received from the subprocess is logged either to a file or to a command pipeline (as specified via the -lf option described in the following paragraph). Since data are logged directly from the subprocess, the log file includes all escape characters and carriage-return and newline pairs the terminal line discipline sends. The application may enable and disable logging via escape sequences.
+l
Disable output logging. This is the default behavior.
-lf file_name
Name the file to which dtterm writes the output log. If the file_name argument begins with a pipe symbol (!|!), dtterm assumes the rest of the string to be a command to be used as the endpoint of a pipe. The default file name is DttermLog XXXXX (where XXXXX is a unique value) and is created in the directory from which the subprocess was started. The file_name argument specifies the log file name used by dtterm for logging.
-ls
Start a login shell (the first character of argv[0] is a dash), indicating to the shell that it should read the system’s profile and the user’s .profile files (for ksh(1) and sh(1) ), or the system’s csh.login and the user’s .login (for csh(1) ).
+ls
Start a normal (non-login) shell. This is the default behavior.
-map
Map (de-iconify) dtterm upon subprocess output if dtterm is unmapped (iconified). The user can specify, via the mapOnOutputDelay resource, an initial period of time during which dtterm does not map itself upon subprocess output.
+map
Indicate there is no special mapping behavior. This is the default behavior.
-mb
Ring a bell when the user types at a specified distance from the right margin. The distance from the right margin is specified by the -nb option.
+mb
Do not ring a bell when the user types near the right margin. This is the default behavior.
-ms pointer_color
Specify the foreground color used by dtterm for the terminal window’s (X11) pointer cursor. The default is the terminal window’s foreground color (see -foreground). The pointer_color argument specifies the pointer foreground color used by dtterm.
-name prog_name
Specify the X11 name of the dtterm window. The prog_name argument specifies the name to use.
-nb number
Ring the bell this number of characters from the right margin when enabled. The default is 10. The number argument specifies the number of characters.
-rw
Enable reverse-wraparound.
+rw
Do not enable reverse-wraparound. This is the default behavior.
-Sccn
Run the terminal emulator against a pre-opened pty or STREAMS pseudo-terminal device. The terminal emulator provides this option to use when the pseudo-terminal device name is of the form tty?? (that is, exactly two characters following the tty). This option is intended for use when dtterm is programmatically invoked from within another application. The cc argument specifies the last two characters of the pseudo-terminal device’s slave name where the pseudo-terminal device slave name is of the form tty??. This value is ignored, but must be exactly two characters in length. The n argument specifies the file descriptor number that corresponds to the pseudo-terminal device’s already opened master side.
-Sc.n
Equivalent to -Sccn, but provided for systems with a larger pseudo-terminal device name space. The c argument specifies the last component of the pseudo-terminal device slave name. The terminal emulator ignores this value and the value may be empty. The n argument specifies the number of the file descriptor that corresponds to the pseudo-terminal device’s already opened master side.
-sb
Display a scroll bar. This is the default behavior.
+sb
Do not display a scroll bar.
-sf
Generate Sun Function Key escape sequences instead of standard ANSI escape sequences for the terminal’s function keys.
+sf
Generate standard ANSI escape sequences instead of Sun Function Key escape sequences for the terminal’s function keys. This is the default behavior.
-sl screens[s|l]
Specify the number of lines in the terminal buffer beyond the length of the window. The option value consists of a number followed by an optional suffix. If no suffix is included or the suffix is "l" (ell), the total length of the terminal buffer is screens plus the length of the terminal window. If the suffix is "s" (ess) the total length of the terminal buffer is ( screens+1) times the length of the terminal window. The dtterm utility attempts to maintain the same buffer-to-window ratio when the window is resized larger. The default is 4s. The screens argument specifies the number of screens or lines to save.
-ti term_id
Specify the name used by dtterm to select the correct response to terminal ID queries. Valid values are vt100, vt101, vt102, and vt220. The default is vt220. The term_id argument specifies the terminal ID to use.
-title title_string
The title_string argument specifies the window title used by dtterm. The title defaults to the last component of the program’s path if the -e option is specified; otherwise the title defaults to Terminal.
-tm term_modes
Specify a string containing terminal-setting keywords and the characters to which they can be bound. Allowable keywords include: intr, quit, erase, kill, eof, eol, swtch, start, stop, brk, susp, dsusp, rprnt, flush, weras and lnext. The terminal emulator correctly parses and silently ignores keywords that do not apply to a specific architecture. Control characters can be specified as ^char (for example, ^c or ^u), and ^? can be used to indicate Delete. This is useful for overriding the default terminal settings without having to do an stty(1) every time a DtTerm widget is created. The default is NULL. The term_modes argument specifies the terminal mode string.
-tn term_name
Specify a name to which dtterm sets the TERM environment variable. The default is dtterm. The term_name argument specifies the terminal name used by dtterm.
-usage
Display a usage message on the screen.
-vb
Use a visual bell instead of an audible one. Flash the window instead of ringing the terminal bell whenever a <control>-G is received.
+vb
Use an audio bell instead of a visual one. This is the default behavior.
-xrm resource_string
Allow the user to specify the X11 Resource Manager-style resources on the command line. The resource_string argument specifies an X11 resource string. (See XrmParseCommand(3) and XGetDefault(3) for more information.)

Operands

None.

Stdin

Not used.

Input Files

None.

Environment Variables

The following environment variables affect the execution of dtterm:

DISPLAY
Specify the default X Windows display to connect to (see -display ). The terminal emulator sets the subprocess’s DISPLAY environment variable to the connected X11 display name.
HOME
Determine the user’s home directory, the location of configuration files.
LANG
Provide a default value for the internationalization variables that are unset or null. If LANG is unset or null, the corresponding value from the implementation-specific default locale will be used. If any of the internationalization variables contains an invalid setting, the utility behaves as if none of the variables had been defined.
LC_ALL
If set to a non-empty string value, override the values of all the other internationalization variables.
LC_MESSAGES
Determine the locale that is used to affect the format and contents of diagnostic messages written to standard error and informative messages written to standard output.
NLSPATH
Determine the location of message catalogues for the processing of LC_MESSAGES.
SHELL
Determine the default application to run.
XAPPLRESDIR
Specify the name of a directory that contains application-specific resources. If this environment variable is defined, and is set to an existing directory, then it is searched (in addition to the standard locations) for files containing application-specific resource specifications.
XENVIRONMENT
Specify the name of a resource file with user- or machine-specific resources. If this variable is not defined, dtterm looks for a file named $HOME/.Xdefaults- hostname instead, where hostname is the name of the host where the application is executing.
XFILESEARCHPATH
Define a language-dependent location of app-defaults.
XMODIFIER
Specify which input method to use.
XUSERFILESEARCHPATH
Control where X applications look for their app-defaults resource files. The default is located in the directory /usr/dt/app-defaults. The user must set XUSERFILESEARCHPATH if the user’s resource files are not in this location.

The terminal emulator creates the following variable when it invokes another process:

TERM
The terminal emulator sets the subprocess’s TERM environment variable to the termName resource value. Applications use this variable to determine the type of escape sequences to use when driving the terminal emulator.
TERMINAL_EMULATOR
The terminal emulator sets the subprocess’s TERMINAL_EMULATOR environment variable to dtterm to indicate that the process is running from a dtterm terminal emulator.
WINDOWID
The terminal emulator sets the subprocess’s WINDOWID environment variable to the window number of the window in which text is rendered.

Resources

The dtterm utility allows the user to specify behavior through X11 resources as well as the command-line interface. The following is a list of the defined resources:
The dtterm Client
Resource Set
Name
allowSendEvents
appCursorDefault
appKeypadDefault
autoWrap
background
backgroundIsSelect
blinkRate
borderColor
borderWidth
c132
charCursorStyle
consoleMode
foreground
geometry
iconic
iconName
jumpScroll
kshMode
logging
logFile
"DttermLogXXXXX" (where
XXXXX is a unique value)
T}
logInhibit
loginShell
mapOnOutput
mapOnOutputDelay
marginBell
menuBar
menuPopup
nMarginBell
pointerBlank
pointerBlankDelay
pointerColor
pointerColorBackground
pointerShape
reverseWrap
saveLines
scrollBar
sunFunctionKeys
termId
termName
title
ttyModes
userBoldFont
userFont
visualBell

allowSendEvents
Specifies that the terminal emulator allow synthetic events (generated and sent by another application). Enabling this resource opens up a possible security hole.
appCursorDefault
If True, the cursor keys are initially in application mode. If False, the cursor keys are initially in cursor mode.
appKeypadDefault
If True, the keypad keys are initially in application mode. If False, the keypad keys are initially in numeric mode.
autoWrap
Specifies whether or not auto-wraparound is initially enabled.
background
Specifies the background color of the terminal window as well as the default background color for the scroll bar. This resource defaults to either the primary colorset background or select pixel (see backgroundIsSelect ).
backgroundIsSelect
Specifies that the terminal window should use the Motif select color instead of the background color for the terminal window’s background color.
blinkRate
Specifies the number of milliseconds the cursor is in the on and off states while blinking. A value of 250 blinks the cursor two times per second. A value of zero turns blinking off.
borderColor
Specifies the border color for the window. The window border need not be visible when re-parenting window managers are used.
borderWidth
Specifies the border width of the shell widget’s window. This value may be overridden by re-parenting window managers.
c132
Specifies whether or not the DECCOLM escape sequence, which switches between a 132- and 80-column window, is honored.
charCursorStyle
This resource specifies the shape of the text cursor. A char_cursor_box value specifies a cursor the width and height of the base font’s bounding box. A char_cursor_bar value specifies a cursor the width of the base font’s bounding box, 2 pixels high, and drawn with its top on the baseline.
consoleMode
Specifies that output directed at /dev/console be directed instead to the terminal window. It is provided as a way to prevent output, that would normally be displayed on the internal terminal emulator (ITE), from overwriting the X server’s display. It is not provided as a general mechanism to direct the output from an arbitrary system’s /dev/console to an arbitrary X server. Ownership of, and read-write permission for, /dev/console is required in order to redirect console output.
foreground
Specifies the foreground of the terminal window as well as the default used by dtterm for the scroll bar and the color used for the pointer cursor. This resource defaults to the primary colorset foreground pixel.
geometry
Specifies the terminal window’s preferred size and position. The default size is 24 lines of 80 characters each. There is no default position.
iconGeometry
Specifies the preferred position of the terminal emulator’s icon. Window managers may ignore this value. There is no default.
iconic
Specifies whether or not the terminal emulator is initially displayed in an iconified state.
iconName
Specifies the name for the icon. When used with the -e option, the default is the last component of the program’s path; otherwise, the default is the last component of the name used to execute dtterm (that is, argv[0]).
jumpScroll
Specifies that dtterm use jump scrolling. With jump scrolling, the screen may be scrolled more than one line at a time. This provides for faster screen updates when multiple lines of text are sent to the terminal. The maximum number of lines that may be jump scrolled is limited to the number of lines in the terminal window. The dtterm terminal emulator guarantees that all lines are displayed.
kshMode
Enables ksh mode. With ksh mode, a key pressed with the extend modifier bit set generates an escape character followed by the character generated by the un-extended keystroke. This option is provided for use with the emacs command-line editor mode of ksh(1) . It conflicts with the normal meta key use for generating extended single byte characters and for generating multi-byte Asian characters.
logging
Enables output logging. When logging is enabled, all output received from the subprocess is logged either to a file or to a command pipeline (as specified via the logFile option). Since the data is logged directly from the subprocess, it includes all escape characters and carriage-returns and newline pairs the terminal line discipline sends. Logging may be enabled and disabled via escape sequences.
logFile
Specifies the filename to which dtterm writes the output log. If the filename begins with a pipe symbol (!|!), dtterm assumes the rest of the string is a command to be used as the endpoint of a pipe. The default filename is DttermLogXXXXX (where XXXXX is a unique value) and is created in the directory from which the subprocess was started.
logInhibit
Indicates that dtterm inhibit device and file logging.
loginShell
Indicates that the shell that is started be a login shell (that is, the first character of argv[0] is a dash), indicating that the shell should read the system’s profile and the user’s .profile files (for ksh(1) and sh(1) ) or the system csh.login and the user’s .login (for csh(1) ).
mapOnOutput
Indicates that the terminal emulator map (de-iconify) itself upon subprocess output if it is unmapped (iconified). The user can specify, via the mapOnOutputDelay resource, an initial period of time during which dtterm does not map itself upon subprocess output.
mapOnOutputDelay
Specifies the number of seconds after start-up that dtterm does not honor the mapOnOutput resource. This allows the application to send initial output (for example, shell prompts) to the terminal without auto mapping the window. The default is zero (no delay).
marginBell
Specifies whether or not the bell rings when the user types near the right margin. The distance from the right margin is specified by the nMarginBell resource.
menuBar
Indicates that dtterm displays a pulldown menu bar. The default is True.
menuPopup
Indicates that dtterm displays a popup menu. The default is True.
nMarginBell
Specifies the number of characters from the right margin at which the margin bell rings, when enabled.
pointerBlank
Specifies that dtterm puts the pointer cursor into blanking mode. In this mode, the cursor turns on when the pointer is moved, and is blanked after a selectable number of seconds or after keyboard input. The pointerBlankDelay resource sets the delay.
pointerBlankDelay
Specifies the number of seconds to wait after the pointer has stopped moving before blanking the pointer (see pointerBlank). A value of zero delays pointer blanking until a key is pressed.
pointerColor
Specifies the foreground color used by dtterm for the terminal window’s pointer (X11) cursor. The default is the terminal window’s foreground color (see foreground).
pointerColorBackground
Specifies the background color used by dtterm for the terminal window’s pointer (X11) cursor. The default is the terminal window’s background color (see background).
pointerShape
Specifies the X cursor font character used by dtterm as the pointer cursor. The font character must be specified as a string from the X11/cursorfont.h header with the leading XC_ removed. The default is xterm(1) .
reverseWrap
Specifies whether or not reverse-wraparound is enabled.
saveLines
Specifies the number of lines in the terminal buffer beyond the length of the window. The option value consists of a number followed by an optional suffix. If no suffix is included or the suffix is "l" (ell), the total length of the terminal buffer is screens plus the length of the terminal window. If the suffix is "s" (ess) the total length of the terminal buffer is ( screens+1) times the length of the terminal window. The dtterm utility attempts to maintain the same buffer-to-window ratio when the window is resized larger.
scrollBar
Specifies that dtterm displays a scroll bar.
sunFunctionKeys
Specifies whether dtterm generates Sun Function Key escape sequences instead of standard ANSI escape sequences for the terminal’s function keys.
termId
Supplies the name used to select the correct response to terminal ID queries. Valid values are vt100, vt101, vt102, and vt220.
termName
Specifies a name to which dtterm sets the TERM environment variable. The default is dtterm.
title
Specifies the window title. When used with the -e option, the default is the last component of the program’s path; otherwise, the default is the last component of the name used to execute dtterm (that is, argv[0]).
ttyModes
Specifies a string containing terminal-setting keywords and the characters to which they can be bound. Allowable keywords include: intr, quit, erase, kill, eof, eol, swtch, start, stop, brk, susp, dsusp, rprnt, flush, weras and lnext. The terminal emulator correctly parses and silently ignores keywords that do not apply to a specific architecture. Control characters can be specified as ^char (for example, ^c or ^u), and ^? can be used to indicate Delete. This is useful for overriding the default terminal settings without having to do an stty(1) every time a DtTerm widget is created.
userBoldFont
Specifies an XFontSet used by dtterm when displaying bold terminal text. The XFontSet should be specified as a Motif XmFontList(3) . The terminal emulator supports only character or mono-spaced fonts. When using proportional fonts, the behavior is undefined. The terminal emulator generates a default bold font based on the XLFD name of the userFont. If that font is not available, dtterm generates bold text by overstriking (with a one pixel offset) the userFont.
userFont
Specifies an XFontSet used by dtterm when displaying terminal text. XFontSet should be specified as a Motif XmFontList(3) . The terminal emulator supports only character or mono-spaced fonts. When using proportional fonts, the behavior is undefined. This font is not used to display non-terminal text (such as menu bar, popup menu and dialog). The default is the XmNtextFontList value of the parent bulletin board (see the XmBulletinBoard widget) in the same manner as the XmText widget.
visualBell
Indicates that a visual bell is preferred over an audible one. Instead of ringing the terminal bell whenever a <control>-G is received, the window is flashed.

Resource/Option Correspondence

Many of the preceding resources correspond to the command-line arguments. The following table describes the relationship between the two:
Command-line option
-132
+132
-aw
+aw
-background background_color
-bg background_color
-bs
+bs
-C
-display display_name
-e program_argument...
-fb fontset
-fg foreground_color
-fn fontset
-font fontset
-foreground foreground_color
-geometry geometry_string
-iconic
+iconic
-j
+j
-kshMode
+kshMode
-l
+l
-lf file_name
-ls
+ls
-map
+map
-mb
+mb
-ms pointer_color
-name prog_name
-nb number
-rw
+rw
-sb
+sb
-sf
+sf
-sl screenss
-sl lines
-ti term_id
-title title_string
-tm term_modes
-tn term_name
-vb
+vb

Asynchronous Events

The dtterm utility takes the standard action for all signals.

Stdout

Not used.

Stderr

Used only for diagnostic messages.

Output Files

None.

Extended Description

On-the-Spot Preedit Style and Behavior

When the user selects the on-the-spot input method style, preedit strings are displayed in the dtterm window, causing original data within dtterm to shift out to make room for the data in the preedit buffer.

To cause dtterm to commit the preedit string, the user can select one of the following actions:

cut

paste

selection

cursor movement

commit key

Note that the input method server may interpret cursor movement events within the preedit buffer as preedit movement commands. In this case, the string may not be committed. The interpretation of these movement events is completely dependent upon the implementation of the input method server.

In addition to the generic actions listed above, there are several action routines defined in the DtTerm widget that may cause committal. These action routines include move_cursor, process_bdrag, and string. The action routines correspond to the generic commit actions listed above.

When the preedit buffer is active, it may be highlighted. This highlight value can be set by the input method server. Since there is only a single highlight mode available in the DtTerm widget, the following XIMFeedbacks will set the highlight:

XIMPrimary

XIMSecondary

XIMTertiary

Exit Status

0
successful completion
>0
an error occurred

Consequences of Errors

Default.

Application Usage

None.

Examples

None.

See Also

Dt/Term.h - DtTerm(5) , stty(1) , dtterm(5) , X(1) , XmFontList(3) , XmText(3) , pty(7) , tty(7) .


Table of Contents