Current terminal number

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS

The TNMBR environment variable specifies the current terminal number.


The number you want the TNMBR subroutine to return for your terminal.


It is your responsibility to ensure that you don’t give the same terminal number to more than one terminal.

When a non‑interactive runtime (dbs, dbssvc, or dbspriv) is used, or when an interactive runtime is used with input or redirected output, TNMBR defaults to ‑1.

On Windows, if you don’t set TNMBR, the runtime uses the default value, which is 0 in all Windows environments.

On UNIX, avoid setting TNMBR to 254 or 255 when using SEND and RECV.

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).

TNMBR can be reset by the SETLOG subroutine, and the runtime interprets the new setting.

Used by



On OpenVMS,