TERM
WSupported on Windows
|
USupported on Unix
|
VSupported on OpenVMS
|
NSupported in Synergy .NET
|
The TERM environment variable specifies the terminal type to use.
Value
The type of terminal you are using.
Discussion
TERM performs two separate functions within Synergy programs: controlling the output of text to the terminal and controlling the interpretation of keyboard input. The first function applies to Unix, OpenVMS, and .NET terminal applications. In traditional Synergy and Synergy .NET on Windows, TERM only handles keyboard input, making it essentially the same as DTKTERM.
When Synergy programs use a terminal for output, they typically generate escape sequences to handle terminal graphics (i.e., graphical elements such as lines). The programs use the value of TERM to decide which escape sequences to generate, and they assume that the terminal will correctly interpret these sequences and draw the correct lines. But because some terminals (such as cmd.exe) don’t know how to interpret these sequences correctly, they display letters instead. Since this can be visually unappealing, you can make the runtime disable terminal graphics by setting TERM to “dumb” (with quotation marks on OpenVMS) or not setting TERM at all. Either of these options will cause the runtime to stop sending escape sequences for graphical elements and instead use printable ASCII characters for drawing lines, making the results look the same regardless of the terminal type. |
On Windows, if you are using UI Toolkit, TERM should be set to mswindows. However, if neither DTKTERM nor TERM are set, Toolkit defaults to mswindows.
On Unix, TERM is normally set when you log in, as other Unix tools such as vi also use TERM. Typical values are vt100, xterm, xterm-256color, and linux. If TERM isn’t set automatically, you must set it if you are using UI Toolkit or the Synergy windowing API. See the documentation for DTKTERM for typical values.
The Unix operating system looks in the directory /usr/subdir/terminfo (where subdir is either share, lib, or share/lib) or in the file /etc/termcap for your terminal type. The terminal type for your process may already be set. If it is, make sure it’s valid. If TERM is not set or is set to a nonexistent terminal type, Synergy DBL returns an error at startup (unless system option #30 is set).
Most virtual terminal emulators can produce the ANSI character sequences produced by a VT100 terminal, so matching that behavior with TERM=vt100 is much easier and more complete than attempting to find or create a terminal setting in one of the system terminfo or termcap databases to match the emulator. |
TERM is ignored for applications targeting .NET Framework or .NET Windows, but it is used by .NET terminal applications. However, be aware that ibmpc and mswindows don’t work the same way with .NET terminal applications as they do with traditional Synergy programs on Windows. |
Setting location
The environment. On Windows, this environment variable can also be set in the [synergy], [dbr], or [myprog] section of synergy.ini (where myprog is any .dbr file).
TERM can be reset by the SETLOG subroutine, and the runtime interprets the new setting.
Used by
Runtime
See also
Customizing key mapping for menu shortcuts for more information about terminal types
Examples
On Unix,
TERM=vt100 ;export TERM