Tera Term Help Index

Copyright (C) 1994-1998 T. Teranishi
(C) 2004-2021 TeraTerm Project
All Rights Reserved.

Tera Term is a free software terminal emulator (communication program) which supports:

  • Serial port connections.
  • TCP/IP (telnet, SSH1, SSH2) connections.
  • Log replaying.
  • Named pipe connection.
  • IPv6 communication.
  • VT100 emulation and selected VT200/300 emulation.
  • TEK4010 emulation.
  • File transfer protocols (Kermit, XMODEM, YMODEM, ZMODEM, B-PLUS and Quick-VAN).
  • Scripts using the "Tera Term Language".
  • Japanese, English, Russian, Korean and UTF-8 character sets.
  • UTF-8 character encoding.
  • Message catalog(Japanese, English, German, French, Russian, Korean and Chinese).
About Tera Term
  • Foreword
  • History
  • Differences from 2.3
  • Components
  • License and Copyright
  • Requirements
  • Emulations
  • Supported Control Sequences
  • Q & A
  • Requests
  • Contacting the author
  • Document writer
Usage
  • Keyboard
  • Mouse
  • Shortcut
  • SSH connection
  • Cygwin connection
  • Proxy connection
  • LogMeTT
  • Tera Term Menu
  • Unicode
  • Background transparency
  • Tips
  • Additional plug-ins
    • Window resize plug-in
    • TTY record
    • Recurring command
VT window commands
  • [File] menu
  • [Edit] menu
  • [Setup] menu
  • [Control] menu
  • [Window] menu
  • [Help] menu
  • Additional plug-ins
    • [Resize] menu
TEK window commands
  • [File] menu
  • [Edit] menu
  • [Setup] menu
  • [VT-window] command
  • [Window] menu
  • [Help] menu
Command line
  • Tera Term
  • Tera Term Macro
  • TTSSH
  • CygTerm+
  • TTProxy
  • Additional plug-ins
    • TTXttyplay
Setup files
  • Tera Term setup file
  • Keyboard setup file
  • TTSSH known_hosts file
  • CygTerm+ setup file
  • Language file
Reference data
  • Key code
  • RE
  • License of OpenSSL
  • License of OpenSSH
  • License of zlib
  • License of PuTTY
  • License of Oniguruma
  • License of SFMT
  • License of CygTerm+
  • For developer
    • build with CMake (experimental)
      • library
      • Tera Term
  • Source Code Overview
MACRO help index
Uninstallation


Foreword

Dear Tera Term user,

This topic briefly covers "Tera Term" creation and development history.

Tera Term is the terminal emulator for Microsoft Windows, that supports serial port, telnet and SSH connections. Among many other features it also has built-in Macro scripting language. Tera Term is often used to automate tasks related to remote connections initiated from PC.

Tera Term, also known by the abbreviation `TT' was created in 1994 in Japan. The original author of the Tera Term was Takashi Teranishi. He was the one who put in place the "backbone" off the application that allows to develop it further today - over decade later.

Tera Term was released as freeware and won "Online software grand prize 97" competition held by Japanese tool portal Madonomori in 1997.

Tera Term supports the plug-in mechanism allowing to create many useful extensions to the application. One of them, TTSSH, which stands for Tera Term SSH extension, is well-known to every Tera Term user. TTSSH was developed by Robert O'Callahan back in 1998 and extended Tera Term with SSH1 protocol support.

Takashi Teranishi stopped developing Tera Term in 1998. The latest version 2.3 was compatible with Windows 95 and Windows NT. Unusually for that time for Windows-based application, the source code of both Tera Term and TTSSH was open. However, distribution of Tera Term binaries still required permission from Takashi Teranishi.

Tera Term has been popular among engineers in Japan and all over the world for many years, but not being developed since 1998 it slowly started to become out of date. Tera Term got compatibility issues with the latest versions of Windows, was lacking SSH2 protocol support, etc. There were several plug-ins like IPv6 and transparency support developed by different users however they did not address all the issues and could not be distributed as new version of Tera Term as this would require permission from Teranishi san who was not easy to reach.

Finally in September 2004 group of enthusiasts from Japan was able to contact Takashi Teranishi, obtained the permissions to develop Tera Term further and to distribute it under BSD license. Few months later, in November 2004 TeraTerm Project was launched on SourceForge.jp. The project is ongoing as Tera Term succession version and is being officially recognized by the original author. The name of the project is `Tera Term'. The team of developers is from Japan. Support forum established in early 2005 is the place where Tera Term users can ask their questions, exchange ideas, share their experience working with the application, post new feature suggestions or report the bugs. Support Forum is also the place where TeraTerm Project team directly interacts with end users which benefits both sides and makes Tera Term better with every new release.

A finally, we'd like to thank all the people involved in Tera Term development starting Takashi Teranishi as well as all Tera Term users that made this application so popular worldwide. TeraTerm Project team feels increasing interest to the application and this motivates us to keep developing Tera Term further.

With very best regards,
TeraTerm Project Team

Japan - Tokyo, August 2007


History

  • Tera Term
  • TTSSH
  • CygTerm+
  • cyglaunch
  • TTProxy
  • TeraTerm Menu
  • TTX KanjiMenu
  • TTXAlwaysOnTop
  • TTXKCodeChange
  • TTXResizeMenu
  • TTXttyrec
  • TTXViewMode
  • TTXRecurringCommand

Tera Term

2021.6.5 (Ver 4.106)

  • Changes
    • Increased max width of window from 500 to 1000 chars.
    • Serial port connection
      • Removed the 1.5 stop bit in the serial port setup.
      • Removed the "1.5" name from the StopBit entry in the teraterm.ini file.
  • Bug fixes
    • The elapsed time style timestamp in the log is incorrect.
    • Fixed support for IME feedback back and forth function. This bug was introduced in 4.103.
    • Fixed an application fault occurs when VT Window and HtmlHelp Windows are closed at same time.
    • Fixed desktop images can not be displayed on background other than main display. This bug was introduced in 4.101.
    • Fixed memory leak when tool tip is shown. This bug was introduced in 4.103.
    • MACRO: the yesnobox command shows "OK" instead of "yes" without language file. This bug was introduced in 4.103.
    • MACRO: The file handle opened by filecreate, fileopen marco command is locking.
    • MACRO: When the getdate, gettime command is executed with timezone parameter, valid time may not be returned. Build mistaken in 4.105.
  • Misc
    • upgraded TTSSH to 2.92.
    • upgraded TTX KanjiMenu Plug-in to 0.1.8
    • upgraded TeraTerm Menu to 1.16
    • upgraded Oniguruma to 6.9.7.1.

2019.12.7 (Ver 4.105)

  • Changes
    • Added SFMT information on version dialog.
    • Changed of indication from "Protocol" to "IP version" and from "UNSPEC" to "AUTO" on New connection dialog.
    • When the opacity value of the window is temporarily changed by operating the mouse wheel on the title bar of VT window, the tooltip of the opacity value is shown.
    • The location of resizing tooltip is automatically moved to coordinates after resizing.
    • Added slider for specify the opacity values on the Visual tab of the Additional settings dialog. When transparency is not available, made opacity not changeable.
    • Eterm look-feel: Added the Mixed ThemeFile to Background configuration. Also, added the BGIgnoreThemeFile entry in the teraterm.ini file. The default value is off.
    • When the opacity values of the Additional settings dialog is input over than 255, the value is automatically changed to 255 over the dialog.
    • Added support for REP control sequence.
    • Added support for xterm ED 3 (clear scroll buffer) control sequence.
      • Added the "Accept clearing scroll buffer from remote" setting on the Control Sequence tab of the Additional settings dialog. The default value is off.
    • Added /OSC52= command line option for change the "Clipboard access from remote" setting.
    • Added the [Pause Logging] and the [Stop Logging] menu into the [File] menu.
    • The start of the text selection with the mouse can be delayed by setting.
      • Added the MouseSelectStartDelay entry in the teraterm.ini file. The default value is 0.
    • Serial port connection
      • Added support for hardware flow control DSR/DTR with serial connection.
        • The hardware is renamed to RTS/CTS, and DSR/DTR is newly added on the Flow control of Serial port ([Setup] menu).
        • MACRO: The DSR/DTR can be specified in setflowctrl command.
      • The [Setup]-[Serial port] dialog can be called even while TCP/IP connection.
      • The title of [Setup]-[Serial port] dialog is changed from "Serial port setup" to "Serial port setup and connection".
      • The detail information of COM port is added on the [Setup]-[Serial port] dialog.
      • The tooltip of the speed setting is added on the [Setup]-[Serial port] dialog.
      • The OK button notation in the [Setup]-[Serial port] dialog is changed referring to the connection state.
      • The OK button can not be pressed in the [Setup]-[Serial port] dialog when no COM ports are available.
      • Added /CDATABIT=, /CPARITY=, /CSTOPBIT=, /CFLOWCTRL=, /CDELAYPERCHAR=, /CDELAYPERLINE= command line options.
    • MACRO: When setdlgpos macro command has no argument, the dialog box is located on the default position.
    • MACRO: The dialog position specified by setdlgpos becomes to not be out of range in display.
  • Bug fixes
    • The tooltip during resizing can not be displayed on the left and top edge of the desktop. This bug was introduced in 4.103.
    • Eterm look-feel: When an image file is randomly selected with the wallpaper, invalid file may be selected.
    • The help button of File-Log, File-Transfer, Setup-Font and Printer dialog does not work well. This bug was introduced in 4.104.
    • Fixed a problem that TTIMESV (Save IME status) / TTIMERS (Restore IME status) control sequences do not work.
    • The help button on the printer dialog can not be shown from Windows 2000 to 10. The help button on the printer dialog can be shown on all Windows except Windows95.
    • The macro window tries not to terminate when ESC key is pressed. This bug was introduced in 4.103.
    • Tera Term tries not to terminate when TEK window is closed. This bug was introduced in 4.103.
    • When the DPI is changed while menu bar hidden, the window size is correctly adjusted.
    • When DPI is changed, an application fault occurs on Windows 8.1.
    • The window title is garbled when receiving the window title setting control sequence which contains the kanji characters.
    • MACRO: The button of yesnobox selected with left or right arrow key is reversed.
    • The help button on the Save setup, Restore setup and Load key map dialog can not be shown.
    • Save setup dialog shows incorrectly "Open as read-only" check-box on Windows95/98/NT4.0.
    • MACRO: Error is displayed correctly when string constant is not terminated.
  • Misc
    • Bug fix: A font(TSPECIAL1.TTF) copy may fail when Tera Term installs from the installer.
    • NOTE: CygTerm+ binary included in the installer becomes to be supported on Windows Vista or later. Please build CygTerm+'s source code by using Cygwin for older Windows, if CygTerm+ wants to run on older Windows.
    • upgraded TTSSH to 2.91.
    • upgraded TTProxy to 1.0.0.26.
    • upgraded TTXResizeMenu Plug-in to 1.06.
    • upgraded TTXttyrec Plug-in to 1.04.
    • Changed e-mail address of Contacting the author.

2019.08.31 (Ver 4.104)

  • Changes
    • The Disabling text selection when the window is activated by mouse configuration can be set up on the Additional settings dialog.
    • The environment variable included in directory for file transfers becomes to be expanded.
    • Unspecified string font in IME uses your defined font.
    • Added help button on Additional settings dialog.
    • MACRO: The fileopen command does not cause an error when a file can not be opened. Reverted changes in 4.102.
    • MACRO: When filetruncate command does not cause an error when a file can not be opened, or file size can not be changed.
  • Bug fixes
    • When UTF-8 characters received, 4-byte UTF-8 characters are miss-decoded.
    • When the Active Window Tracking is enabled, mouse cursor won't be active in Tera Term window. This bug was introduced in 4.103.
    • The session number of window title is always 1. This bug was introduced in 4.103.
    • When the font selection dialog is used while undetermined characters of IME are displayed , the font ot IME always is changed.
    • When the locale setting is default(japanese) or invalid on English version of Windows, an application fault immediately occurs after starting Tera Term.
    • A big file can not send by using [File]/[Send file..]. This bug was introduced in 4.103.
    • Cancel printing dialog can not be shown. This bug was introduced in 4.103.
    • The plugin compiled before 4.103 can not called because the DLL's calling convention is changed in Tera Term 4.103.
    • MACRO: listbox command can not adjust the width of list according to the window size. This bug was introduced in 4.103.
    • MACRO: filecopy command may not store the result to result system variable.
    • MACRO: filelock and fileunlock command always fail. This bug was introduced in 4.101.
    • MACRO: When the first byte of the file is matched by using filestrseek2 command, the file pointer is invalid. This bug was introduced in 4.101.
  • Misc
    • upgraded TTSSH to 2.90.
    • upgraded TTProxy to 1.0.0.25.
    • upgraded Oniguruma to 6.9.3.

2019.06.15 (Ver 4.103)

  • Changes
    • added support for High DPI experimentally.
      • The default setting is disabled. When DPIAware=on is set in [Tera Term] of teraterm.ini file, this feature is enabled.
      • However, this is only available for Windows 10 Version 1703 or later.
    • The font submenu is newly added, and added support for configure the dialog font.
      • The default font is same as before.
    • the pop-up menu of TEK Window is not displayed correctly.
    • When the font file(TSPECIAL1.TTF) displaying ruled line is not installed, the file is loaded from same directory as ttermpro.exe.
    • When the file sending by kermit protocol, notifies the file modification time instead of creation time.
    • MACRO: Store exec command result to result variable.
  • Bug fixes
    • Display position of IME's conversion candidate window can not follow cursor position. This bug was introduced in 4.102.
    • Can't display character such as U+2014 EM DASH, U+2212 MINUS SIGN, U+301C WAVE DASH etc. This bug was introduced in 4.102.
    • MACRO: Fix handle leak when exec command is executed.
  • Misc
    • upgraded TTSSH to 2.89.
    • upgraded Oniguruma to 6.9.2.

2019.02.28 (Ver 4.102)

  • Changes
    • The AlphaBlend VT window can be configured as a different value for each active and inactive.
    • The value of transparency can be temporarily changed by moving the mouse wheel on the title bar of the VT window.
    • The internal implementation of the VT window was speeded up.
    • UTF-8: Four bytes character can not be shown yet but can be decoded, the impact range of character corruption was be minimized.
    • The language code(CodePage) of the "Terminal ([Setup] menu)" dialog(Unicode usage).
    • MACRO: The macro file can support UTF-8 and UTF-16(with BOM) encoding.
    • MACRO: The getfileattr command can be based on the current directory same as other command.
    • MACRO: The fileopen command can cause an error when a file is not found with read only mode.
  • Bug fixes
    • When the AlphaBlend window is enabled, an application fault occurs on Windows 10.
  • Misc
    • upgraded TTSSH to 2.88.
    • upgraded Oniguruma to 6.9.1.

2018.11.30 (Ver 4.101)

  • Changes
    • added support for following dtterm window manipulation sequences.
      • 10: Full-screen mode
      • 13;2: Report window position. (text area)
      • 14;2: Report window size. (whole window)
      • 15: Report root window size in pixels.
      • 16: Report character size in pixels.
    • The behavior of following dtterm window manipulation sequence was changed.
      • 14: Report window size sequence: report text area size instead of whole window size.
    • The left and right margin mode does not be reset when window size is changed.
    • The `/' character can be treated as path separator by using the command line option receiving a file name.
  • Bug fixes
    • The plugin compiled before 4.100 can not called because the DLL's calling convention is changed in Tera Term 4.100.
  • Misc
    • upgraded TTSSH to 2.87.
    • upgraded TTXResizeMenu Plug-in to 1.05
    • upgraded Oniguruma to 6.9.0.

2018.08.31 (Ver 4.100)

  • Changes
    • added support for multiple files' drag&drop.
    • Functional enhancement: Confirmation dialog by using drag&drop a file.
    • Window size is maximized when the title bar is double-clicked if "Term size = win size" setting is on.
    • added the Title format configuration on the General tab of the Additional settings dialog.
  • Misc
    • upgraded TTSSH to 2.86.
    • upgraded TTXResizeMenu Plug-in to 1.04

2018.05.31 (Ver 4.99)

  • Changes
    • added support for the DECSACE control sequence.
      • default affected area of DECCARA and DECRARA control sequence is changed to stream.
    • Improved the behavior of window resizing.
    • Accept service name instead of the port number on the command line option.
    • added the /SPEED= command line option which behavior is same as the /BAUD= command line option.
    • added the setspeed command.
  • Bug fixes
    • When the mouse tracking is enabled, the menu can not be selected after clicking the screen.
    • The target area of the DECCARA (Change Attributes in Rectangular Area) and DECRARA (Reverse Attributes in Rectangular Area) control sequence is invalid.
    • The DECCARA control sequence breaks kanji character.
    • The DECCARA control sequence breaks the color of cells.
  • Misc
    • upgraded TTSSH to 2.85.
    • upgraded Oniguruma to 6.8.2.

2018.02.28 (Ver 4.98)

  • Bug fixes
    • The operability at screen edge is improved when mouse tracking is enabled.
  • Misc
    • upgraded TTSSH to 2.84.
    • upgraded Oniguruma to 6.7.1.

2017.11.30 (Ver 4.97)

  • Changes
    • The response of DA2 request is changed.
    • On telnet connection, the terminal speed is notified to the server.
      • added support for the Telnet Terminal Speed Option.
      • added the TerminalSpeed entry in the teraterm.ini file. The default is 38400.
    • added configuration of timestamp type at the start of log file's line.
      • added "Elapsed Time (Logging)" and "Elapsed Time (Connection)" as timestamp type.
      • The timestamp type can be changed on Log dialog and Additional settings dialog.
      • The LogTimestampUTC setting is obsolete, use the timestamp type setting instead.
  • Bug fixes
    • The response of DECRQSS control sequence was invalid.
    • On telnet connection, the terminal size is not notified correctly if terminal width or height is 255.
    • When the [View Log] on the [File] is called, the editor does not invoked.
    • Fix the problem of the log option settings on the Log tab of Additional settings dialog
      • PlainText and Timestamp setting is not applied.
      • Changes to the log option settings are applied when the dialog is cancelled.
  • Misc
    • upgraded TTSSH to 2.83.
    • upgraded TeraTerm Menu to 1.15
    • upgraded Oniguruma to 6.6.1.

2017.08.31 (Ver 4.96)

  • Changes
    • added support for the configuring of the permitted ISO/IEC 2022 shift functions.
      • added the ISO2022ShiftFunction entry in the teraterm.ini file. The default is on.
    • added configuration of timestamp format at the start of log file's line.
      • added the LogTimestampFormat entry in the teraterm.ini file. The default is "%a %b %e %H:%M:%S.%N %Y".
      • The default format is changed to RFC 3339 style. Specify the "%a %b %e %H:%M:%S.%N %Y" at the LogTimestampFormat entry to restore before format.
    • UTC can be used at timestamp format at the start of log file's line.
      • added the LogTimestampUTC entry in the teraterm.ini file. The default is off.
    • Hidden font set by OS can be selected with font setting dialog.
      • The setting can be configured on the General tab of Additional settings dialog.
    • When the serial port and named pipe can not be opened, the error message contains reason or error code.
    • When the sendlnbroadcast macro command is used, the carriage return is sent one more time after last parameter.
    • added the sendlnmulticast command.
  • Bug fixes
    • The response of DECLRMM status query by DECRQM was invalid.
    • PrnConvFF can not be loaded from TERATERM.INI file.
    • sendbroadcast and sendlnbroadcast macro command does not work.
    • sendbroadcast, sendlnbroadcast and sendmulticast macro command can't send the character of 0x00 or 0x01.
  • Misc
    • upgraded TTSSH to 2.82.
    • upgraded Oniguruma to 6.6.0.

2017.05.31 (Ver 4.95)

  • Changes
    • added new feature regarding How to scroll the screen when the window size is maximized.
      • changed default action to the new method. If the action behaves in the same manner as Tera Term 4.94, please set MaximizedBugTweak to 1.
      • changed MaximizedBugTweak value from on/off to 0/1/2 combination. The "off" is treated as 0, and the "on" is treated as 2.
    • added the notification feature regarding clipboard accessing from the remote host. (Windows Me or 2000 or later)
    • changed default directory path for receiving a file (Vista or later:Downloads, XP or earlier:My Documents).
    • renamed command line from /NAMEDPIPE to /PIPE option.
    • When /PIPE option is used as command line, the host name is complemented by these rules:
      • If the host name begins with a '\', the name is not changed.
      • If the host name does not include a '\', the '\\.\pipe\' is added at the beginning.
      • If the host name includes a '\' anywhere but first, before that is treated as server name and after that is treated as pipe name.
  • Bug fixes
    • The port number cannot specify 65535 by the command line option.
    • When the New connection selects Serial menu, a part of TCP/IP menu is not disabled.
  • Misc
    • upgraded TTSSH to 2.81.
    • upgraded Oniguruma to 6.2.0.
    • NOTICE: The installer no longer support Windows 95, 98, Me and NT 4.0. Please use the zip archive version on these Windows.

2017.02.28 (Ver 4.94)

  • Changes
    • added `&u' parameter to log file name that can convert the logon user name.
    • added new line normalization on pasting. The default is off.
      • This feature can be enabled on Copy and Paste tab of Additional settings dialog.
    • added the setflowctrl command.
  • Bug fixes
    • When Restore setup is called, the AlphaBlend can not be restored immediately.
    • When Paste<CR> works, the end of data will be added invalid character.
    • When Kanji(receive) is set to UTF-8, garbled characters will be shown after invalid byte characters are received.
  • Misc
    • upgraded TTSSH to 2.80
    • upgraded TTXttyrec Plug-in to 1.03
    • upgraded Oniguruma to 6.1.3.
    • upgraded SFMT to 1.5.
    • changed starting method of LogMeTT and TTLEditor installer.

2016.11.30 (Ver 4.93)

  • Changes
    • added 48dot icon in the keycode.exe.
  • Bug fixes
    • After Kanji(receive) is set to EUC and UTF-8 string is shown, new Kanji(Chinese character) may be properly shown when Kanji(receive) is set to UTF-8.
    • When Kanji(receive) is set to UTF-8, ISO-2022-JP Kanji can not be properly shown with Japanese language setting.
    • When DeferredLogWriteMode=on is enabled and a log file is closed soon after opening the file, Tera Term rarely halts by dead-lock.
    • When Log dialog is closed, the memory leak of Tera Term core(ttermpro.exe) is happened.
    • Windows 7 and Vista: When special operation is done on General setup dialog, an application fault occurs.
    • When the real time mode is off by using broadcast command, invalid character will be added at the end of string.
    • MACRO: When closesbox command is executed, the memory leak of Macro core(ttpmacro.exe) is happened.
    • MACRO: The gethostname, gettitle, getmodemstatus, loginfo and logopen command will rarely be wrong.
  • Misc
    • upgraded TTSSH to 2.79
    • upgraded CygTerm+ to 1.07_29
    • upgraded TTProxy to 1.0.0.24
    • upgraded TeraTerm Menu to 1.14
    • upgraded TTX KanjiMenu Plug-in to 0.1.7
    • upgraded TTXRecurringCommand Plug-in to 1.05
    • upgraded Oniguruma to 6.1.2.

2016.08.31 (Ver 4.92)

  • Changes
    • added new feature which removes carriage return from end of line with pasting. The default value is off.
      • The function can be enabled at Copy and Paste tab of Additional settings dialog.
    • When scroll back is used, scroll state is always reset with user input.
    • ZMODEM: The default escaped character are added LF and GS by sending.
    • The default value of MaxComPort setting is increased from 4 to 256.
    • changed macro command line behavior.
      • Strictly checked the syntax of command line option. When an unnecessary option is added at option back like as /Vxx, the option is not recognized.
      • The option placement can be only specified before a filename. When the option is specified after the filename, the option is recognized as macro parameter.
    • MACRO: The `params' string-typed array that is stored command line parameter(s).
  • Bug fixes
    • When the clipboard is read from remote host, unnecessary NUL character is added at the end of the string.
    • When the clipboard is written from remote host, empty string can not be set.
    • When the clipboard is empty string and Bracketed Paste Mode is enabled, final Bracket is only sent by pasting.
    • ZMODEM: The escaped 0x7f and 0xff that is included in ZMODEM header packet can not be restored.
    • Tera Term(ttermpro.exe) can not run on Windows 95/98/Me/NT4.0.
    • MACRO: When invalid regular expression is specified at the strreplace command, source string is corrupted.
      • The result variable returns -1 when invalid regular expression is specified.
  • Misc
    • upgraded TTSSH to 2.78
    • upgraded TTProxy to 1.0.0.23

2016.05.31 (Ver 4.91)

  • Changes
    • Tera Term waits for port connection when the serial port does not exist.
      • added the /WAITCOM command line option.
      • added the WaitCom entry in the teraterm.ini file. The default value is off.
    • added the LF entry in the New-line(transmit).
    • When ZmodemAuto=on is enabled and ZRINIT packet is received, the file selection dialog of ZMODEM sending is opened.
    • updated to new Tera Term icon file(teraterm.ico, vt.ico) and macro icon file(ttmacro.ico). Special thanks to Tatsu Sakamoto.
  • Bug fixes
    • The background color erase(BCE) does not work with DECFI, DECBI control sequence.
    • When AutoComPortReconnect=on is enabled, Tera Term can not recognize a part of device regarding USB serial port connection and disconnection.
    • When Log Rotate is enabled and an existing file is logged, first file can not be rotated by specified size.
    • MACRO: When if has macro command without parameter, syntax error occurs.
  • Misc
    • upgraded TTSSH to 2.77

2016.03.05 (Ver 4.90)

  • Changes
    • Changed XMODEM options
      • Error detection type(Checksum/CRC) can be specified at sending receiving.
      • Packet size(1K) can be specified at receiving sending.
      • The xmodemrecv and xmodemsend macro argument is the same.
    • Cancel from remote host at XMODEM transmitter becomes as transfer failure.
    • When remote host sends 1K packet against Checksum at XMODEM receiving, Tera Term receives data as Checksum/1K.
    • When remote host sends NAK at XMODEM CRC sending, Tera Term sends data as Checksum.
    • added configuration for XMODEM, YMODEM and ZMODEM timeout value.
      • added the XmodemTimeouts entry in the teraterm.ini file.
      • added the YmodemTimeouts entry in the teraterm.ini file.
      • added the ZmodemTimeouts entry in the teraterm.ini file.
    • XMODEM: Send and Receive dialog's option can not be affected each other.
    • MACRO: When if does not have statement, macro error always occurs.
  • Bug fixes
    • BCE information does not be updated at OSC 4/11/104/111 control string.
    • XMODEM: When CRC sends, Checksum may send half way incorrectly.
    • Eterm look-feel: When invalid image file is specified as background, an application fault occurs.
    • The return value of random macro command is the deviation of the pseudo random number.
      • The specified maximum value will be a very low probability.
      • When the maximum value is specified as over 32768 number, any value can not be generated.
      • Random generation is used for SFMT.
    • When invalid folder type is specified on the getspecialfolder macro command, the desktop folder is returned by mistake.
    • MACRO: When getipv6addr command is called on Windows 2000, an application _ttpmacro.exe_ fault occurs.
  • Misc
    • upgraded TTSSH to 2.76
    • upgraded CygTerm+ to 1.07_28

2015.12.01 (Ver 4.89)

  • Changes
    • The parameter check of the control sequence can be reinforced.
    • added support for querying the status of DECSLRM and DECSCUSR by using the DECRQSS control sequence.
    • When the baud rate is high speed on the serial connection, the file transfer can be accelerated.
      • added the FileSendHighSpeedMode entry in the teraterm.ini file. The default value is on.
    • Eterm look-feel: added the Image Brightness configuration.
    • added the Virtual Store path to Setup directory.
    • The cygterm.cfg is not saved on dialog closing but is saved on the Save setup when the CygTerm configuration of the Additional settings is used.
    • The command line option can be quoted from an offset when the '"' is used.
    • When the click-able URL is not double-clicked but single-clicked on the version dialog, the browser can be launched.
    • MACRO: added new parameter which can specify an index of selected item at the listbox macro command.
  • Bug fixes
    • When the host name includes a comment on new connection dialog, it will not connect to the remote host.
    • When the USB serial cable is inserted and extracted while the serial connection is doing, new serial connection will be failed. However, this fix is supported on the Windows XP or later.
      • added the AutoComPortReconnect entry in the teraterm.ini file. The default value is on.
    • The cygterm.cfg file can not be saved in the Virtual Store environment.
    • The status line can not work well.
  • Misc
    • upgraded TTSSH to 2.75
    • upgraded TTProxy to 1.0.0.22
    • upgraded TTXRecurringCommand Plug-in to 1.04
    • upgraded LogMeTT to 2.12

2015.09.01 (Ver 4.88)

  • Changes
    • When the color palette is changed and inquired with the OSC 4, the palette number(256, 258, 259) is treated as the highlight, blinking and reverse attribute color.
    • When the color is inquired with the OSC 4, OSC 10 and so on, the terminal character is matched to the requested character.
    • The all attribute color is reset to the initial status with the OSC 105 ST.
    • added the button to open a configuration file to Setup directory.
    • MACRO: A dialog of the filenamebox and dirnamebox is on top of all the other windows.
  • Bug fixes
    • When the port number is not 23 on local connection, the Cygwin connection starts by Alt+D(Duplicate session) key.
    • When the Meta key is set to left or right, the combination key with the Alt and the cursor/Insert/etc edit keypad can not work well in the KEYBOARD.CNF.
  • Misc
    • upgraded TTSSH to 2.74
    • added support for Microsoft Windows 10.

2015.05.31 (Ver 4.87)

  • Changes
    • added the [Setup directory] under the [Setup] menu.
    • MACRO: A macro file described in UTF-8 BOM can not report a syntax error.
    • MACRO: A numerical value can be specified at the filewrite, filewriteln macro command.
  • Bug fixes
    • The keyboard(CNF) configuration will be reset when a new connection is created.
  • Misc
    • upgraded TTSSH to 2.73
    • upgraded TTProxy to 1.0.0.21
    • upgraded TeraTerm Menu to 1.13
    • upgraded LogMeTT to 2.10.3
    • changed the domain name from SourceForge.jp to OSDN.

2015.02.28 (Ver 4.86)

  • Changes
    • When the [Reset Terminal] on the [Control] is called, the color setup with OSC 10/11 will be reset.
    • YMODEM: The block0 packet size meaning end of transfer is 128 byte at all time. Special thanks to mlukoshkov.
    • YMODEM: The packet of file information is not fixed size but variable size(128 or 1024byte).
    • added the dirnamebox command.
    • added the getmodemstatus command.
  • Bug fixes
    • When the DECBI control sequence is used on the left of the screen, the wide character of the left screen will be incorrectly removed.
    • The KEYBOARD.CNF file can not be loaded when the Tera Term is performed with the macro script.
    • YMODEM: When the data is sent, the CANCEL command from the remote host does not work well.
    • YMODEM: When the received file information contains only a file name, an end of the file name is broken.
    • YMODEM: When the received file information does not include the file size, the file data can not be recorded well.
    • The setting value of the Log Rotate will not display well.
    • When the x=0,y=0 is specified by the setdlgpos macro command, the statusbox will be newly opened and however the statusbox can not be properly shown.
    • When the macro filename is so longer, the currently executing line number can not be shown. And also, the macro window can be re-sizable.
  • Misc
    • upgraded TTSSH to 2.72
    • upgraded CygTerm+ to 1.07_25
    • upgraded Oniguruma to 5.9.6.

2014.11.30 (Ver 4.85)

  • Changes
    • added support for the pause time while the break signal is sending to the serial port.
      • added the SendBreakTime entry in the teraterm.ini file.
    • The Alt+D and Alt+I accelerator key can only be worked on the VT window.
    • added new optional setting that can disable accelerator key of New Connection.
      • added AcceleratorNewConnection entry to teraterm.ini.
    • added new optional setting that can disable accelerator key of Cygwin connection.
      • added AcceleratorCygwinConnection entry to teraterm.ini.
    • added the 3rd argument to specify the initial directory at the filenamebox macro command.
    • added the 4th argument to open a text file for reading at the fileopen macro command.
  • Bug fixes
    • The language file will not be shown in the General setup.
    • When the connect macro command is failed, the command will be failed again.
    • The floating point number can not be specified in the sprintf, sprintf2 macro command.
    • The character width and precision specifying of the format style can not use the * character in the sprintf, sprintf2 macro command.
  • Misc
    • upgraded TTSSH to 2.71
    • added the Traditional Chinese.lng language file. Special thanks to Wei Yan.
    • added support for 64bit Cygwin connection automatically.
    • removed the 64bit cyglaunch.exe program.

2014.08.31 (Ver 4.84)

  • Changes
    • When a file is received by using YMODEM or ZMODEM protocol, the file time-stamp is updated.
    • added the log type configuration on the Log tab of the Additional settings dialog.
  • Bug fixes
    • When the LanguageUI is changed on the General setup dialog, the help file can not be switched.
    • MACRO: The last line number can not display on the macro execution dialog.
  • Misc
    • added support for Microsoft Windows Server 2012 R2.
    • upgraded TTSSH to 2.70
    • upgraded TeraTerm Menu to 1.12
    • upgraded TTXResizeMenu Plug-in to 1.03
    • upgraded LogMeTT to 2.10.2
    • added the 64bit cygterm.exe and cyglaunch.exe into the installation directory.

2014.06.01 (Ver 4.83)

  • Changes
    • The cursor position can be moved to the top-left of the screen when the screen is clear.
      • added support for the TTCTH control sequence.
    • added support for Termcap/Terminfo string query.
      • Refer to the Background color for the vim user.
    • Eterm look-feel: Changed the background image from label to check-box style on the Visual tab of the Additional settings dialog.
    • added support for selecting any type of the Debug mode.
      • added the DebugModes entry in the teraterm.ini file.
  • Bug fixes
    • The background color will not be painted well after the cursor position is restored.
    • Eterm look-feel: The background image file will not be drawn by using any JPEG file.
    • Fixed some bugs regarding Debug mode
      • When the debug mode is entered, the insertion mode and the auto-wrap mode may be changed.
      • When the debug mode is entered, the character attribute can not be reset.
      • When the debug mode is leaved, the character attribute may be reset.
  • Misc
    • upgraded TTSSH to 2.69
    • upgraded TTProxy to 1.0.0.20
    • upgraded LogMeTT to 2.10.1.7

2014.03.08 (Ver 4.82)

  • Changes
    • A multicast name by using the sendmulticast macro command can be specified with the /MN command line option.
  • Bug fixes
    • A cursor can not be moved to right edge by using the CHA, HPA control sequence.
    • MACRO: By using the `include' macro command, an application fault occurs while running ttpmacro.exe.

2014.02.28 (Ver 4.81) Celebrating 20 years

  • Changes
    • Macro
      • added the uptime command.
      • The value by using logautoclosemode is set to default when the macro script is terminated.
  • Bug fixes
    • When the window size is changed, the cursor moves to the left margin.
    • The "Include screen buffer" option appears in the "Send file" and "ZMODEM Send" dialog.
    • When the LanguageUI is changed on the General setup dialog, the window title can not be updated.
    • MACRO: A macro file larger than 1MB slows down the performance.
  • Misc
    • upgraded TTSSH to 2.68
    • upgraded TTProxy to 1.0.0.19
    • upgraded LogMeTT to 2.10.1
    • upgraded TTLEditor to 1.5

2013.11.30 (Ver 4.80)

  • Changes
    • can be changed the maximum size of the OSC string
      • added the MaxOSCBufferSize entry in the teraterm.ini file. The default value is 4096.
    • added the "Include screen buffer" option in the Log dialog box.
      • added the LogIncludeScreenBuffer entry in the teraterm.ini file.
      • added the "Include screen buffer" option at the "logopen" macro command.
    • added the /ES command line option. It enables the "New connection" dialog.
    • When the URL string is divided at the end of the line, new setting can enable to concatenate the whole string.
      • added the JoinSplitURL and JoinSplitURLIgnoreEOLChar entries in the teraterm.ini file.
    • Macro
      • added the TTL filename on the error and execution dialog.
      • Saves and restores the timezone when the gettime and getdate command executes.
  • Bug fixes
    • When the terminal size is changed, the left and right margin mode (DECLRMM) does not cleared.
    • The VPR/VPB/HPR/HPB control sequences are affected by the scroll margin.
    • A cursor will be moved to upper screen over by using the CUU/VPB control sequences.
    • The VPB control sequence will be released with a part of mode.
    • The DECFI/DECBI control sequence ignores the scroll margin.
    • The DECBI control sequence mistakes for saving the cursor position.
    • The DECFI control sequence mistakes for changing the application keypad mode.
    • When the log file is opened, the "Hide dialog" function does not work well.
    • When the tool chip is minus position on resizing, the tool chip is shown on the primary monitor with the multi monitor environment.
    • Tera Term(ttermpro.exe) can not run on Windows 95/NT4.0.
  • Misc
    • upgraded TTSSH to 2.67
    • upgraded TTXRecurringCommand Plug-in to 1.03
    • added support for Microsoft Windows 8.1.
    • upgraded Oniguruma to 5.9.5.
    • added the Simplified Chinese.lng language file. Special thanks to LiShaohui.

2013.09.01 (Ver 4.79)

  • Changes
    • added support for the DECRQM(Request Mode) control sequence.
    • added support for left and right margin.
      • added support for DECLRMM(Left Right Margin Mode), DECSLRM(Set Left and Right Margins) control sequences.
    • When the Exit All is called, the user is always confirmed.
    • added the Undo menu under the Window menu when Tera Term's windows are arranged.
    • The file transferring dialog can not be shown.
      • added the FTHideDialog entry in the teraterm.ini file. The default value is off. Special thanks to Teodor Robas.
    • The beep sound can be suppressed when the bell ringing is rushed.
      • added the BellOverUsedTime, BellOverUsedCount and BellSuppressTime entries in the teraterm.ini file. The default value are 2 , 5 and 5.
    • added the /AUTOWINCLOSE command line option to control the Auto window close.
    • Macro
      • added the "Unknown command." new message in the Error messages.
      • added the logautoclosemode command.
      • added the detail information(line number and error token) on the error dialog.
  • Bug fixes
    • When the UseNomalBGColor is on, the OSC 111(Resetting standard background color) control string after the OSC 11(Setting standard background color) can not reset the background color of characters including bold attribute and so on.
    • The sequence reporting the cursor change can not recognize the upper margin when the origin mode is enabled.
    • Both the Intermediate Byte and Private Parameter control sequence can not be ignored.
    • When the SelectOnActivate is off, the button released event is incorrectly sent by clicking the in-active window.
    • When second Tera Term is launched, the keyboard configuration file can not be read.
    • When the file is sent by D&D, the help button of the dialog can not be worked well.
    • MACRO exec: The show parameter will be ignored when the wait parameter is 1(4.63 later) or the parameter is not 1(4.78 later).
  • Misc
    • upgraded TTSSH to 2.66
    • upgraded CygTerm+ to 1.07_24

2013.05.31 (Ver 4.78)

  • Changes
    • Select "Selection" by default in the printer dialog when there is a selection. Special thanks to tentner.
    • added the Log Rotate configuration on the Additional settings dialog.
      • added the LogRotate, LogRotateSize, LogRotateSizeType and LogRotateStep entries in the teraterm.ini file.
    • added the Exit All under the File menu.
    • added the Cascade, Stacked and Side By Side under the Window menu.
    • added the /nolog command line option to disable the Auto start logging.
    • Macro
      • added the listbox command.
      • added the getipv4addr command.
      • added the getipv6addr command.
      • added the logrotate command.
      • added the crc16, crc16file command.
      • added the checksum8, checksum8file command.
      • added the checksum16, checksum16file command.
      • added the checksum32, checksum32file command.
      • added the bringupbox command.
      • added the regexoption command.
      • added the 4th argument(current directory) at the exec command.
      • The 'show 1' command brings the macro window to the top.
      • The messagebox, inputbox and listbox commands bring the macro dialog to the top.
      • The wait, waitln and waitregex commands can wait an empty strings.
      • When the waitregex command matches some parameters at the same time, the first matched parameter is selected.
  • Bug fixes
    • Can not create a file including the IPv6 address in the &h of the log file.
    • When the LogLockExclusive is off, the exclusive lock remains in the log file..
    • When a log file is retrieving on the network path, Tera Term does not go slow.
      • added the DeferredLogWriteMode entry in the teraterm.ini file. The default value is ON.
    • When the URL string ends at the right row and return code, the URL string continues to next line by mistake.
    • The URL string on the mouse hand cursor shifts to the left with half character by mistake.
    • MACRO: The send/sendln command can be affected by the Paste delay per line configuration.
    • MACRO: When the timeout is 0, the waitn command can not wait any character.
    • MACRO: When the break command is executed after the continue command, the Invalid Control error will be occurred.
    • MACRO: The box-style macro command can not show the dialog position well on the multi display.
    • MACRO: The wait and waitln command can not detect the right string.(ex. wait "aab" does not work against "aaab")
  • Misc
    • added the Russian.lng language file. Special thanks to Sergey Ryumik.
    • added the Korean.lng language file. Special thanks to Daehong Kim.
    • upgraded TTSSH to 2.65
    • upgraded Oniguruma to 5.9.4
    • added support for Microsoft Windows Server 2012.

2013.02.28 (Ver 4.77)

  • Changes
    • added support for the DECFRA (Fill Rectangular Area) control sequence.
    • added support for the window-ops control sequence to push/pop window title on stack.
    • Macro
      • added the continue command.
      • Changed the maximum length of the string variable to 511 bytes.
  • Misc
    • upgraded TTSSH to 2.64
    • upgraded TTXResizeMenu Plug-in to 1.02
    • upgraded TTXKCodeChange Plug-in to 1.01

2012.12.02 (Ver 4.76)

  • Changes
    • added support for the SGR 38:2, 48:2(the character and background color changing specified by RGB value). The nearest color with 256 color palette is used.
    • added support the colon(:) separator with the SGR 38:5, 48:5(the character and background color changing specified by RGB value). Refer to the ISO/IEC 8613-6 (ITU-T Rec. T.416).
    • The method of the special folder is changed from reading the registry to SH API.
    • Do not save the VTIcon and TEKIcon entries into the teraterm.ini file.
    • When a ini file can not be written at the Save setup, the error message will be shown.
  • Bug fixes
    • The palette out of range number can not be ignored with the SGR 38:5, 48:5(the character and background color changing specified by RGB value).
    • A string pasted by clipboard will be corrupted with any keyboard layout.
    • The strreplace macro command will be crashed when the 'matchstr', 'groupmatchstr1' - 'groupmatchstr9' system variables are specified as the argument.
  • Misc
    • upgraded TTSSH to 2.63
    • added support for Microsoft Windows 8.
    • upgraded Oniguruma to 5.9.3

2012.08.31 (Ver 4.75)

  • Changes
    • A button value is changed from 3 to 35 while the button is not pressed at the Any Event Tracking mode.
    • added the 0; character at the reply head by requesting the character attribute of the DECRQSS.
    • At requesting the character attribute of the DECRQSS, the color attribute is not included in reply when the Enable ANSI Color is off.
    • When the host number is discontinuous value, Tera Term can read the [Hosts] section in the teraterm.ini file.
    • Macro
      • added the setpassword command.
      • added the ispassword command.
  • Bug fixes
    • Named pipe: The pipe can not be disconnected when the Oracle Virtual Box is terminated.
    • COM port: The default setting can not be saved in the teraterm.ini file.
    • YMODEM: When the receiving a file is temporarily stopped, Tera Term can not send a NAK after timeout. So, the transferring can not be continued.
    • Macro command: The send and sendln can not transmit a character #01.
    • Macro command regarding file using: A relative path will not be recognized.
      • The base of a relative path will be a path existing a macro file or Tera Term installation directory. By using this bug fix, the relative path can be a path existing a macro file.
  • Misc
    • upgraded TTSSH to 2.62

2012.05.31 (Ver 4.74)

  • Changes
    • Serial port connection
      • added the mark parity, space parity and 1.5 stop bit on the serial port setup.
      • added the "mark" and "space" name of the Parity entry. The default is "none".
      • added the "1.5" name of the StopBit entry. The default is "1".
    • Named pipe
      • added support for the named pipe. Tera Term can connect the serial port of the VMware and Hyper-V.
      • A named pipe can be specified into the TCP/IP:Host entry of New connection dialog.
      • added the /NAMEDPIPE option by specifying the named pipe.
    • added the AUTO entry in the New-line(receive). Special thanks to tentner.
    • added the selection of the font quality.
      • added the Font quality configuration on the Additional settings dialog.
    • added the SCP destination path on the confirmation dialog when a user drags a file to TeraTerm window.
      • added the ScpSendDir entry in the teraterm.ini file.
    • Eterm look-feel
      • Environment variable strings(%variableName%) can be included in the ini file path.
      • added an image file specified configuration(theme\ImageFile.INI). Also, a background image file can be specified on the Additional settings dialog.
      • Enabled the "Eterm lookfeel" check-box on the Additional settings dialog.
    • added the LanguageUI entry on the General setup dialog.
    • A message dialog is shown when the cygterm.cfg has been saved on the Cygwin tab of the Additional settings dialog.
    • added support for IME feedback back and forth function. The ATOK2012, MS-IME2002 and MS-IME2003 work well. Also, this feature is disabled with "IME=off"(teraterm.ini).
    • Removed an extra semicolon(;) included in the window size requesting.
    • Macro
      • added the "paramcnt"(argument count) and "param1"(macro filename) in the Variables.
      • added a sample code in the connect command.
      • added the filelock command.
      • added the fileunlock command.
      • added the third argument _timezone_ at the gettime and getdate command.
  • Bug fixes
    • KERMIT protocol
      • The initial parameters of the KERMIT server do not be checked well.
    • The drop down list's items are not shown on Windows 2000 or earlier.
    • Fixed a typo of the Cyrillic letter translation table(range of CP866 and ISO8859-5).
    • A string array can not be recognized as the argument of the macro command.
  • Misc
    • upgraded TTSSH to 2.61

2012.02.29 (Ver 4.73)

  • Changes
    • added support for following control strings.
      • OSC 5 (Change bold/blink/reverse attribute color)
      • OSC 104 (Reset color palette)
      • OSC 105 (Reset bold/blink/reverse attribute color)
      • OSC 110 (Reset VT window text foreground color)
      • OSC 111 (Reset VT window text foreground color)
      • OSC 115 (Reset TEK window text foreground color)
      • OSC 116 (Reset TEK window text foreground color)
    • added support for reading the Clipboard by using the OSC 52(clipboard accessing) control sequence.
    • added support for xterm(UTF-8), xterm(SGR) and rxvt-unicode style extended mouse tracking mode.
    • When the receiving file is empty, the file name is assigned to no-name.
    • When the receiving file name contains banned characters, these characters are replaced to _.
    • KERMIT protocol
      • Changed the MAXL from 90 to 94. Workaround for failing to communicate against NT-4S(Hitachi VoIP gateway).
      • Improved the KERMIT.LOG more easily.
      • added the KmtLongPacket entry in the teraterm.ini file. The default value is off.
      • added the KmtFileAttr entry in the teraterm.ini file. The default value is off.
    • added support for exclusive-locking the log file in written mode.
      • added the LogLockExclusive entry in the teraterm.ini file. The default value is on.
    • added the "loginfo" macro command.
  • Bug fixes
    • Updated the Cyrillic letter translation table(range of KOI8-R, CP866, Windows-1251 and ISO8859-5).
    • The packet number will not be correct while sending a file by using the XMODEM and YMODEM protocol.
    • When a log is started, the log window is temporarily activated. However, this is enabled for Windows 2000 later.
    • "filerename" macro command: When a file can not be renamed, the error code stores to the result variable.
    • "filedelete" macro command: When a file can not be removed, the error code stores to the result variable.
  • Misc
    • upgraded TTSSH to 2.60

2011.12.04 (Ver 4.72)

  • Changes
    • added support for OSC 10 (Change VT window text foreground color), 11 (Change VT window text background color), 15 (Change TEK window text foreground color) and 16 (Change TEK window text background color) control string.
    • added support for OSC 52 (Clipboard access) control string.
      • added the Clipboard access from remote entry on the Additional settings dialog.
    • added support for configuring the control sequence to change permitted tab-stops.
      • added the TabStopModifySequence entry in the teraterm.ini file. The default is on.
    • Broadcast Command: When a user uses the real time mode, the input characters does not show on the edit control.
    • added support for specifying an any browser as the click-able URL.
      • added the ClickableUrlBrowser and ClickableUrlBrowserArg entries in the teraterm.ini file. The default value is empty.
    • added the [Minimize All] and the [Restore All] menu into the [Window] menu.
    • added support for the xterm back tab key.
      • added the XBackTab entry in the [X function keys] section of the keyboard configuration file.
    • added support for the Integer Array, String Array.
    • added the "getspecialfolder" macro command.
    • adjusted the up and down space size of the shown message at the "messagebox", "inputbox" and "statusbox" macro commands.
  • Bug fixes
    • The string following after OSC string will not display well.
    • When the cursor is hid, the vertical bar shape can not be shown.
    • When the keyboard has the AltGr key and the MetaKey=on is configured, the invalid character will be input.
    • The zero index of the ANSI color settings can not be loaded.
    • XMODEM: The first packet is sent out twice by using the xmodem sending function.
    • YMODEM: The received file can not be saved.
    • "ifdefined" macro command: When the integer literal is specified, the command mistakenly returns the integer type.
  • Misc
    • Modified Tera Term installer script
      • Cygterm Here can be launched by the right-click to a opened folder on Windows Vista and 7 later.
    • upgraded TTSSH to 2.59
    • upgraded TeraTerm Menu to 1.11
    • upgraded TTXRecurringCommand Plug-in to 1.02
    • upgraded TTLEditor to 1.4

2011.8.31 (Ver 4.71)

  • Changes
    • When the OSC string includes a control sequence, the control sequence can be proceeded.
    • Eterm look-feel: The wallpaper file format can support any format other than BMP on Windows Vista or later.
    • "getpassword" macro command is updated.
      • The result of the command execution is stored in the system variable "result".
    • "strspecial" macro command is updated.
      • added the second argument as the converted string on the strspecial command.
    • added the "expandenv" macro command.
  • Bug fixes
    • The log file which name length is 80 bytes over can not be opened.
    • When the meta key is enabled, the Control and Meta key is redundantly input.
  • Misc
    • upgraded TTSSH version supporting SSH2 to 2.58

2011.6.26 (Ver 4.70)

  • Changes
    • DEC special character font can support the bold and the under line attribute.
    • added support for the NetTerm style mouse event tracking.
    • added support for ignore the printing control sequence.
      • added the PrinterCtrlSequence entry in the teraterm.ini file. The default value is off on.
    • The Meta Key can be only assigned to the left ALT or the right ALT key.
    • By using the broadcast command in the real time mode, the Submit button has the only function of acting as <Enter> key.
    • The /k option is inherited by using the Duplicate Session.
    • added the elapsed time and the transfer speed on the file sending dialog.
    • added support for Windows7 jump list.
    • Resurrected the special argument of the box-style macro command. However, this option is obsolete. The default is 0 because of backward compatibility.
  • Bug fixes
    • When the mouse cursor position is later 224 line on xterm-style mouse event notification, Tera Term would report the invalid reporting.
    • When the 10000 over mode is specified on the DECSET/DECRST control sequence, Tera Term would not be able to ignore.
    • The invalid result may be responded for the window position reporting.
    • YMODEM: When a file is sent, the block1 can be sent not waiting the ACK from the YMODEM server.
    • When a last one byte of a string is removed by using the strremove macro command, the BOF will be occurred.
  • Misc
    • Modified Tera Term installer script
      • Bug fix: When the CygTerm Here is added in the context menu, the CygTerm Here does not work well with the folder name containing continuing spaces.
    • upgraded TTSSH version supporting SSH2 to 2.57
    • upgraded TeraTerm Menu to 1.10
    • upgraded CygTerm+ to 1.07_23
    • upgraded cyglaunch to 1.03
    • upgraded LogMeTT to 2.9.9

2011.3.5 (Ver 4.69)

  • Changes
    • added support for configuring the Terminal ID included in the DA3 control sequence reply.
      • added the TerminalUID entry in the teraterm.ini file. The default value is FFFFFFFF.
    • added support for the DECSTUI (Change Terminal Unique ID) control sequence.
      • added the LockTUID entry in the teraterm.ini file. The default value is on.
    • added support for the DECRQSS (Request terminal setting) control sequence. Supported control sequences are DECSCA, DECSCL, DECSTBM and SGR.
    • added support for the DECFI, DECBI control sequences.
    • The control sequence requesting window size can reply the actual window size instead of the fixed 480x640 value.
    • When the ConfirmChangePaste is enabled, a user is confirmed with pasting the text by using Alt+R accelerator key. The ConfirmChangePaste can confirm when only one line is pasted.
    • added support for mintty's application escape mode.
    • added support for mintty's mouse wheel reporting control control sequence.
    • added support for the IME operation control sequence.
    • added the "basename" and "dirname" macro command.
    • added the "getfileattr" and "setfileattr" macro command.
    • added the "foldercreate", "folderdelete" and "foldersearch" macro command.
  • Bug fixes
    • When the terminal width is 257 columns over, Tera Term does not display well.
    • When the terminal ID is VT520 and VT525, the Primary DA (DA1) reply is incorrect.
    • When the language is other than Japanese, the VT420, VT520 and VT525 on the Terminal Setup dialog do not work well.
    • When PassThruPort is specified as a local device mapping the network share, Tera Term printing does not work. cf.print with WINDOWS 7 net use LPT PERSISTENT:Yes
    • Tera Term can not ignore the unsupported OSC control string.
    • Tera Term can not understand a character after the DCS, SOS, APC and PM Control string.
    • When a log file is opened by writable mode, the file is existing and writing by another process can be opened.
    • When 8-bit string is received, the string is recognized as the control sequence by mistake.
    • Tera Term can not properly send a broadcast message to selected windows by using the broadcast command. cf.Broadcast command issue in 4.68
  • Misc
    • upgraded TTSSH version supporting SSH2 to 2.56
    • upgraded TTProxy to 1.0.0.18
    • upgraded CygTerm+ to 1.07_22
    • upgraded LogMeTT to 2.9.8
    • Add Delete mutex object for running check by installer.

2010.12.7 (Ver 4.68)

  • Changes
    • added support for the selective erase.
      • added support for the DECSCA (Select character protection attribute), DECSED (Selective Erase in Display), DECSEL (Selective Erase in Line) and DECSERA (Selective Erase Rectangular Area) control sequence.
    • added support for the DECERA (Erase Rectangular Area) control sequence.
    • added support for the DA3 (Tertiary Device Attribute) control sequence.
    • added support for the VT420, VT520 and VT525 on the terminal ID settings.
      • The DECSCL(terminal mode setting) control sequence can support the VT level 5(vt500 series).
    • A single character to indicate the window status can be shown on the "Window" menu and "Windows list" dialog. See below.
      • + Normal window
      • - Minimized window
      • @ Maximized window
      • # Hidden window
    • Extended the maximum number of Tera Term window from 50 to 256.
    • Extended the maximum number of Tera Term plug-ins from 16 to 32.
    • added an argument of the "beep" macro command.
    • Deleted the special argument of the box-style macro command.
    • The WSAAsyncGetAddrInfo function can be hooked by using plug-in.
    • The freeaddrinfo function can be hooked by using plug-in.
  • Bug fixes
    • Security fix: A class of vulnerabilities affecting applications that load DLL's in an insecure manner.
    • The baud rate can not be properly selected on the [Setup]-[Serial port] dialog.
    • Beep setting does not work.
    • The scroll region can not be cleared by using the DECALN (DEC Screen Alignment Test) control sequence.
    • An empty string can not reply by using the window title and icon label reporting request.
    • The rectangle erasing, color changing and line drawing can not work well in the IO-8256 terminal.
  • Misc
    • upgraded TTSSH version supporting SSH2 to 2.55
    • upgraded TTProxy to 1.0.0.17
    • upgraded CygTerm+ to 1.07_19
    • upgraded cyglaunch to 1.02

2010.8.31 (Ver 4.67)

  • Changes
    • added the NextShownWin and PrevShownWin of new shortcut keys in the KEYBOARD.CNF file that display a next or previous window not minimized.
    • removed the hidden window from the target windows which switches by the shortcut key NextWin/PrevWin.
    • added a new optional setting that can disable the menu for "New connection" and "Duplicate session".
      • added the DisableMenuNewConnection and DisableMenuDuplicateSession in the teraterm.ini file. The default is off.
    • added a user configuration for changing the cursor color depending on the IME open status.
      • A user can change the setup value on the Additional settings dialog.
      • added the IMERelatedCursor in the teraterm.ini file. The default is off.
    • added support for the motion event of xterm style mouse event tracking.
    • added support for the DEC Locator Mode style mouse event tracking.
    • The ttymouse can automatically setup the xterm2 to modify the response of the Secondary DA.
    • added the "filetruncate" macro command.
    • added the "dispstr" macro command.
    • added the "strinsert" macro command.
    • added the "strremove" macro command.
    • added the "strreplace" macro command.
    • added the "strtrim" macro command.
    • added the "strsplit" macro command.
    • added the "strjoin" macro command.
    • added the "strspecial" macro command.
  • Bug fixes
    • The YMODEM sending and receiving procedure does not work for the HyperTerminal.
    • The file sending is slowing.
    • The retransmission EOT does not work well by using the XMODEM protocol.
    • In xterm style mouse event tracking mode, the Control and Alt(Meta) keys are reported been swapped.
    • The color setup and request control sequence does not work well.
    • A statusbox is closed by performing the OK button action.
  • Misc
    • upgraded TTSSH version supporting SSH2 to 2.54
    • upgraded TTLEditor to 1.2.1
    • added the French.lng language file. Special thanks to Francois MOCQ.

2010.5.31 (Ver 4.66)

  • Changes
    • YMODEM support
      • added the "YMODEM" under the Transfer of File menu.
      • added the YmodemRcvCommand entry in the teraterm.ini file. The default is empty.
      • added the "ymodemrecv" and "ymodemsend" macro command.
    • added support for specifying any baud rate of the serial port connection.
      • A user can specify any baud rate at the [Setup]-[Serial port] menu.
      • A user can specify any baud rate at the /BAUD option.
      • A user can specify any baud rate at the "setbaud" macro command.
    • added support for the VPB and HPB control sequence.
    • added support for bracketed paste mode.
    • Split the TransBin flag into the Send File and the Log flags.
      • added the LogBinary entry in the teraterm.ini file. The default value is off.
    • Change the cursor color depending on the IME open status.
    • Unlock the clipboard while the ConfirmChangePaste dialog is opened.
    • added the [Control]-[Show Macro Window] menu to flash the running macro window.
    • added the "filestat" macro command.
  • Bug fixes
    • Fixed a problem where TeraTerm consumes 100% CPU if a USB serial port is disconnected. Special thanks to Z. Vickery.
    • When a user assigns a function to the Alt key in the KEYBOARD.CNF file, the unnecessary string print.
    • Fixed a problem the setting of line feed may not be effective at numerical keypad ENTER.
    • Line at a time can not work well in English and Russian language. Special thanks to p3g4asus.
    • Switching to alternate screen buffer, saving and restoring cursor position do not work correctly.
    • By using the "Save Cursor" control sequence, the alternate screen buffer switching and the screen clear execute in the wrong.
    • If ClearOnResize setting is on, DECCOLM (Change Column Mode) control sequence does not clear screen.
    • VPR control sequence does not work correctly.
    • Improved the cancellation logic for XModem and YModem transfers'. Special thanks to Z. Vickery.
    • The crc32file macro command does not work correctly for handling the file opening error. And also, the command supports the read-only file.
  • Misc
    • upgraded TTSSH version supporting SSH2 to 2.53

2010.2.20 (Ver 4.65)

  • Changes
    • expanded the maximum number of saved host to 500.
    • expanded the maximum number of serial connection to 4096.
    • added support for the tab character as the command line delimiter.
    • enabled the [Show Log dialog] of the [File] menu while the log window is shown.
    • added the confirmation parameter at the "disconnect" macro command.
    • added support for not clearing the terminal screen while resizing.
      • A user can change the setup value on the Additional settings dialog.
    • added support for overwritten confirmation at the "filenamebox" macro command.
    • added support for replying an empty string at the window title and the icon label reporting control sequence.
      • Changed to the accept, ignore and empty value in the TitleReportSequence entry in the teraterm.ini file.
      • changed the default value of "TitleReportSequence" to "empty".
    • added Control Sequence tab on the Additional settings dialog
      • moved "Accept mouse event tracking request", "Disable mouse event tracking when Control is pressed" and "Accept window title change request" from General tab.
      • added "Title report sequence", "Window control sequence", "Window report sequence" and "Cursor control sequence".
    • added support for alternate screen buffer.
      • added the AlternateScreenBuffer entry in the teraterm.ini file. The default value is on.
  • Bug fixes
    • When the Auto Window Close is disabled, the ttermpro.exe can not notify the XTYP_DISCONNECT transaction to the ttpmacro.exe.
    • PasteDelayPerLine setting does not work correctly.
    • The macro string-type constants can not describe a tab character.
    • When the multiple files are sent or received by the Kermit, ZMODEM and QuickVAN protocol, the progress bar can not be reset after the second file.
    • The `/*' characters in the macro string-type constants are falsely recognized as a beginning of the C language-style comment.
    • Workaround: When the Eterm look-feel is enabled, the screen display can not work after the Reverse Video (DECSCNM) set/reset.
    • When the width of the window is shrunk, the invalid character remains at the end of each line.
  • Misc
    • stopped to write the new entry to the user's teraterm.ini file by the installer.
    • stopped to write the language configuration selected by a user to the user's teraterm.ini file by the installer.
    • upgraded CygTerm+ to 1.07_19
    • upgraded TTXRecurringCommand Plug-in to 1.01
    • upgraded TTXResizeMenu Plug-in to 1.01
    • upgraded TTXttyrec Plug-in to 1.02
    • added support for Microsoft Windows 7.
    • updated the screencapture.ttl file.
    • upgraded Oniguruma to 5.9.2
    • upgraded OpenSSL to 0.9.8l

2009.11.10 (Ver 4.64)

  • Changes
    • The click-able URL color is able to be painted.
    • added configuring the underline attribute to click-able URL string.
      • added the check box on Additional settings dialog dialog.
    • When the click-able URL is enabled, the mouser cursor is not able to transform.
    • sftp/tftp scheme can be linked in a click-able URL.
    • The list of open sessions in the Broadcast Command window can support the standard Windows feature of selecting the range of items. It is possible to select consecutive number of items by clicking on the first and then pressing Shift key and clicking on the last. And also, it is possible to select all items by CTRL+A pushing.
    • added support for resizing the list box in the Broadcast Command window.
    • The list box in the Broadcast Command periodically updates.
    • added the status bar at the bottom of the ConfirmChangePaste dialog.
    • When a user switches the Tera Term window by using CTRL+TAB key, a new window style is not changed.
    • added the "setdebug" macro command.
  • Bug fixes
    • fixed the problem that the settings of local echo and line feed before connection may not be effective.
    • fixed the problem that the settings of TCPLocalEcho/TCPCRSend in previous connection are not reset in serial connection.
    • fixed the problem that the invisible log dialog has focus when Tera Term start logging without displaying log dialog.
    • strscan macro command does not work correctly.
    • fixed the problem that the c language style comment does not work well.
    • fixed the problem that the tcp port number may not display on the window title.
    • Bug fix: "Enable bold font" setting is not immediately reflected.
  • Misc
    • Modified Tera Term installer script
      • when SSH protocol was linked by the installer, it is able to edit by "File Types" of "Folder Options" on Explorer.
    • upgraded TTSSH version supporting SSH2 to 2.52
    • upgraded TTProxy to 1.0.0.16
    • upgraded LogMeTT to 2.9.7
      • Tera Term can access the registry key(HKEY_CURRENT_USER\Software\LogMeTT\InstallPath) to find the path to LogMeTT.

2009.7.5 (Ver 4.63)

  • Changes
    • added support for cursor control sequences.
      • added the CursorCtrlSequence entry in the teraterm.ini file. The default is off.
    • added support for the control sequences for window operation.
      • added the WindowCtrlSequence, WindowReportSequence and TitleReportSequence entry in the teraterm.ini file. The default is on.
    • added support of "Line at a time" mode.
      • added the EnableLineMode entry in the teraterm.ini file. The default value is on.
      • change the default mode from "Character at a time" to "Line at a time".
    • added configuring the delay time per a carriage return when a user pastes multiple lines. The default is 10 msec.
      • A user can change the setup value on the Additional settings dialog.
    • Changed the BroadcastCommand functional specification. When the BroadcastCommand is not the real-time mode, a user can send a message at the selected window in the list box.
    • added UTF-8 language
      • added the /LA command line option for language mode specification.
    • In UTF-8 transmission mode, when the input character is recognized as invalid character, Tera Term sends the Replacement Character(U+FFFD).
    • changed Korean language implementation
      • added support for Korean mode with /LA command line option, which specifies the language mode.
      • added support for the IME in-line conversion.
      • added the `UTF-8m' selection for the receiving character code.
      • added the KS5601 at the KanjiSend and KanjiReceive entry in the teraterm.ini file.
      • added the KS5601 in the /KR and /KT command line options.
    • The OS common dialog is shown in the font setup dialog box.
      • added the character set (aka "Script") drop-down combo box.
      • moved the Enable bold style to [Setup]-[Window].
      • moved the Russian Font char set to [Setup]-[Terminal] for Russian mode.
    • added the MSB set character by using the Alt key.
      • added the Meta8Bit entry in the teraterm.ini file. The default value is off.
    • added `&p' parameter to log file name that can convert the tcp port number.
    • added the millisecond at the log time-stamp line.
    • respond for Secondary DA request only when it has no parameter or parameter 0.
    • add experimental support for the motion event of mouse event notify.
    • added a new optional setting that can disable the menu for "Send Break". Special thanks to peterprvy.
      • added the DisableMenuSendBreak in the teraterm.ini file. The default is off.
    • added a new optional setting that can clear the screen when disconnected. Special thanks to peterprvy.
      • added ClearScreenOnCloseConnection in teraterm.ini file. The default is off.
    • added a new optional setting that can disable the accelerator key for the Duplicate session.
      • added the DisableAcceleratorDuplicateSession entry in the teraterm.ini file. The default is off.
    • The /F command line option overwrites the other option.
    • Changed the command line specification regarding the double quotation.
      • A user can specify the "" characters instead of the " character.
    • added support for specifying any strings as the ConfirmChangePaste function.
      • added the ConfirmChangePasteStringFile entry in the teraterm.ini file. A user can specify a text file path enumerating any strings.
    • added the Wait4allMacroCommand entry in the teraterm.ini file. The default is off. Turn on the value to enable the "wait4all" macro command.
    • added the new option of the "exec" macro command that the application exit code is stored in the result variable.
    • added the C language style comment(/* - */) for the macro script. Limited support.
    • added a Subversion(SVN) revision number on the version dialog.
  • Bug fixes
    • The settitle macro does not work after accepting the changing request of the window title, when the AcceptTitleChangeRequest is overwrite.
    • Not reset scroll-back function doesn't work when scroll region (DECSTBM) was set. For example, minicom sets the scroll region.
    • The continuedline copy does not work well.
    • When a user connects to the server after duplicating the ssh and cygwin session, TCPLocalEcho/TCPCRSend is ignored.
    • When the click-able URL characters are over 1024 byte, the application fault would occur.
    • Fix the problem that unsupported URI scheme can be linked in a click-able URL.
    • changed UTF-8 implementation
      • A character could send not converting it to the UTF-8 encoding when the sending mode is UTF-8.
      • The second character is late for sending by the UTF-8 encoding.
      • When receiving is the UTF-8 mode, some characters can not display.
      • When receiving is the UTF-8 mode, ISO-2022(SS2 and SS3) control code does not work.
    • changed Korean language implementation
      • Hangeul can not be selected by using double-click.
      • The control sequence of one character deletion(DCH) can not work Hangeul.
      • The carriage return can not work when Hangeul positioned at the end-of-line.
    • When a user pastes multiple lines, the application fault occurs on Windows 95.
    • Bug fix: the locale object is leaked.
    • When the 8 bit answering configuration(S8C1T) is enabled, an invalid character sticks after the Secondary DA answering.
    • When an incorrect option is specified, the option error does not occur. For instance, the /BADOPTION is recognized as the /B option.
    • The "sendmulticast" and the "setmulticastname" macro commands can not receive the value when the first argument is not a string but a user variable.
  • Misc
    • Modified Tera Term installer script
      • linked .tty file to the Tera Term(TTXttyplay) program.
    • upgraded TTSSH version supporting SSH2 to 2.51
    • upgraded CygTerm+ to 1.07_17
    • upgraded TeraTerm Menu to 1.09
    • upgraded TTX KanjiMenu Plug-in to 0.1.6
    • upgraded TTXAlwaysOnTop Plug-in to 1.01
    • upgraded TTXttyrec Plug-in to 1.01
    • added TTXRecurringCommand plug-in in the Additional Plug-ins.
    • upgraded LogMeTT to 2.9.5
    • added limited support for Microsoft Windows 7 RC(Build7100).

2009.3.22 (Ver 4.62)

  • Changes
    • The mouse event tracking can be disabled while a user pushes the Control key.
      • added DisableMouseTrackingByCtrl in teraterm.ini file. The default is ON.
      • added the check box on Additional settings dialog.
    • When the application cursor mode is disabled, TranslateWheelToCursor is disabled.
    • The TranslateWheelToCursor can be disabled while a user pushes the Control key.
      • added DisableWheelToCursorByCtrl in teraterm.ini file. The default is ON.
    • Disabled the "Eterm lookfeel" check-box on the Additional settings dialog. If a user enables the feature, directly edit the teraterm.ini file.
    • The hidden fonts can be shown on the font selection dialog with Windows 7 beta(build7000).
    • added support for specifying the reversed color.
      • added VTReverseColor entry in teraterm.ini file.
        Notice: This function is disabled for the backward compatibility when a user selects the upgrade installation. If a user want to enable this feature, turn on the EnableReverseAttrColor entry.
    • added being able to disable the high brightness color, the blink color, the reverse attribute color and the ANSI color displaying.
      • added EnableBoldAttrColor, EnableBlinkAttrColor, EnableReverseAttrColor, EnableURLColor and EnableANSIColor entries in teraterm.ini file. The default value of EnableReverseAttrColor is off, the others are on.
      • added the check box on Additional settings dialog.
    • Changed ConfirmChangePaste's default value into on.
    • Added EDITOR.CNF file in Tera Term installation package.
    • Changed the function of the editor keypad and the function key. When the keyboard configuration file is not found, TeraTerm sends the corresponded VT key sequence.
      • added StrictKeyMapping entry in teraterm.ini file.
    • Added the Visual C++ version and the built time on About TeraTerm dialog.
    • added `sprintf2' macro command.
    • added `waitn' macro command. Special thanks to p3g4asus.
    • added the result of "logopen" macro command stores to 'result' variable.
    • added "mtimeout" macro variable. When a user uses the wait-related macro, Tera Term waits "timeout * 1000 + mtimeout" millisecond. Precision is about 50 msec.
    • added `sendbroadcast' macro command.
    • added `sendlnbroadcast' macro command.
    • added `sendmulticast' macro command.
    • added `setmulticastname' macro command.
  • Bug fixes
    • Bug fix: In the Cygwin connection, PATH environment variable is truncated to 1024 bytes.
    • Bug fix: added the workaround that a developer can debug the Tera Term macro script on Visual Studio.
    • Bug fix: connect macro can not finish when /DS is specified.
    • Bug fix: By using logopen macro with the hidden option, the log window appears for a quick moment.
    • Bug fix: When the reverse video mode is enabled, DECSCNM is on, the character and background color configuration does not work.
    • Bug fix: When the reverse video mode is enabled, DECSCNM is on, the character and background color does not restore after saving and loading the configuration.
  • Misc
    • upgraded TTSSH version supporting SSH2 to 2.50
    • upgraded TTX KanjiMenu Plug-in to 0.1.5.
    • upgraded cyglaunch to 1.01
    • added support for Microsoft Windows 95.
    • added limited support for Microsoft Windows 7 beta(build7000).

2008.12.16 (Ver 4.61)

  • Changes
    • disabled the Plain text and Timestamp flag when the Binary flag is enabled.
    • added the display method of Accept Window Title Change Request. The title can insert before or after the canonical title.
    • moved the "Delimitter Characters" configuration from "General" tab to "Copy and Paste" tab on the "Additional settings" dialog.
    • added the /DS command line option. It disables the "New connection" dialog.
    • Preserved the comment and the position of the entry in teraterm.ini file when a user saved the Tera Term configuration.
    • added support for replace the command of UK character set with the US-ASCII. This is the workaround that the lower-case alphabet can not properly display after showing DEC special character.
    • added 'gethostname' macro command.
  • Bug fixes
    • Bug fix: The following problems about the character attribute. These bugs were introduced in 4.58.
      • The high brightness, the under line, the blinking and the reverse attribute apply in the erase area.
      • On the Edit menu and then point to clear screen and clear buffer, the terminal screen is cleared with the current background color.
      • The display after clearing the screen could not synchronize with the buffer by using ED(Erase in Display) and EL(Erase in Line).
      • The character attribute uses by using DECALN(DEC Screen Alignment Test).
    • Bug fix: The macro label can be specified the characters other than alphabet and numeric ones.
    • Bug fix: Using the filestrseek2 macro command, a file pointer is minus value if the matched string locates at one byte in the file.
    • Bug fix: Using the logopen macro command, when the specified filename does not include \ character, the log file is saved at the root directory.
    • Bug fix: Using the gettitle macro command, Tera Term could not get an entire string when the window title is longer than 31 bytes.
    • Bug fix: strmatch macro command does not work.
  • Misc
    • Modified Tera Term installer script
      • added ssh:// associated with the ttermpro.exe.
      • added some plug-ins in the Additional Plug-ins.
      • moved the TTXKanjiMenu plug-in to the Additional Plug-ins.
      • added the cygterm+ source code in Tera Term package.
    • upgraded TTSSH version supporting SSH2 to 2.49
    • upgraded CygTerm+ to 1.07_16

2008.9.23 (Ver 4.60)

  • added support of CHT (Cursor Forward Tabulation) and CBT (Cursor Backward Tabulation) control sequence.
  • added support for Visual Bell. When Tera Term receive the BEL character, the window can flash instead of sounding the beep.
    • added the Visual option of Beep entry in teraterm.ini file.
  • added support for Korean language. Special thanks to Keonsoon Hwang.
  • added the error message when a user can not open a log file. However, the logopen macro does not show the error message.
  • added support for receiving the escape sequence regarding the code can change the window title.
    • added AcceptTitleChangeRequest entry in teraterm.ini file. The default is ON.
    • added the check box on Additional settings dialog.
  • added support for changing the size of the ConfirmChangePaste dialog.
  • added support for saving the size of the ConfirmChangePaste dialog to teraterm.ini file.
    • added PasteDialogSize entry in teraterm.ini file. The default value is 330x230.
  • added support for displaying the terminal size after resizing on the tool tip.
  • added support for the progress indicator on the file transfer dialog.
  • added the workaround for a lot of pasting data would corrupt on SSH2 connection. This workaround is 10msec waiting with each 500 byte.
  • added support for canceling the `messagebox' and the `yesnobox' macro command. When a user cancels the messagebox window, the macro engine halts.
  • added support for the TTX interface to hook the serial communication.
  • added 'crc32' and crc32file macro command.
  • added 'getttdir' macro command.
  • Bug fix: A user could not duplicate the network session of TELNET and SSH without port 22 and 23.
  • Bug fix: The terminal size could reduce on Windows 98-compatible products.
  • Bug fix: Tera Term icon would 16x16 size when a user changes the window by using Alt+Tab key on Windows Vista Aero.
  • upgraded TTSSH version supporting SSH2 to 2.48

2008.6.25 (Ver 4.59)

  • Changed the application name from "UTF-8 TeraTerm Pro with TTSSH2" to "Tera Term".
    • We will encourage the introduction by uninstallation and a new installation.
  • added Windows XP x64, Windows Vista and Windows Server 2008 to the supported OSes list.
  • updated to new Tera Term icon file(teraterm.ico, vt.ico) and macro icon file(ttmacro.ico). Special thanks to Tatsu Sakamoto.
  • Pasting by clicking the middle button of mouse has been deleted in last release, but put it back.
    • added DisablePasteMouseMButton entry in teraterm.ini file. The default value is on.
  • changed Additional settings dialog.
    • added ConfirmChangePaste option.
    • added MouseEventTracking option.
    • Moved from the partial content of General tab sheet to the new 'Copy and Paste' tab sheet.
    • Bug fix: Not saving the others tab content.
    • Bug fix: Can not create the `cygterm.cfg' file when the file does not exist.
    • Bug fix: The invalid error message would be shown when the default log file name is not specified.
  • added support for display confirmation dialog when 'Paste<CR>' menu was selected.
  • added the user configuration for the mouse wheel scroll line.
    • added MouseWheelScrollLine entry to teraterm.ini. The default value is 3.
    • added a edit control on Additional settings dialog.
  • added support for memorializing previous .ttl file directory.
  • added support for hiding [LogMeTT] under [File] menu when LogMeTT.exe does not exist.
  • added support for configuring the ScrollLock key in KEYBOARD.CNF file.
    • added ScrollLock entry in KEYBOARD.CNF file. The default value is 70.
  • added support for configuring whether the current buffer would be scrolled out with <ESC>[J clear screen.
    • added ScrollWindowClearScreen entry in teraterm.ini file. The default value is on.
  • Prevented automatically scroll out other than the latest bottom line (Not reset scroll-back on display activity). However, the scroll-back will be reset when a user inputs any key (except control keys such as CTRL and SHIFT). Special thanks to Salarm.
    • added AutoScrollOnlyInBottomLine entry to teraterm.ini. The default value is on.
    • added a check box on Additional settings dialog.
  • added support for the configuration whether the Unicode character that Tera Term does not support treated as a wide character.
    • added the UnknownUnicodeCharacterAsWide entry in teraterm.ini file. The default value is off.
  • If a received Kanji code is either UTF-8 or UTF-8m, some characters such as a ruler and special characters will be displayed by using similar characters in DEC special character set. These characters are categorized into several groups and you can specify each group to be converted or not.
    • added the UnicodeToDecSpMapping entry in teraterm.ini file. The default value is 3.
  • added specifying the default file name as the sending file name when a file specified by FileSendFilter.
  • added the ASCII string of the hex-dump in X and ZMODEM log file.
    • added YmodemLog in teraterm.ini file. The default value is off. Currently, Tera Term not supporting YMODEM protocol.
  • added 'strmatch' macro command.
  • added 'setrts' and 'setdtr' macro command.
  • added support for WM_COPYDATA message continuous transmission by using the Broadcast Command. Special thanks to Salarm.
  • added support for changing the window icon of VT and TEK.
    • added the VTIcon and TEKIcon entry in teraterm.ini file. The default value is "Default".
    • added the /VTICON and /TEKICON command line option.
    • added setting up the CygTerm icon on VT window by launching CygTerm(This feature is enabled on a new installation).
      added the `/VTIcon=CygTerm' command line option in TERM entry of cygterm.cfg.
  • Moved the confirmation dialog of ConfirmChangePaste from the mouse cursor to the current caret position.
  • The work selection by double-clicking was enabled when the mouse tracking mode is used.
  • Maximum number of tracked host name in New Connection dialog is increased from 99 to 200.
  • Modified Tera Term installer script
    • added the cyglaunch shortcut to the startup menu.
    • added the cyglaunch shortcut to the quick launch bar.
    • linked .ttl file to the ttpmacro.exe program.
    • linked telnet protocol to the ttermpro.exe program.
    • updated FileDir entry in the teraterm.ini file to Tera Term installation directory.
  • Bug fix: "Window list" dialog was not appeared in VT window.
  • Bug fix: Some application like as LogMeTT.exe and cygterm.exe, or cygterm.cfg file would not work well when Tera Term current directory is changed because the full-path does not be specified.
  • Bug fix: XModemRcvCommand entry in teraterm.ini file could not be empty.
  • Bug fix: Invalid position could be notified with the mouse event tracking.
  • Bug fix: Could not automatically connect with the serial line when both "/C=" and "/M=" options are specified at ttermpro.exe.
  • Bug fix: The control sequence by using C1 control character could not work well when the receiving KANJI code is UTF-8 or UTF-8m.
  • Bug fix: Changing the window title with the control sequence would not work well when the receiving KANJI code is SJIS.
  • Bug fix: The background color and ANSI color configuration would not work well when a user specify /F= option on "New Connection" dialog.
  • Bug fix: Tera Term window would not display when a user pushes OK button on "Additional Settings" dialog with Eterm look-feel enabled.
  • Bug fix: Tera Term window would be shifted down from the top of the external monitor and aligned to the top of the primary monitor when the window maximizes on the dual monitor.
  • Bug fix: The edge of Tera Term window would protrude in the external monitor when the window maximizes on the dual monitor.
  • Bug fix: fixed a problem that MaxBroadcatHistory allows up to 99 although more than 100 can be specified.
  • upgraded TTSSH version supporting SSH2 to 2.47
  • upgraded TeraTerm Menu to 1.08
  • upgraded LogMeTT to 2.9.4

2008.2.29 (Ver 4.58)

  • Rotating the mouse wheel would supersede the cursor key when the application cursor mode is enabled.
    • added TranslateWheelToCursor entry in teraterm.ini file. The default value is on.
  • added the configuration entry to whether "New Connection" dialog is shown on TeraTerm startup.
    • added HostDialogOnStartup entry in teraterm.ini file. The default value is on.
  • added support of mouse event tracking.
    • added MouseEventTracking entry in teraterm.ini file. The default value is on.
  • added the "Realtime mode" feature on Broadcast Command. This feature can send all user's key sequence to TeraTerm window, and then a user can use vi editor on all window. This feature takes after "TeraTerm Pro assistant" free ware in lots of ways.
    • added "Realtime mode" check-box in Broadcast Command dialog. The default is on.
    • added a TeraTerm window list. Also, a user can select all item or cancel all item by double-click(toggle).
    • Broadcast Command dialog is moved to the upper of TeraTerm window.
  • displayed the cursor bitmap when TeraTerm window loses the keyboard focus.
    • added KillFocusCursor entry in teraterm.ini file. The default value is on.
  • added the configuration entry to whether "Log" transfer dialog is shown on start logging.
  • added the "SCP" button on the confirmation dialog when a user drags a file to TeraTerm window.
  • added Font linking fixed patch. Special thanks to naoh.
  • added the confirmation dialog when the Clipboard includes CR/LF by right-click or Alt+V. This is a foolproof way.
    • added ConfirmChangePaste entry in teraterm.ini file. The default value is on.
  • added the configuration entry to save the window position.
    • added SaveVTWinPos entry in teraterm.ini file. The default value is off.
  • changed the default value of TermType from 'vt100' to 'xterm'
    • TERM environment variable is reported as "xterm" to the host by using TELNET and SSH protocol.
  • disabled pasting with clicking the middle button of mouse.
  • changed default folder of the dialog to select a folder. The current path of configuration is selected.
  • increased max width of window from 300 chars to 500 chars.
  • added support for 256 xterm color and 16 aixterm color mode.
    • added Xterm256Color and Aixterm16Color entry in teraterm.ini file.
    • changed from FullColor entry to PcBoldColor entry.
    • added new check-boxes on setup window dialog.
  • changed from the standard background color to the current background color on the line and the screen deleted area, the new displayed line by scrolling.
  • added the German.lng language file. Special thanks to Alexander Wiechert.
  • added the workaround for corrupting the character line on the Maximize window.
    • added MaximizedBugTweak entry in teraterm.ini file. The default value is on.
  • Bug fix: Reverse video control sequence (DECSCNM) doesn't work correctly.
  • Bug fix: When TeraTerm is the Maximize window, TerminalSize entry in relation to the window would be recorded in teraterm.ini file.
  • Bug fix: The problem that a multi-byte character string which includes 0x5C and/or 0x7C is recognized as invalid is now fixed. This problem existed in a routine to check a file name.
  • Bug fix: TeraTerm COM auto connect problem. Special thanks to Steven Yang. cf. TeraTerm com auto connect bug
  • Bug fix: ANSI Color settings is not immediately reflected.
  • Bug fix: Too many '\' characters could be shown after changing the title string by the escape sequence.
  • added 'getver' macro command.
  • added 'setbaud' macro command. Special thanks to Steven Yang.
  • added three parameters from 6 to 8 in 'showtt' macro command. Special thanks to Steven Yang.
  • added the second parameter in 'exec' macro command. Special thanks to Steven Yang.
  • added new arguments <plain text flag>, <timestamp flag>, <hide dialog flag> to 'logopen' macro command.
  • if 'getdate' and 'gettime' macro command have no date and time format, system variable "result" is not changed. (for compatibility with version 4.56 or earlier)
  • upgraded TTSSH version supporting SSH2 to 2.46
  • upgraded TTProxy to 1.0.0.15
  • upgraded TTX KanjiMenu Plug-in to 0.1.4.

2008.1.15 (Ver 4.57)

  • added param4 to param9 macro command line parameters.
  • added ESC key binding on Additional settings dialog.
  • added Enter key binding on Additional settings dialog.
  • added support for ZMODEM sending file with the time-stamp and permission(0644) of the file.
    • added ZmodemRcvCommand entry in teraterm.ini which is ZMODEM receive program. The default is "rz".
  • added support for sending "rx filename" command sequence to the connected host before sending the local file with XMODEM protocol.
    • added XmodemRcvCommand entry in teraterm.ini which is XMODEM receive program. The default is "".
  • added 'cygconnect' macro command.
  • added new argument to getdate and gettime macro command. It specifies date and time format.
  • added 'scpsend' macro command.
  • added 'scprecv' macro command.
  • added the user confirmation when a file drags to TeraTerm window.
    • added ConfirmFileDragAndDrop entry in teraterm.ini file. The default value is off.
  • Bug fix: TeraTerm would overwrite the selected buffer to the Clipboard when SelectOnlyByLButton entry is on.
  • Bug fix: extension filters on file dialog didn't work when the FileSendFilter is specified.
  • Bug fix: double close a local file handle when same file already exists on the remote host by sending the local file with ZMODEM protocol.
  • Bug fix: Telnet keep-alive mechanism could not been thread-safe.
  • Bug fix: New-line (transmit) of Terminal Setup would be empty when a user connects.
  • Bug fix: Up and Down key could not work with DELL USB keyboard. Added the workaround. Special thanks to chuckf.
    cf. http://www.neocom.ca/forum/viewtopic.php?p=2565
  • upgraded TTSSH version supporting SSH2 to 2.45
  • upgraded CygTerm+ to 1.07_14
  • upgraded Oniguruma to 5.9.1

2007.12.4 (Ver 4.56)

  • added new optional setting that can disable application keypad/cursor mode.
    • added DisableAppKeypad and DisableAppCursor entry to teraterm.ini.
    • added a check box on Keyboard setup dialog.
  • added new optional setting that can cleaning COM buffer when port opening.
    • added ClearComBuffOnOpen entry to teraterm.ini. On is clear buffer, or Off is not clear buffer. The default value is on.
  • added support Ctrl+u shortcut key in "Host" drop-down on "New connection" dialog. The shortcut key is deleting backward from point to the beginning of the line.
  • added /BAUD command line option to specify baud rate of serial port.
  • added support sending C1 control characters as single 8-bit characters.
    • added Send8BitCtrl entry to teraterm.ini. The default value is off.
    • added support of S7C1T/S8C1T control sequences.
    • added support of changing C1 control mode by DECSCL control sequence.
  • added support for KAM(Keyboard Lock) and DECNKM(numeric keypad mode) control sequences.
  • added an open dialog to select a folder at "Change directory" menu under file menu.
  • added support for enabling only mouse left-click to select the text by dragging.
    • added SelectOnlyByLButton entry to teraterm.ini. The default value is on.
    • added a check box on Additional settings dialog.
  • On UTF-8 encoding, single COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK(U+3099) and COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK(U+309A) are displayed as KATAKANA-HIRAGANA VOICED SOUND MARK(U+309B) and KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK(U+309C).
  • add support of handling large text data in clipboard to macro command clipb2var.
    • added new argument to macro command clipb2var. It controls start position of copying.
    • if clipboard content is too long and copied string was truncated, clipb2var returns 2 in system variable "result".
  • added 'do', 'loop' macro command.
  • added 'until', 'enduntil' macro command.
  • added 'callmenu' macro command.
    • added `screencapture.ttl' file as a sample TTL macro.
  • added new optional setting that can disable telnet command detection.
    • added TelAutoDetect entry to teraterm.ini. default is on.
  • added 'Cancel selection' new menu under edit menu.
  • changed the initial directory of log file to 'Default Log Save Folder' when it is available.
  • Bug fix: the transparency of window could not change to 255.
  • Bug fix: last 1 character of title string that is sent from server is deleted.
  • Bug fix: TeraTerm would use the configuration of TCPLocalEcho/TCPCRSend when the user start telnet connection on New connection dialog.
  • Bug fix: when continued line copy is enabled, Copy Table does not work correctly
  • Bug fix: when Transmit DEL by Delete key is enabled and Num Lock status is off, Numeric Keypad "." sends DEL.
  • Bug fix: 'wait' macro command can't wait a long string. This bug was introduced in 4.54.
  • Bug fix: The color value on Window setup dialog would become 255 when the value is less than 16 and the user pushes PageUP key.
  • Bug fix: COM port description would be wrong when COM port number is forced to switch another number. Special thanks to xoxo-san.
  • Bug fix: On TEK Window's Setup Window dialog, "Always use Normal text's BG" check-box is displayed.
  • Bug fix: TEK Window's Setup Font dialog does not support for dynamic loading of user interface messages.
  • upgraded TTSSH version supporting SSH2 to 2.44
  • upgraded TeraTerm Menu to 1.07

2007.10.14 (Ver 4.55)

  • added reporting the stack trace and register dump of TeraTerm process when the application error occurs.
  • added support Ctrl+d, Ctrl+k shortcut key in "Host" drop-down on "New connection" dialog. The former is deleting the character at point and the latter is killing the text from point to the end of the line.
  • expanded the maximum number of serial connection to 256.
  • changed the default value of "Bold style font" to On.
  • Bug fix: 'getdir' macro command caused crash.
  • Bug fix: the format of strftime in log filename was not extracted.
  • upgraded TTSSH version supporting SSH2 to 2.43

2007.9.30 (Ver 4.54)

  • added support for selecting a current screen buffer. Also, added `select screen' new menu under edit menu.
  • added support for showing the device description of COM port on the connection dialog.
  • added support of telnet keep-alive.
    • TeraTerm will send TELNET NOP command to host when no communication does for a long time.
    • added TelKeepAliveInterval entry in teraterm.ini file. The default value is 300 per seconds. 0 is turn off.
    • added telnet keep-alive input box on TCP/IP setup dialog.
  • added Alt+I accelerator key as disconnect.
  • added shift operator ">>", "<<", ">>>" for macro.
  • changed the priority of macro operator in the following order:
    • New:
Priority Operator
1       not ~ ! +(unary) -(unary)
2       * / %
3       + -
4       >> << >>>
5       and &
6       xor ^
7       or |
8       < > <= >=
9       = == <> !=
10      &&
11      ||

Old:
Priority Operator
1       not ~ ! +(unary) -(unary)
2       * / %
2       and &
3       + -
3       or xor | ^
4       = <> < > <= >=
5       &&
6       ||
  • added 'rotateleft', 'rotateright' macro command.
  • added 'setenv' macro command.
  • added 'filenamebox' macro command.
  • expanded the maximum number of serial connection to 200.
  • changed the initial directory of log file to any directory.
  • add support Ctrl+p, Ctrl+n, Ctrl+b, Ctrl+f, Ctrl+a and Ctrl+e shortcut key in "Host" drop-down on "New connection" dialog. Shortcut keys are compatible with up-arrow, down-arrow, left-arrow, right-arrow, Home and End key.
  • stopped saving VTPos and TEKPos when saving teraterm.ini.
  • changed the save file for the history of broadcast command to broadcast.log.
  • added setting of the number for the history of broadcast command.
    • added MaxBroadcatHistory entry to teraterm.ini.
  • added new argument to macro command 'messagebox', 'yesnobox', 'inputbox', 'passwordbox' and 'statusbox'. It controls whether to parse '\n','\t' as special characters.
  • Bug fix: window size could not be changed at first time.
  • Bug fix: CR+LF code at the end of line would not been selected when you select "Select all" menu under edit menu.
  • Bug fix: Mouse wheel would not be rotated on Windows Vista.
  • Bug fix: Kermit fails to properly negotiate to NOT use "repeat" compression when talking to a primitive partner. Special thanks to Anders Larsen.
  • replaced internal string functions to secure functions.
    • deleted _CRT_SECURE_NO_DEPRECATE build option.
  • upgraded TTSSH version supporting SSH2 to 2.42
  • upgraded TeraTerm Menu to 1.06
  • upgraded TTProxy to 1.0.0.14

2007.8.8 (Ver 4.53)

  • added `&h' parameter to log file name that can convert the host name.
  • added a default log directory setting.
    • added LogDefaultPath entry to teraterm.ini.
    • added a new edit control on Additional Settings tab.
  • added auto start logging setting when a user try to connect.
    • added LogAutoStart entry to teraterm.ini.
    • added a new check-box on Additional Settings tab.
  • added the file name filter on the file sending dialog.
    • added FileSendFilter entry to teraterm.ini.
  • changed the behavior of tab at end-of-line. It causes linefeed automatically.
    • added VTCompatTab entry to teraterm.ini. This entry enables the behavior of the tab code at end-of-line to doing as vt100/xterm. The default is off.
  • expanded the maximum number of serial connection to 200.
  • added support displaying the port number of TCP and the baud rate of serial port to titlebar.
  • added support for Click-able URL to Emacs editor. TeraTerm would ignore \ character as URL composition characters when an end of a line was the character.
  • added 'tolower' macro command.
  • added 'toupper' macro command.
  • added 'break' macro command.
  • added an argument to inputbox macro command. New argument is used for default input string.
  • added logical operator "&&", "||", "!" and bitwise operator "&", "|", "^", "~" for macro.
  • added "Cygterm Here" to a context menu of Explorer. CygTerm can be started from an any directory on Explorer.
    • added cyglaunch.exe program that was able to start CygTerm without adding `X:\cygwin\bin' to PATH environment variable.
  • changed the owner of HTML help file from TeraTerm instance to Windows desktop.
  • changed the macro error does not occur when including the empty macro file.
  • added to preserve comment and unknown parameter when saving cygterm.cfg file.
  • added to disable the serial port in New Connection dialog when there is no available COM ports.
  • deleted hlp style help files(ttermp.hlp).
  • Bug fix: eliminated a unnecessary return code every time 1KB logging with the time-stamp mode. Special thanks to Gentaro.
  • Bug fix: BOF(Buffer Over Flow) problem in ttpmacro.exe program, which 256 byte longer command line parameter is specified.
  • Bug fix: BOF(Buffer Over Flow) problem in ttpmacro.exe program when a line of macro is longer than 256 byte.
  • added a workaround that ttermpro.exe can not send the server data to ttpmacro.exe with DDE transaction.
  • Bug fix: wrong free of memory in var2clipb macro command.
  • Bug fix: did not save/load "LF" to CRReceive entry in teraterm.ini.
  • Bug fix: TeraTerm window size could not be changed after the window size is smaller than 120 dot(94 dot on XP LUNA style). This is TeraTerm 2.3 original bug.
  • Bug fix: status-box does not display '\n' as LF when the status-box is existing yet.
  • Bug fix: some macros are not become an error when the parameter filename starts by ':'.
  • Bug fix: the expression like "a < b < c" cannot be evaluated by the macro.
  • Bug fix: The control window of ttpmacro.exe would be unresponsive while doing `pause' macro command.
  • added TTX KanjiMenu Plug-in 0.1.3(ttxkanjimenu.dll). Special thanks to Sunao HARA.
  • upgraded TTSSH version supporting SSH2 to 2.41
  • upgraded CygTerm+ to 1.07_13
  • upgraded LogMeTT to 2.9.2
  • upgraded Oniguruma to 5.9.0

2007.5.7 (Ver 4.52)

  • Bug fix: yesnobox macro showed tow 'OK' buttons.
  • Mouse cursor and ANSI color settings are moved to Visual tab in Additional settings dialog.
  • added new optional setting that can confirm pasting by right click.
    • added ConfirmPasteMouseRButton entry to teraterm.ini.
    • added a check box on Additional settings tab.
  • added new optional setting that can disable accelerator key of Send break.
    • added DisableAcceleratorSendBreak entry to teraterm.ini.
    • added a check box on Additional settings tab.
  • added "ParentOnly" check box on Broadcast dialog. The check box enables the sending target from Broadcast dialog is restricted to parent window. Special thanks to 337.
  • added new optional setting that can disable Broadcast sending from Broadcast dialog(parent window).
    • added AcceptBroadcast entry to teraterm.ini.
    • added a check box on Additional settings tab.
  • When the connection is SSH or Cygwin, TCPLocalEcho setting and TCPCRSend setting is not used.
    • added /E command line option.
  • Bug fix: LOGIN_SHELL and HOME_CHDIR were removed when saving cygterm.cfg from Additional settings dialog.
  • Bug fix: some file select dialogs are not displayed on Windows NT 4.0.
  • added `sprintf' macro command.
  • added `str2int' macro command support for hexadecimal conversion.
  • upgraded TTSSH version supporting SSH2 to 2.40
  • upgraded TTProxy to 1.0.0.13
  • upgraded LogMeTT to 2.9.1
    • Standalone TeraTerm Macro Editor - TTLEditor was added.
  • upgraded Oniguruma to 5.7.0

2007.3.10 (Ver 4.51)

  • Bug fix: some file select dialogs are not displayed on Windows98/NT4.0.
  • Bug fix: the 'pause' macro command had a time-lag about 1 sec.
  • TeraTerm reads the teraterm.ini from My Documents when it exists.
  • Selected the next line including word characters if double-clicked word character is over the most right line when EnableContinuedLineCopy is enabled.
  • added support for saving Broadcast Command history in teraterm.ini file.
  • added support for serial port dynamic detection. TeraTerm could detect available COM ports and display only possible in 'New connection' and 'Serial port setup' dialog.
  • added support for dynamic loading of user interface messages.
    • added Japanese language message file.
    • added UILanguageFile entry to teraterm.ini.
  • upgraded TTSSH version supporting SSH2 to 2.39
  • upgraded CygTerm+ to 1.07_11
  • upgraded TTProxy to 1.0.0.12
  • upgraded TeraTerm Menu to 1.05
  • upgraded Oniguruma to 5.5.3

2007.1.22 (Ver 4.50)

  • TeraTerm source code have been rebuilt with Visual Studio 2005 Standard Edition(+SP1).
  • Bug fix: The macro script might stall with logging mode. This is TeraTerm 2.3 original bug.
    The reason of the bug is that DDE server does not send the data to DDE client because log buffer index does not match DDE buffer index.
  • Bug fix: TeraTerm crashes when the log file name is not a full path.
  • Bug fix: The return code doesn't have been recorded in log file if EnableContinuedLineCopy is enabled.
  • added FUNCTION.CNF. F1-F10 keys are enabled in this keyboard setup file.
  • added 'Replay Log..' menu under File menu. This function replays log with binary mode and emulates the escape sequence.
  • Connecting socket could be canceled after the specified value timeout.
    • added `ConnectingTimeout' entry in teraterm.ini file. This value is connecting timeout per seconds.
    • Also added `/timeout=' command line option.
    Conversely, no action if the value is zero(depends on Windows TCP/IP stack implementation).
  • added `LF' to New-line Receive on Terminal setup dialog.
    TeraTerm considers the server new-line is LF if the option is selected and treats it as CR+LF.
    cf. http://www.neocom.ca/forum/viewtopic.php?t=216
  • upgraded TTSSH version supporting SSH2 to 2.38
  • upgraded TTProxy to 1.0.0.10
  • upgraded Oniguruma to 5.5.2

2006.11.20 (Ver 4.49)

  • Bug fix: TeraTerm(DDE server) sent the invalid return value to TeraTerm macro(DDE client) when DDE server was received XTYP_POKE message.
  • added busy procedure(DDE_FBUSY) between DDE server and DDE client.
  • added support for ScrollLock key.
  • added support for XMODEM-1K send with checksum when the peer specifies it instead of CRC. Special thanks to Mark Deneen.
  • updated HTML help document.
  • changed installer. teraterm.ini entries (Language, Locale, CodePage. VTFont and TEKFont) are set by installer when new install.
  • upgraded TTSSH version supporting SSH2 to 2.37
  • upgraded Oniguruma to 4.5.1

2006.11.1 (Ver 4.48)

  • added 'fileread' macro command. This command enables the macro script to read the specified bytes from file.
  • upgraded TTSSH version supporting SSH2 to 2.36
  • upgraded Oniguruma to 4.4.6

2006.10.28 (Ver 4.47)

  • deleted duplication of accelerator key bind under File menu.
  • Workaround: insert 1msec sleep to OnIdle engine while DDE buffer is full.
  • deleted 100msec sleep after send and sendln macro command.
  • expanded the ring buffer size of macro program(ttpmacro.exe) from 4KB to 16KB. And also changed the macro synchronization timing to TeraTerm(ttermpro.exe).
  • upgraded TTSSH version supporting SSH2 to 2.35
  • upgraded LogMeTT to 2.8.6
  • upgraded Oniguruma to 4.4.5

2006.10.9 (Ver 4.46)

  • Bug fix: default save directory of teraterm.ini is set to desktop on Windows Vista.
  • added 'clipb2var' macro command. This command enables the macro script to get data from clipboard.
  • added 'var2clipb' macro command. This command enables the macro script to set data to clipboard.
  • Bug fix: /L= parameter in New Connection dialog is not used on first TeraTerm window.
  • added 'ifdefined' macro command. This command returns the type of variable.
  • updated HTML help document.
  • upgraded TTSSH version supporting SSH2 to 2.34
  • upgraded CygTerm+ to 1.06_11
  • upgraded Oniguruma to 4.4.4

2006.9.16 (Ver 4.45)

  • add default log filename setting.
    • added new edit control to 'Additional settings' dialog.
    • added LogDefaultName entry in teraterm.ini file.
    • expanded the log filename which can include a format of strftime.
      SYNOPSIS:
%a	Abbreviated weekday name
%A	Full weekday name
%b	Abbreviated month name
%B	Full month name
%c	Date and time representation appropriate for locale
%d	Day of month as decimal number (01 - 31)
%H	Hour in 24-hour format (00 - 23)
%I	Hour in 12-hour format (01 - 12)
%j	Day of year as decimal number (001 - 366)
%m	Month as decimal number (01 - 12)
%M	Minute as decimal number (00 -  59)
%p	Current locale's A.M./P.M. indicator for 12-hour clock
%S	Second as decimal number (00 - 59)
%U	Week of year as decimal number, with Sunday as first day of week (00 - 53)
%w	Weekday as decimal number (0 - 6; Sunday is 0)
%W	Week of year as decimal number, with Monday as first day of week (00 - 53)
%x	Date representation for current locale
%X	Time representation for current locale
%y	Year without century, as decimal number (00 - 99)
%Y	Year with century, as decimal number
%z, %Z	Either the time-zone name or time zone abbreviation, depending on registry settings;
    no characters if time zone is unknown
%%	Percent sign
  • disable automatically connection to serial port on startup when /M command line parameter is specified.
  • updated HTML help document.
  • upgraded TTSSH version supporting SSH2 to 2.33
  • upgraded CygTerm+ to 1.06_08
  • upgraded Oniguruma to 4.4.1

2006.8.19 (Ver 4.44)

  • Bug fix: 'ttpmacro.exe' terminated after startup on Windows98/NT4.0.
  • added the mutex object to ttermpro.exe, ttpmacro.exe, ttpmenu.exe, keycode.exe and cygterm.exe.
  • Changed TeraTerm installer software to InnoSetup.
  • updated HTML help document.
  • upgraded TTSSH version supporting SSH2 to 2.32
  • upgraded CygTerm+ to 1.06_06

2006.8.4 (Ver 4.43)

  • expanded the number of macro variables which can be used as user variable from 241 to 256. This is bug because some variables were used as system variable.
  • expanded the input box dialog of macro. It is resized automatically when the message is long than default size.
  • changed '\n' character not raw character but meta character as LF code.
  • changed the message box of macro from dialog border to re-sizable.
  • set '23' to port number when the host name start with 'telnet://' and port number was not specified.
  • upgraded TTSSH version supporting SSH2 to 2.31
  • upgraded TTProxy to 2006/8/23 version. Special thanks to YebisuyaHompo.

2006.7.26 (Ver 4.42)

  • updated to new TeraTerm icon file(teraterm.ico, vt.ico). Special thanks to Tatsu Sakamoto.
  • upgraded TTSSH version supporting SSH2 to 2.30
  • upgraded LogMeTT to 2.8.5
  • Bug fix: Collector resource English text.

2006.7.24 (Ver 4.41)

  • added time-stamp option on log saving dialog. And also added LogTimestamp entry in teraterm.ini file.
  • upgraded Kantan Installer version to 2.30a. The installer could record the previous installed folder when TeraTerm installation package was upgraded.
  • Bug fix: Collector resource English text.
  • upgraded Oniguruma to 4.2.0

2006.7.19 (Ver 4.40)

  • upgraded both ttermpro.exe and ttpmacro.exe version information.
  • updated HTML help document.
  • upgraded LogMeTT to 2.8.4

2006.7.1 (Ver 4.39)

  • Bug fix: UTF-8 miss decoding when the one byte character(ASCII) comes after the two byte characters.
  • changed Copyright string.

2006.6.23 (Ver 4.38)

  • updated HTML help document.
  • upgraded TTSSH version supporting SSH2 to 2.28

2006.6.18 (Ver 4.37)

  • Bug fix: Title string could not been shown as Japanese character from TeraTerm setup dialog. Special thanks to NAGATA Shinya.
  • upgraded TTSSH version supporting SSH2 to 2.27
  • Bug fix: Collector resource English text.

2006.6.11 (Ver 4.36)

  • upgraded TTSSH version supporting SSH2 to 2.26

2006.5.25 (Ver 4.35b)

  • added 'Collector 3.2.3'(tabbed multi window tool) to TeraTerm installation package. Special thanks to Hiroshi Takahashi.

2006.5.7 (Ver 4.35a)

  • upgraded TTSSH version supporting SSH2 to 2.25

2006.4.7 (Ver 4.35)

  • changed the owner of HTML help file from TeraTerm instance to Windows desktop.
  • upgraded TTSSH version supporting SSH2 to 2.24

2006.4.4 (Ver 4.34)

  • upgraded TTSSH version supporting SSH2 to 2.23

2006.4.1 (Ver 4.33)

  • Bug fix: TeraTerm window flickers though the user doesn't use transparency window.

2006.3.30 (Ver 4.32)

  • upgraded TTSSH version supporting SSH2 to 2.22

2006.3.28 (Ver 4.31)

  • enabled the transparency value of TeraTerm window to immediately changing on Additional settings dialog.
  • Bug fix: The background color of text matches the background color of screen patch. Special thanks to 337.
  • enabled VisualStyle feature on WindowsXP.
  • deleted one millisecond sleep on VT window.
  • changed TeraTerm Help file from .hlp to .chm style.
  • upgraded TTSSH version supporting SSH2 to 2.21
  • upgraded LogMeTT to 2.8.3

2006.3.6 (Ver 4.30)

  • upgraded ttpmacro.exe version information.
  • upgraded TTSSH version supporting SSH2 to 2.20

2006.3.3 (Ver 4.29)

  • added the background color of text matches the background color of screen.
    • added "Always use Normal text's BG" check-box on Window setup dialog.
    • added UseNormalBGColor entry in teraterm.ini file.
    Special thanks to 337.
  • Bug fix: don't work the font copying batch file on Windows9x. Special thanks to Takashi SHIRAI.

2006.2.24 (Ver 4.28)

  • changed the compiler to Visual Studio 2005 Standard Edition.
  • replaced stricmp() to _stricmp().
  • replaced strnicmp() to _strnicmp().
  • replaced strdup() to _strdup().
  • replaced chdir() to _chdir().
  • replaced getcwd() to _getcwd().
  • replaced strupr() to _strupr().
  • deleted compiler warning message for time_t has 64bit size.
  • added the color change on Window setup dialog was in real time done.
  • limited the macro commands displaying on macro window for the speed-up of the macro operation.
  • upgraded TTSSH version supporting SSH2 to 2.19
  • upgraded TeraTerm Menu to 1.0.4
    • fixed build error with VS2005.
    • updated version information in .exe file.
  • upgraded Oniguruma to 4.0.1

2006.2.11 (Ver 4.27)

  • expanded the number of macro variable from 128 to 256 and the number of macro label from 256 to 512.
  • added the workaround about CPU load goes up to 100% using 'pause' macro on TEK active window.
  • deleted 'TeraTerm Menu' under File menu.
  • fixed the flicker phenomenon of TeraTerm window when 'Broadcast Command' is used.
  • changed the accelerator key bind under Setup menu.
  • added 'mpause' macro command. This command enables the macro script to pause the specified time in millisecond.
  • added the sample TTL macro 'mpause.ttl'.
  • added 'random' macro command. This command enables the macro script to generate the random value.
  • added the sample TTL macro 'random.ttl'.
  • upgraded CygTerm to 1.06_02. Special thanks to BabyDaemon.

2006.1.21 (Ver 4.26)

  • added the user confirmation dialog before sending file content with Drag and Drop to TeraTerm window.
  • upgraded LogMeTT to 2.8.1
  • upgraded Oniguruma to 3.9.1

2005.12.13 (Ver 4.25)

  • Bug fix: can't save TeraTerm configuration to ini file without 'teraterm.ini' filename.

2005.12.1 (Ver 4.24)

  • expanded serial connection maximum to COM99.
  • added new serial baud rate(230400, 460800, 921600).
  • upgraded LogMeTT to 2.7.4

2005.11.3 (Ver 4.23)

  • added checking the writable permission if saving teraterm.ini file.
  • changed "Term type" edit box on TCP/IP setup dialog to be always enabled.

2005.10.21 (Ver 4.22)

  • added the system variable from 'groupmatchstr1' to 'groupmatchstr9' which will store the group matched pattern with regular expression.
  • added duplicating Cygwin connection using Alt + D accelerator key.
  • Bug fix: DAKUTEN(the dot marks) might not be correctly shown in UTF-8 for Mac OS X.
  • upgraded TTSSH version supporting SSH2 to 2.18
  • Bug fix: TeraTerm Menu pop-up menu couldn't be shown at right position using multi monitor system. upgraded TeraTerm Menu to 1.03.
  • upgraded LogMeTT to 2.7.2

2005.10.7 (Ver 4.21)

  • expanded scroll range width from 16bit to 32bit.
  • added 'waitregex' macro command. This command enables the macro script to wait the specified keyword with regular expression.
  • added the system variable 'matchstr' which will store the matched pattern with regular expression.
  • added the sample TTL macro 'wait_regex.ttl'.
  • added regular expression library 'Oniguruma' version information on TeraTerm version dialog.

2005.9.5 (Ver 4.20)

  • upgraded TTSSH version supporting SSH2 to 2.17

2005.8.27 (Ver 4.19)

  • Bug fix: division result is invalid in TeraTerm macro script. Special thanks to Takashi SHIRAI.
  • changed not downing ttpmacro.exe process priority with logging
  • upgraded LogMeTT to 2.6.1

2005.7.24 (Ver 4.18)

  • added showing the line number and data of TTL file on macro dialog.
  • Bug fix: DAKUTEN(the dot marks) might not be correctly shown in UTF-8 for Mac OS X.
  • upgraded LogMeTT to 2.5.6

2005.5.29 (Ver 4.17)

  • changed scroll out the current buffer when the cursor position is only located on left-upper screen at receiving <ESC>[J(Clear screen from cursor-position up to end).

2005.5.28 (Ver 4.16)

  • added saving log type(plain text) information to teraterm.ini(LogTypePlainText).
  • added CygTerm settings on Additional settings dialog.
  • added CygTerm settings on Additional settings dialog.
  • added support of selecting several pages(also expansion ans contraction of text area that has been selected). Start selected region is saved with mouse left click. End selected region is saved with Shift + mouse left click.
  • added scroll out the current buffer when TeraTerm clear screen at receiving <ESC>[J.
  • added the workaround of CPU time 100% using TeraTerm macro(insert 100msec sleep after send and sendln).

2005.4.24 (Ver 4.15)

  • added the accelerator key(ALT+Enter) that maximizes TeraTerm window.
  • added saving Eterm look-feel alphablend settings to teraterm.ini file.
  • added changing Eterm look-feel alphablend on/off on Additional settings dialog.
  • fixed the installer problem not copying font file on Windows98. Special thanks to Boris.
  • added TeraTerm License file(license.txt).
  • upgraded macro help file(English version). Special thanks to Boris.
  • upgraded LogMeTT to 2.4.4

2005.4.9 (Ver 4.14)

  • added click-able URL mechanism that mouse pointer overs on URL string. Special thanks to monkey magic. And also added URLColor, EnableClickableUrl entry in teraterm.ini file.
  • added support of escape sequence(ESC[39m:foreground color reset, ESC[49m:background color reset). This support solves the problem that color can't be clear using w3m on screen(1) command. Special thanks to Iwamoto Kouichi.
  • added mouse cursor dynamically changing on Additional settings.
  • added support of click-able URL on TeraTerm version dialog.
  • canceled the limitation that at "Duplicate session" on SSH2 connected communication, TeraTerm always try to connect the server with SSH2 protocol.
  • added SSH auto-login with "Duplicate session".
  • upgraded LogMeTT to 2.4.3

2005.3.31 (Ver 4.13)

  • fixed TeraTerm version information can't be shown in version dialog at second later instance.
  • added the configuration of disabling paste string by clicking mouse right button in teraterm.ini(DisablePasteMouseRButton) and Additional settings dialog.
  • fixed the TeraTerm crashing problem when the sending file size exceeded 20MB with ZMODEM protocol. Special thanks to Thorsten Behrens.
  • upgraded LogMeTT to 2.4.2

2005.3.13 (Ver 4.12)

  • upgraded ttermpro.exe version information from 2.3 to 4.12.
  • fixed the multi-byte problem that the cursor scrolls to upper direction when ZENKAKU(Japanese character) cross the end of line. Special thanks to Iwamoto Kouichi.
  • added TeraTerm title multi-byte character converting EUC-JP to Shift_JIS(CP932).
  • upgraded LogMeTT to 2.1.2

2005.2.22 (Ver 4.11)

  • fixed the problem that log menu doesn't become gray on logging
  • added Eterm look-feel alphablend. Special thanks to AKASI.
  • added support of VisualStyle(WindowsXP)
  • added new Title Format ID(13). i.e, <host/port> - <title> VT/TEK
  • added the show of COM5 over when the caption was displayed
  • added new logging type "plain text" on log saving dialog. If the option is enabled(default), TeraTerm doesn't include ASCII non-display characters in log file. Exceptionally the following characters(HT, CR, LF) include at any mode.
  • added TTProxy(2004/1/22 version) supporting to TELNET/HTTP/SOCK proxy. Special thanks to YebisuyaHompo.
  • added newly LogMeTT 2.02beta. Special thanks to Boris.
  • deleted LogMeIn
  • changed "Additional settings" dialog to tab control dialog
  • changed the setting default file name of logging to "teraterm.log"

2005.1.30 (Ver 4.10)

  • enabled maximum button
  • deleted the accelerator key of TeraTerm Menu and LogMeIn
  • added the setting default file name(log_YYYYMMDD_HHMMSS.txt) of logging
  • added the Broadcast command menu under Control menu
  • added the homepage URL at version dialog
  • fixed the initial directory of "Save setup" dialog at reading teraterm.ini directory
  • added "View Log" menu under File menu
  • added "View Log Editor" text-box on "Additional settings" dialog
  • added the "ViewlogEditor" entry at [Tera Term] section of teraterm.ini
  • upgraded TTSSH version supporting SSH2 to 1.08
  • upgraded TeraTerm Menu supporting SSH2 to 1.02.
    • added Kanji code(/KT=UTF8 /KR=UTF8) of default option
    • added specify of user parameter at SSH auto-login
    • deleted macro specification at SSH auto-login
    • added specify of private-key-file at SSH auto-login

2005.1.10 (Ver 2.3+UTF-8 2.09)

  • fixed the bug of switching back to primary display when changing terminal size on multi display environment. Special thanks to Tsuruhiko Ando.

2005.1.6 (Ver 2.3+UTF-8 2.08)

  • changed the logging dialog type from open-dialog to save-dialog
  • fixed the initial directory of "Save setup" dialog at program directory
  • upgraded TTSSH version supporting SSH2 to 1.07

2005.1.5 (Ver 2.3+UTF-8 2.07h)

  • upgraded TTSSH version supporting SSH2 to 1.06

2004.12.27 (Ver 2.3+UTF-8 2.07g)

  • upgraded TTSSH version supporting SSH2 to 1.05

2004.12.23 (Ver 2.3+UTF-8 2.07f)

  • upgraded TTSSH version supporting SSH2 to 1.04

2004.12.18 (Ver 2.3+UTF-8 2.07e)

  • upgraded TTSSH version supporting SSH2 to 1.03

2004.12.16 (Ver 2.3+UTF-8 2.07d)

  • upgraded TTSSH version supporting SSH2 to 1.02

2004.12.15 (Ver 2.3+UTF-8 2.07c)

  • fixed the attribute of font file in the installed directory
  • added killing the process relation to TeraTerm at installation (using taskkill command)

2004.12.14 (Ver 2.3+UTF-8 2.07b)

  • changed the initial value of scroll buffer size from 400000 to 20000 in the 'teraterm.ini' file.
  • added changing the attribute of font file to ReadOnly.
  • upgraded TeraTerm Menu supporting SSH2 to 1.01. Changed the initial folder path of ttermpro.exe to current directory.

2004.12.11 (Ver 2.3+UTF-8 2.07a)

  • upgraded TTSSH version supporting SSH2 to 1.01

2004.12.8 (Ver 2.3+UTF-8 2.07)

  • renamed "External setup" "Additional settings and removed the dialog to "Setup" menu
  • added "Duplicate session" to "File" menu (add /DUPLICATE option)
  • changed downing ttpmacro.exe process priority only with logging
  • didn't include CR+LF in log file when multiple line has concatenated (as EnableContinuedLineCopy enabled)
  • extended the max line of scroll buffer to 400000 line
  • upgraded TTSSH version supporting SSH2 to 1.00(RTM)
  • added LogMeIn 1.21. It is thankful to Boris Maisuradze.
  • added TeraTerm Menu 0.94r2(+SSH2 support 1.00). It is thankful to Shinpei Hayakawa.
  • in addition, fine bug fix

2004.11.6 (Ver 2.3+UTF-8 2.06)

  • fixed drawing ruled line with DEC special font remains garbage graphics, moreover UTF-8 feature to display only Japanese characters. And also fixed BOLD style of font problem.
  • TeraTerm second later instances can read configuration from teraterm.ini.
  • added drag&drop directory path in teraterm from explorer.
  • rewrote README(English). Special thanks to Boris Maisuradze for his cooperation.

2004.10.25 (Ver 2.3+UTF-8 2.05a)

  • upgraded TTSSH version supporting SSH2 to 1.00alpha4

2004.10.11 (Ver 2.3+UTF-8 2.05)

  • added MFC7.1 runtime library
  • setup environmental variable 'TERATERM_EXTENSIONS' is now ignored, TTSSH is always loaded.
  • fixed UTF-8 encoding of HANKAKU KANA.
  • added /nossh option (fixed problem that doesn't start Cygterm with TTSSH section(Enabled=1) of teraterm.ini file)
  • added SSH2 version TTSSH(1.00alpha2)

2004.9.29 (Ver 2.3+UTF-8 2.04a)

  • changed patch to binary files for distribution
    I replied permission from the TeraTerm original author (Mr.Teranishi). I appreciate.

2004.9.5 (Ver 2.3+UTF-8 2.04)

  • fixed running macro halt problem on logging
  • added "External setup" dialog to "Edit" menu
  • saved ANSI color setting to ini file

2004.8.6 (Ver 2.3+UTF-8 2.03)

  • assigned the accelerator key to Cygwin connection menu to 'Alt + G'
  • added show of the full path in logging dialog
  • added support of users comments that can be included into log file
  • replaced static link to dynamic load of SetLayeredWindowAttributes() API (for NT4.0)
  • replaced WDiff with udm of difference making tool

2004.4.12 (Ver 2.3+UTF-8 2.02)

  • added support of UTF-8 for Mac OS X(HFS+)
  • added feature to display other than Japanese characters (locale and code-page have to be set up)
  • added feature to input other than Japanese characters (link 'imm32.lib')
  • removed BOM(Byte Order Mark) in receive mode
  • In addition, fine bug fix

2004.3.19 (Ver 2.3+UTF-8 2.00a)

  • fixed README file

2004.3.18 (Ver 2.3+UTF-8 2.00)

  • changed original source to IPv6 version (thanks to Mr.J.Kato).
  • added support of translucence window
  • added support of Cygwin connection
  • added support of selecting all buffer
  • added support of different mouse cursor types and their configuration
  • switched from WinSock1.1 to 2.2
  • In addition, fine bug fix

2004.3.13 (Ver 2.3+UTF-8 1.02)

  • reverted host name max-length to 80.
  • added support of UTF-8 for sending

2004.3.9 (Ver 2.3+UTF-8 1.01a)

  • fixed README file
  • checked that SSH is operational with TTSSH 1.5.4 + IPv6 0.81

2004.3.6 (Ver 2.3+UTF-8 1.01)

  • added support of wheel mouse button
  • added "UTF8" value for /KR option of command line
  • powered up UTF-8 conversion (addition referrer table)
  • extended host name max-length from 80 to 1024

2004.3.2 (Ver 2.3+UTF-8 1.00)

  • first release

Tera Term Pro (Original Version)

1998.3.10 (Ver 2.3 & 1.4)

  • Serial ports larger than COM4
  • Baud rate of 14400
  • User shortcut keys "EditCLS", "EditCLB", "ControlOpenTEK" and "ControlCloseTEK".
  • Macro commands "clearscreen", "code2str", "enablekeyb", "filemarkptr", "fileseekback", "filestrseek2", "findclose", "findfirst", "findnext", "getdir", "kmtfinish", "kmtget", "makepath", "sendkcode", "setdir", "setexitcode", "str2code" and "testlink".
  • Macro operator "%".
  • Macro: a comment can be placed in any line.
  • Pass-through printing directly to a port.
  • Special options in the setup file "AutoFileRename", "BackWrap", "Beep", "EnableStatusLine", "MaxComPort", "PassThruDelay", "PassThruPort", "PrnConvFF", "RussPrint" and "TitleFormat".
  • New [Setup] TCP/IP dialog box.
  • History list of hosts.
  • New Russian character sets (CP 866,and ISO 8859-5).
  • New icons.
  • Selecting text in a rectangular region.
  • Executing menu commands by user defined keys.
  • Tera Term extension interface.

1997.7.2 (Ver 2.2)

  • Bug fixes.

1997.6.30 (Ver 2.1)

  • Installer and uninstaller
  • 32-bit versions of TTPMACRO.EXE and KEYCODE.EXE
  • Russian mode
  • "[Edit] Copy table", "[Setup] Load key map" and "[Window]" commands
  • Status line of the VT terminal
  • Pass-through printing
  • ANSI full color
  • New command-line options (/I, /L=<log file>, /LA=<language>, /M=<macro file> and /V)
  • Port number just after a host name in the command line (such as "myhost.mydomain 23")
  • New read-only options in the Tera Term setup file
  • New items in the keyboard setup file
  • Macro execution by pressing a user defined key
  • New command-line options of TTPMACRO (/I and /V)
  • New macro commands

1996.6.7 (Ver 2.0)

  • 32-bit version.

1996.6.7 (Ver 1.3)

  • Telnet break signal.
  • new item in the keyboard setup file (SendBreak=).
  • host name with a port number in the command line (such as "myhost.mydomain:23").
  • comment in the command line.
  • new [Setup] Serial port dialog box.
  • Alt+[mouse right button].

1995.12.18 (Ver 1.2)

  • English mode.
  • Quick-VAN protocols.
  • added a lot of macro commands(control structure, subroutine, include file)
  • changed the mouse operation.
  • scroll buffer on/off
  • added the [Shortcut keys] section in the keyboard configuration file.
  • File transfer directory can be saved.
  • added the command line option(/FD=, /H).
  • added the read-only options (QVLog=, QVWinSize=, ZmodemAuto, BPAuto, VTFontSpace=, HideTitle=).

1995.7.22 (Ver 1.1)

  • added a lot of macro commands(file operation, string operation)
  • Meta Key
  • added the read-only option (ConfirmDisconnect=).
  • Both the log and the file send, and both the log and the protocol transfer can be executed simultaneously.

1995.7.3 (Ver 1.0)

  • ZMODEM and B-Plus protocols.
  • DEC special character set.
  • added bold font supporting.
  • added the exit confirmation while TELNET is connecting.
  • Telnet AYT
  • changed the color setting of the bold/blink attribute.
  • added the "Terminal size = window size" option.
  • added the command line option(/W=, /X=, /Y=, /KR=, /KT=).
  • added the read-only options(XmodemLog=, BPLog=, ZmodemLog=, ZmodemEscCtl=, ZmodemDataLen=, ZmodemWinSize=) in the teraterm.ini file.

1995.4.25 (Ver 0.9)

  • XMODEM protocol.
  • added the 3D dialog box (CTL3D.DLL supporting)
  • added the XTERM sequence (title changing)
  • added support for sending a text file by using file manager drag&drop.
  • Pop-up menu
  • added the bold/blink color setting (bold font was removed).
  • added the ANSI escape sequence (color setting, cursor save and restore)
  • changed the log&file send (binary, append, pause/start).
  • added the log file replay feature.
  • A filename of the keyboard configuration can be specified.
  • added support for the macro command.
  • added the printer font setting(read-only option).
  • added the C1 control character setting(read only option).
  • telnet binary option (read-only option).

1995.2.17 (Ver 0.8)

  • Macro language "Tera Term Language".

1995.1.27 (Ver 0.7)

  • Local echo
  • VT<->TEK auto change enable/disable
  • added the TCP port# setting.
  • telnet enable/disable
  • The TEK and file transfer function is changed to DLL module.
  • TEK color emulation
  • TEK line style
  • F10 key
  • changed the command line option.

1994.10.31 (Ver 0.6)

  • User keys.
  • added the key configuration of the VT200 escape sequence.
  • 'Help' button on dialog box
  • read-only options.

1994.10.3 (Ver 0.5)

  • Kermit protocol.
  • file transfer without protocol.
  • Kanji (JIS).
  • The window size and terminal size are separated.
  • added support for the IME control.
  • added support for the configuration setting.
  • dynamic link libraries
  • added the XWINDOW-style copy&paste.
  • transmit delay (serial port)
  • answerback
  • host list
  • The ".tt" file was removed.
  • changed the command line option.

1994.5.16 (Ver 0.4)

  • Keyboard setup.
  • added support for the TEK copy/paste.
  • added support for the printer function (VT, TEK).
  • added support for the color setting (VT, TEK).
  • added the size setting of the VT screen.
  • telnet NAW option
  • added support for a part of the VT200/300 function.
  • Clear page.
  • Reset terminal.
  • Send break.
  • Reset port.

1994.3.29 (Ver 0.3)

  • Telnet option negotiation.
  • TEK GIN
  • added support for the window caption setting.
  • added support for the font setting.
  • added support for the code-changed setting.
  • added support for the BS key-changed setting.
  • File Open/Save
  • New session
  • Clear buffer (VT)
  • Clear screen (TEK)
  • ".tt" file.

1994.X.X (Ver 0.2)

  • Port setup dialog box.
  • help file.

1994.X.X (Ver 0.1)

  • TCP/IP connection (Winsock).

1994.2.24 (Ver 0.0)

  • Serial port connection.
  • Kanji (SJIS & EUC).
  • VT100 and TEK4010.

TTSSH

2021.6.5 (Ver 2.92)

  • Changes
    • added chacha20-poly1305@openssh.com symmetric key cipher algorithm for SSH2 protocol.
    • added support for the PuTTY private key file format version 3 (PPK3).
  • Bug fixes
    • When the Virtual Store is enabled on Windows Vista or later and the Host key rotation is enabled, the original host key is accidentally deleted from known_hosts file.
    • When the Virtual Store is enabled on Windows Vista or later and the host key type is same but key contents is different, the host key can not be deleted from known_hosts file.
    • When many files are sent in a batch by using D&D's SCP sending, an error occurs.
    • When you resize the VT window or send a break signal immediately after user authentication was completed, connection is closed by server.
    • When system memory is insufficient, invalid signature may be used as correct one well with signature verification by the host key at the time of key exchange.
    • A part of control is always enabled on SSH authentication dialog.
  • Misc
    • upgraded OpenSSL from 1.1.1d to 1.1.1k.

2019.12.7 (Ver 2.91)

  • Changes
    • Changed of indication from "Protocol" to "IP version" and from "UNSPEC" to "AUTO" on New connection dialog.
    • The display timing of the user authentication dialog is changed to display after the known_hosts dialog.
    • The LogLevel entry is added on the Setup dialog.
    • The help button are added on the Setup dialog, Authentication Setup dialog, Forwarding dialog and Key Generator dialog.
    • When the network is disconnected from SSH server side, the known_hosts and user authentication dialog are automatically closed while the dialog is shown.
    • Changed the error message when unable to open local file.
  • Bug fixes
    • The same messages may be included on MessageBox displaying.
    • When the network is disconnected from SSH server side, an application fault may be occurred while known_hosts dialog is shown.
    • SSH1: The /nosecuritywarning option does not work well.
    • The problem is improved in the user authentication dialog that the delay occurs when the focus is moved from the user name to passphrase by using TAB key after entering the user name.
    • When the user name is left blank in the user authentication dialog, the focus may not be moved from the user name to the pull-down menu on the right side with TAB key.
    • Fixed a port forwarding issue that closes the client connection before completing all data transmission.
    • Incorrect process ID is recorded in TTSSH.LOG before connecting.
    • Authentication banner cannot display correctly when banner string contains character other than US-ASCII.
  • Misc
    • upgraded OpenSSL from 1.0.2s to 1.1.1d.

2019.08.31 (Ver 2.90)

  • Bug fixes
    • SSH2: When SSH communication is slow by using port forwarding, an application fault is occurred due to increase memory consumption.
    • SSH2: When SCP transfer dialog is closed, the directory of file transfer setting and the SCP destination path setting may not be updated.
    • SSH2: When SCP transfer is started on Windows 95/98/Me, an application fault occurs.
    • SSH1: When the destination port number is other than 22, an application fault may be occurred after the host key is newly written to known_hosts file.
    • SSH1: The rhosts authentication could not be performed at all.

2019.06.15 (Ver 2.89)

  • Changes
    • Windows logon user name can be configured as the default user name.
      • added the DefaultUserType entry in the teraterm.ini file. The default is 1(Using a specified default user name).
    • added a selector whether to use control characters in the Inputing Password and Passphrase of the authentication dialog.
  • Bug fixes
    • garbage data is added to the CipherOrder and MacOrder settings when saving settings.
    • when echo flag is 1 in the server's authentication information message, password string is masked on the keyboard-interactive authentication dialog.
  • Misc
    • upgraded OpenSSL to 1.0.2s.

2019.02.28 (Ver 2.88)

  • Changes
    • added /ssh-N commandline option to disable a shell session when starting a connection.
    • Default state of bcrypt KDF checkbox on SSH Key generator dialog is changed to on.
  • Bug fixes
    • Can't change password on SSH Change Password dialog when old password is empty string.
  • Misc
    • upgraded OpenSSL to 1.0.2r.

2018.11.30 (Ver 2.87)

  • Misc
    • upgraded OpenSSL to 1.0.2q.

2018.08.31 (Ver 2.86)

  • Bug fixes
    • SSH Forwarding dialog shows incorrect setting after the connection is closed.
  • Misc
    • upgraded OpenSSL to 1.0.2p.

2018.05.31 (Ver 2.85)

  • Changes
    • in /auth= commandline option, accept keyboard-interactive keyword.
  • Bug fixes
    • Can't open normal ssh (shell) session after using ssh subsystem.
  • Misc
    • upgraded OpenSSL to 1.0.2o.

2018.02.28 (Ver 2.84)

  • Changes
    • added support for SSH_MSG_USERAUTH_BANNER SSH message.
      • added the AuthBanner entry in the teraterm.ini file. The default is 1(display to VT window).
    • The minimum group size of the Diffie-Hellman group exchange key exchange method is increased to 2048. (RFC 8270)
      • To change to the previous behavior, set the GexMinimalGroupSize entry in teraterm.ini file to 1024.
  • Bug fixes
    • Application fault is occurred if server proposes a very long string in the algorithm negotiation.
    • When using aes128-gcm@openssh.com or aes256-gcm@openssh.com as symmetric cipher algorithm, connection is terminated if MAC algorithm cannot negotiate.
    • The [SSH SCP] entry of [File] menu can not be disabled on serial connection.
    • When using aes128-gcm@openssh.com or aes256-gcm@openssh.com as symmetric cipher algorithm, un-used MAC algorithm is displayed on "About TTSSH" dialog.
    • The fingerprint of server host key on "About TTSSH" dialog may display unused key by current connection, which is different key method and is of same server.
  • Misc
    • upgraded OpenSSL to 1.0.2n.

2017.11.30 (Ver 2.83)

  • Changes
    • added support for SSH2 symmetric key cipher algorithms:
      • aes128-gcm@openssh.com
      • aes256-gcm@openssh.com
    • added support for SSH2 MAC algorithms:
      • hmac-sha1-etm@openssh.com
      • hmac-sha2-256-etm@openssh.com
      • hmac-sha2-512-etm@openssh.com
      • hmac-ripemd160-etm@openssh.com
      • hmac-md5-etm@openssh.com
      • hmac-sha1-96-etm@openssh.com
      • hmac-md5-96-etm@openssh.com
    • The terminal speed notifies to the server can be changed by setting.
      • added the TerminalSpeed entry in the teraterm.ini file. The default is 38400.
      • The default value of the terminal speed notifies to the server is changed to 38400 bps.
  • Misc
    • upgraded OpenSSL to 1.0.2m.

2017.08.31 (Ver 2.82)

  • Changes
    • added support for the PuTTY format ECDSA private key and Ed25519 private key for SSH2 public key authentication.
    • added support for the SECSH(ssh.com) format ECDSA private key for SSH2 public key authentication.
    • added support for dynamic port forwarding (SOCKS Proxy).
    • Output format of some debug log is changed.
  • Bug fixes
    • The remote-to-local port forwarding which added after connecting to the server does not be enabled on SSH2 connection.
    • When the terminal size is changed, right terminal size (pixel count) is notified to server on SSH1 connection.
    • The SSH_MSG_UNIMPLEMENTED message is not handled correctly.
    • Garbage is output in the debug log.
  • Misc
    • upgraded OpenSSL to 1.0.2l.
    • upgraded PuTTY to 0.70.

2017.05.31 (Ver 2.81)

  • Changes
    • added support for changing the user password when using the password authentication.
    • added support for executing the specified subsystem instead of the shell on connection.
      • added the /ssh-subsystem option at the command line.
    • added the notification feature when remote host uses forwarded agent. (Windows Me or 2000 or later)
  • Bug fixes
    • When agent forwarding is enabled, an application fault is occurred after the remote host sends big packet request.
  • Misc
    • upgraded PuTTY to 0.69.

2017.02.28 (Ver 2.80)

  • Bug fixes
    • When SCP receiving is failed, a local file is removed.
  • Misc
    • upgraded OpenSSL to 1.0.2k
    • upgraded zlib to 1.2.11

2016.11.30 (Ver 2.79)

  • Bug fixes
    • When an Order(CipherOrder, KexOrder, HostKeyOrder, MacOrder, CompOrder) is read from the teraterm.ini file, memory corruption will be occurred.
    • Tera Term(TTSSH) may hang up while a file is receiving by using SCP.
  • Misc
    • upgraded OpenSSL to 1.0.2j

2016.08.31 (Ver 2.78)

  • Changes
    • When the filename includes invalid character by SCP receiving, the character is be replaced to '_'.
    • The default value of ScpSendDir entry is changed from "~/" to ""(empty string).
    • Strictly TTSSH command line can be checked. When a part of options(i.e. /ssh-A) is added with unnecessary character(i.e. /ssh-Axx), the string can not be recognized as an option.

2016.05.31 (Ver 2.77)

  • Changes
    • updated to new TTSSH icon file(ttsecure.ico). Special thanks to Tatsu Sakamoto.
  • Bug fixes
    • The key length of blowfish-ctr symmetric key cipher is changed to 256 bits in accordance with RFC 4344.
    • When all key exchange method are enabled, the latest method can not be used.
    • When the X11 forwarding starts, the connection error will be occurred with error code(WSANO_RECOVERY: 11003).
  • Misc
    • upgraded OpenSSL to 1.0.2h
    • upgraded PuTTY to 0.67

2016.03.05 (Ver 2.76)

  • Changes
    • added support for SSH2 key exchange methods: diffie-hellman-group14-sha256, diffie-hellman-group16-sha512, diffie-hellman-group18-sha512
    • The arc4random() function is changed from OpenSSL'RC4 to ChaCha20 base.
  • Misc
    • upgraded OpenSSL to 1.0.2g

2015.12.01 (Ver 2.75)

  • Changes
    • When the fingerprint of the host key is shown on the known_hosts and the "About TTSSH" dialog, the hash algorithm can be not only MD5, but SHA256.
    • Added support for the ED25519 key by using the host key verifying(SSHFP) of DNS.
    • The key exchange, host key, cipher, MAC and compression method which are not shown in the teraterm.ini file is changed for inserting position in the following:
      • Enabled method by default ... The method is inserted at the end of using methods.
      • Disabled method by default ... The method is inserted at the end of not using methods.
    • The command line option can be quoted from an offset when the '"' is used.
  • Bug fixes
    • The OpenSSH can not read the SSH private key file of the KDF format.
    • When the About TTSSH dialog is shown after the host key is replaced and is rotated, an application fault will be occurred.
  • Misc
    • upgraded PuTTY to 0.66

2015.09.01 (Ver 2.74)

  • Changes
    • added the "Hostkey rotation" entry on the "TTSSH: Setup" dialog box.
    • The host key rotation(derived from OpenSSH 6.8 or later) dialog is changed from MessageBox to DialogBox(same as Security Warning).
    • Minimal size of an acceptable group in a request of Diffie-Hellman group exchange can be specified.
      • added the GexMinimalGroupSize entry in the teraterm.ini file. The default value is 0.
    • The Arcfour series cipher algorithm is disabled by default in the Preferred cipher order.
    • An error number can be included in the error message regarding the X11 port-forwarding failure.
  • Bug fixes
    • added a workaround because the Tera Term 4.87(TTSSH 2.73) can not connect to a part of Cisco devices.
    • When the known_hosts file is updated by the host key rotation, an application fault will be occurred after the fingerprint display of the "About TTSSH" dialog.
  • Misc
    • upgraded OpenSSL to 1.0.2d
    • upgraded PuTTY to 0.65

2015.05.31 (Ver 2.73)

  • Changes
    • added support for the host key rotation(derived from OpenSSH 6.8).
      • added the UpdateHostkeys entry regarding the server public key updating in the teraterm.ini file. The default value is disabled.
    • The /f=, /ssh-f= and /ssh-consume= command option can be read earlier than other option.
    • The group size that the key exchanging of the Diffie-Hellman group exchange method requests is increased to NIST SP 800-57 standards.
  • Bug fixes
    • A user can not connect to the OpenSSH 6.8 server.
    • When the 0(disabled line) is located at the front end of any algorithm(CipherOrder, KexOrder, HostKeyOrder, MacOrder and CompOrder), an application fault is occurred.
    • A command line option after ; can not be recognized as remark.
    • When the filename and password value contains a semicolon(;) by using the session duplication, the semicolon can not be quoted.
  • Misc
    • upgraded PuTTY to 0.64
    • upgraded OpenSSL to 1.0.2a

2015.02.28 (Ver 2.72)

  • Changes
    • When the private key is saved on the SSH key generator dialog, the round number of the bcrypt KDF can be specified.
    • added support for specifying the X11 destination display with the /ssh-X command line option.
      • added the X11Display entry in the teraterm.ini file. The default value is empty.
  • Bug fixes
    • When the private key of the KDF format does not include the passphrase, the public key authentication can not work well.
    • When the private key of the KDF format without passphrase is recorded, the key file is mistakenly encrypted.
  • Misc
    • upgraded OpenSSL to 1.0.2

2014.11.30 (Ver 2.71)

  • Changes
    • Changed the SSH disconnection sequence.
  • Bug fixes
    • When the SSH host key is replaced to another key, an application fault occurs.
  • Misc
    • upgraded OpenSSL to 1.0.1j

2014.08.31 (Ver 2.70)

  • Changes
    • When a file is received by using SCP protocol, the file time-stamp is updated.
    • added the DisablePopupMessage entry to disable the error pop-up message box in the teraterm.ini file.
  • Bug fixes
    • When the SCP receiving procedure is canceled, Tera Term(TTSSH) will stall.
    • When the filename contains the space and bracket characters, the SCP receiving procedure is failed.
    • The SCP procedure can not work well onto the Windows Task Scheduler.
  • Misc
    • upgraded OpenSSL to 1.0.1i

2014.06.01 (Ver 2.69)

  • Changes
    • added support for the key exchange of Curve25519 elliptic curve DH(Diffie Hellman) algorithm.
      • Key Generator supports the ED25519 authentication key.
      • Key Generator supports the bcrypt KDF format of the RSA/DSA/ECDSA private key.
      • added the ED25519 into the Host Key algorithm, and then changed the HostKeyOrder entry in the teraterm.ini file.
    • added the host key's fingerprint and the random art into the "About TTSSH" dialog.
    • TTY option ONLCR can be sent to the remote server.
  • Bug fixes
    • The unencrypted PKCS #8 formatted key can not be read.
    • When the remote host disconnects while the authentication dialog is shown, an application fault occurs.
  • Misc
    • upgraded OpenSSL to 1.0.1g

2014.02.28 (Ver 2.68)

  • Bug fixes
    • The SCP transfer is always aborted when the Tera Term window is minimized.
  • Misc
    • upgraded OpenSSL to 1.0.1f
    • Changed the `T' character of TTSSH icon to blue color.

2013.11.30 (Ver 2.67)

  • Bug fixes
    • When the SSH2 port-forwarding is repeatedly executed, new port-forwarding can not work well.

2013.09.01 (Ver 2.66)

  • Changes
    • SSH SCP: When the scp received directory is changed, the FileDir entry in the teraterm.ini can be updated.
  • Misc
    • upgraded PuTTY to 0.63

2013.05.31 (Ver 2.65)

  • Changes
    • The SSH icon can be specified.
      • added the SSHIcon entry in the teraterm.ini file. The default value is "Default".
      • added the /ssh-icon option at the command line.
  • Bug fixes
    • The PKCS #8 formatted key can not be read.
    • When the "stty stop undef" is defined in the ~/.bashrc, an application fault will be occurred by using SCP sending.
  • Misc
    • upgraded zlib to 1.2.8

2013.02.28 (Ver 2.64)

  • Changes
    • The encryption algorithm is changed from 3DES to AES128 when the SSH2 private key is saved with the passphrase.
  • Misc
    • upgraded OpenSSL to 1.0.1e

2012.12.02 (Ver 2.63)

  • Changes
    • Removed the hmac-sha2-256-96 and hmac-sha2-512-96 of SSH2 HMAC algorithm because these protocol are obsolete. Refer to the RFC6668(OpenSSH 6.1).
    • added support for the PuTTY format and SECSH(ssh.com) format of the private key for SSH2 public key authentication.
    • added some service names of the port number at the SSH Forwarding dialog.
    • The length of the DSA key on the SSH Keygenerator is fixed at 1024 bit because the SSH protocol will support only the 1024 bit officially.
    • changed the TTSSH icon to the green color.
  • Bug fixes
    • SCP sending will be failed for SSH server which the window size is small(Dropbear).
    • The SSH data will be corrupted by SSH2 delay re-transmit bug.
    • When the Java Web Start is used with X11 forwarding, Tera Term and Xming will stall.
    • When the X11 forwarding starts, the connection error will be occurred.

2012.08.31 (Ver 2.62)

  • Changes
    • When the host number is discontinuous value, Tera Term can read the [Hosts] section in the teraterm.ini file.

2012.05.31 (Ver 2.61)

  • Changes
    • The comment of the public key can be specified on the SSH Key Generator dialog.
    • The destination path can be specified on the SSH SCP dialog.
  • Bug fixes
    • added proceeding the debug message(SSH_MSG_DEBUG) from the remote host.
  • Misc
    • upgraded OpenSSL to 1.0.1c
    • upgraded zlib to 1.2.7

2012.02.29 (Ver 2.60)

  • Misc
    • upgraded PuTTY to 0.62
    • upgraded OpenSSL to 1.0.0g
    • upgraded zlib to 1.2.6

2011.12.04 (Ver 2.59)

  • Changes
    • When the SSH version of the TTSSH does not match the server protocol version, a user can not connect.
    • The control characters(^A-^_) can be input as the password string on the key generator dialog.
    • added the SSHFP RR on the Security Warning dialog.
      • added the "Verify hostkey fingerprint by DNS" check-box on the "TTSSH: Setup" dialog box.
  • Bug fixes
    • When the server protocol is 1.99, Tera Term will connect with the SSH2 protocol by using the SSH1 specified protocol.
    • When the transferring display number is an integer other than zero, the X11 forwarding does not work well.
    • When the user authentication is failure, the user name of the authentication dialog will show the default user name instead of the user input name.
    • When the SSHFP verification is enabled and the SSHFP RR does not query, the application fault will occur.
  • Misc
    • upgraded OpenSSL to 1.0.0e

2011.8.31 (Ver 2.58)

  • Changes
    • added Camellia128-CBC, Camellia128-CTR, Camellia192-CBC, Camellia192-CTR, Camellia256-CBC, Camellia256-CTR symmetric key cipher algorithm for SSH2 protocol.
    • added support for SSH2 MAC algorithms: hmac-sha2-256, hmac-sha2-256-96, hmac-sha2-512, hmac-sha2-512-96
    • added the PuTTY version on the "About TTSSH" dialog.
    • removed the random initialization because it takes a long time to connect.
    • The time-stamp of the log file is recorded on the millisecond time scale.
  • Bug fixes
    • When the IPv4 fall-back is occurred, the SSH connection may fail.
    • When the window size change is notified, the right window size(pixel) can be reported.
  • Misc
    • upgraded PuTTY to 0.61

2011.6.26 (Ver 2.57)

  • Changes
    • When the ECDSA key is selected on the SSH key generator dialog, the input box of the key bits is disabled.
    • Some kind of the KEX, host key, MAC and compression algorithm order can be specified in the teraterm.ini file. These entries can be selected on the setup dialog.
      • KexOrder=56743210
      • HostKeyOrder=456230
      • MacOrder=120
      • CompOrder=3210
    • added support for SSH2 MAC algorithms: hmac-sha1-96, hmac-md5-96, hmac-ripemd160@openssh.com
    • added the elapsed time and the transmit speed on the SCP dialog.
    • disabled the SSH SCP menu by not using the SSH connection.
  • Bug fixes
    • Tera Term can not connect to the OpenSSH 5.7 later server by using SSH1 protocol.
    • SSH_MSG_CHANNEL_EXTENDED_DATA(SSH2) packet can not be worked well.
    • When SSH2 channel does not be opened, the application fault will be occurred.
    • When SCP is multiply executed, the procedure will not be worked well.
    • When a file is sending by using SCP and with the packet compression, the application fault will be occurred.

2011.3.5 (Ver 2.56)

  • Changes
    • added support for confirming agent-forwarding request.
    • added support for SSH2 key exchange methods: diffie-hellman-group-exchange-sha256, ecdh-sha2-nistp256, ecdh-sha2-nistp384, ecdh-sha2-nistp521
    • added support for SSH2 host key algorithms: ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, ecdsa-sha2-nistp521
    • added support for SSH2 public key authentication methods: ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, ecdsa-sha2-nistp521
    • When the host key differs from the key included in the ssh_known_hosts file, Tera Term confirms whether a user adds the key instead of replacing.
  • Bug fixes
    • The 2GB over file can not send by using the SCP protocol.
  • Misc
    • upgraded OpenSSL to 1.0.0d

2010.12.7 (Ver 2.55)

  • Changes
    • added support for sending a BREAK signal to the remote host on Control menu - Send break(only useful for SSH2). Also, the sendbreak macro can support it.
    • added support for changing the user password by using the keyboard-interactive method.
    • added command line options for control compression /ssh-C,/ssh-C=,/ssh-c.
  • Bug fixes
    • An application fault may occur when the remote system does not return the SSH2 authentication method.
  • Misc
    • upgraded OpenSSL to 1.0.0b

2010.8.31 (Ver 2.54)

  • Bug fixes
    • SSH cryptographic algorithm 'aes128-cbc' can not be available.
  • Misc
    • upgraded OpenSSL to 1.0.0a

2010.5.31 (Ver 2.53)

  • Changes
    • Specifying the listen address in the port forwarding.
      • removed the configuration that accepts the connection from other hosts.
      • changed command line options.
      • changed SSH Port Forwarding dialog.
    • added 3DES-CTR, Blowfish-CTR and CAST128-CTR symmetric key cipher algorithm for SSH2 protocol.
      • added "C", "D" and "E" to CipherOrder entry in teraterm.ini file.
  • Misc
    • upgraded OpenSSL to 1.0.0
    • upgraded zlib to 1.2.5

2009.11.10 (Ver 2.52)

  • Changes
    • added the "/nosecuritywarning" option. Basically, do not use this option.
  • Bug fixes
    • fixed the problem that the settings of TCPLocalEcho/TCPCRSend are not used after SSH connection was closed.

2009.7.5 (Ver 2.51)

  • Changes
    • added a user can select a folder receiving a file on the SCP dialog.
    • added a dialog that confirms overwriting a file received via SCP.
    • use the default user name when the user name is not specified in autologin mode.
    • added a check box in the SSH Setup dialog box to configure the user password remembering in memory.
    • changed the command line specification for the space character
      • The specification replacing from the space character to the @ one was abolished.
      • A user can specify the "" characters instead of the " character.
  • Bug fixes
    • Some Japanese characters can not use in the host name.
    • TTSSH does not work when the command line option(/FD=, /K=, /M=, /L=, /R=, /W=) includes the space character.
    • The crypt algorithm negotiation would be failure when the SSH2 key exchanges.
    • SCP transfer does not halt when the SCP window is minimized.
  • Misc
    • upgraded OpenSSL to 0.9.8k

2009.3.22 (Ver 2.50)

  • Changes
    • Changes ssh:// URL handling.
      • When a port number is not specified in the URL string, 22 port will be mandatory specified.
      • The percent-encoded user name and password are decoded.
    • added the `user@host' format in the host name of "New Connection" dialog and the command line option.
    • added a keyboard shortcut(&H) on SSH SCP menu.
    • added a SSH key bits edit-box on SSH KeyGenerator dialog.
    • added the progress status while a SSH key is generating.
    • Windows events while generating a SSH key on the SSH KeyGenerator dialog are discarded.
  • Bug fixes
    • When a user does the SCP action twice, TeraTerm will be shut down after receiving SSH2_MSG_CHANNEL_FAILURE.
    • Application fault could occur when the generated key is saved with SSH key generator dialog.
    • When TTSSH about dialog is shown, the application fault occurs on Windows 95.
    • When a user switches the SSH authentication dialog from the host key confirmation dialog, a authentication method is overwritten by the default method value.
  • Misc
    • upgraded OpenSSL to 0.9.8j

2008.12.16 (Ver 2.49)

  • Changes
    • added AES128-CTR, AES192-CTR, AES256-CTR, Arcfour, Arcfour128, Arcfour256 and CAST128-CBC symmetric key cipher algorithm for SSH2 protocol. Security fix: CPNI-957037.
      • added "<", "=", ">", "?", "@", "A" and "B" to CipherOrder entry in teraterm.ini file.
    • added support for agent forwarding.
      • added the check box on SSH Setup dialog.
      • added the check box on SSH Authentication dialog.
      • added //ssh-A and /ssh-a command line option.
  • Bug fixes
    • Bug fix: The general protection fault would occur on SSH1 connection. This bus was introduced in 2.48.
    • Bug fix: When the CheckAuthListFirst is enabled on SSH2 connection, TeraTerm disconnects after pushing the OK button of the dialog before the valid authentication method receives.
    • Bug fix: X11 forwarding does not work when DISPLAY environment variable configures.
    • Bug fix: History check-box has not been enable or disabled on a new connection.
    • Bug fix: A file with the SCP protocol could not send the remote host when the file name includes the space character.

2008.9.23 (Ver 2.48)

  • added support for VisualHostKey feature with OpenSSH 5.1.
  • added a `200' number to LogLevel entry in teraterm.ini file. This logging level enables a user to capture the SSH RAW packet data in a local file.
  • Changed the error message of SSH2 RSA connection when the host key length is too short.
  • Bug fix: TeraTerm would stall when a existing host key replaces on Windows Vista.
  • upgraded OpenSSL to 0.9.8i

2008.6.25 (Ver 2.47)

  • added the destination address of a received file on SSH SCP dialog.
  • added support for port number of ssh_known_hosts file.
  • updated to new TTSSH icon file(ttsecure.ico). Special thanks to Tatsu Sakamoto.
  • Bug fix: memory leak problem
  • Bug fix: The sending file with SCP could be locked.
  • upgraded OpenSSL to 0.9.8h

2008.2.29 (Ver 2.46)

  • added silently ignoring the Protocol Version Exchange line before sending the version string. (RFC4253 compliance)
  • added the user interface for receiving a file on SSH SCP dialog.
    • The source address is fixed in the 'current directory for file transfers'.
    • Directly input the receiving file name
  • added support for the public key authentication with Pageant(an SSH authentication agent for PuTTY, PSCP and Plink).
    • added "pageant" value to "/auth" command line switch.
  • deleted a workaround for application fault when pressing ESC key at "SECURITY WARNING" dialog.

2008.1.15 (Ver 2.45)

  • added support for sending a local file with SSH2 SCP(Secure Copy Protocol). Also, added SSH SCP menu under file menu.
    • The destination address is fixed in the home directory.
    • Not supporting for receive a file.
    • Only support for SSH2 protocol.
    • Not supporting for SFTP(SSH File Transfer Protocol).
  • Bug fix: TCP disconnection was mis-detected in the packet sending. This bug was introduced in in TTSSH 1.01 because SSH heartbeat thread was not thread-safe.
  • Bug fix: SSH is disabled when "/ssh1" or "/ssh2" is included in host name on New Connection dialog.
  • Bug fix: Twice sending SSH2_MSG_SERVICE_REQUEST packet when the user default is not specified and the user authentication method is challenge, /ask4passwd is specified at command line parameter.
  • Bug fix: TIS authentication dialog would not appear when CheckAuthListFirst entry is off and the user authentication method is challenge, /ask4passwd is specified at command line parameter.
  • Bug fix: The user authentication would not work after OK button is pushed when CheckAuthListFirst entry is on and the user input box does not focus.

2007.12.4 (Ver 2.44)

  • added AES192, AES256 and Blowfish symmetric key cipher algorithm for SSH2 protocol.
    • added "9", ":" and ";" to CipherOrder entry in teraterm.ini file.
  • added support for SSH2 delay re-transmit packet when remote_window is not available by using port-forwarding(local-to-remote). X11 applications such as emacs and xterm would not work fine by using Xming server.
  • Modified the feature to invalidate unsupported authentication method.
    • The default value of "CheckAuthListFirst" is changed to Off.
    • Added the feature to configure "CheckAuthListFirst" from a check-box in "SSH Authentication" dialog.
  • Modified the feature in SSH forwarding connection from local to accept connection request from any host other than local host.
    • Added the feature to configure it from a check-box in "SSH Forwarding" dialog.
    • Added the feature to configure it as a command line option of "/ssh-acceptall".
    • Modified to enable it for each forwarding setup from "SSH Forwarding" dialog.
  • Changed for " /ssh", " /nossh", " /telnet" specified as Host in "New connection" dialog to be given priority over "validate/invalidate" of SSH by radio button.
  • Bug fix: TTSSH crashes when all server supports encryption algorithm that is not supported by TTSSH.
  • Bug fix: SSH2 packet was occurred as "Bad packet length". This bug was introduced in TTSSH 2.42.
    • Bug fix: TCP disconnection was mis-detected in the packet sending.
  • Bug fix: A big size packet could not send to the client application by using SSH2 port-forwarding(local-to-remote). This is TTSSH original bug.
  • upgraded OpenSSL to 0.9.8g

2007.10.14 (Ver 2.43)

  • added challenge-response(keyboard-interactive) authentication method to auto-login.
    • added "challenge" value to "/auth" command line switch.
  • Added the feature to invalidate unsupported method prior to the trial of authentication methods.
    • Added "CheckAuthListFirst" entry in TTSSH section of teraterm.ini. The default value is On.
  • Security fix: TeraTerm would temporarily halt server communication for the user confirmation when the server public key tries to add in known_hosts file.
  • add support Ctrl+d, Ctrl+k shortcut key in "Host" drop-down on "New connection" dialog. The former is deleting the character at point and the latter is killing the text from point to the end of the line.
  • upgraded OpenSSL to 0.9.8f

2007.9.30 (Ver 2.42)

  • deleted displaying in-use serial port on "New connection" dialog.
  • deleted using keyboard-interactive authentication when password authentication is selected. And deleted keyboard-interactive check-box on Authentication Setup dialog. You have to choice "challenge/response" to use keyboard-interactive authentication.
  • add support Ctrl+p, Ctrl+n, Ctrl+b, Ctrl+f, Ctrl+a and Ctrl+e shortcut key in "Host" drop-down on "New connection" dialog. Shortcut keys are compatible with up-arrow, down-arrow, left-arrow, right-arrow, Home and End key.
  • Bug fix: TCP disconnection was mis-detected in the packet sending.
  • replaced internal string functions to secure functions.
    • deleted _CRT_SECURE_NO_DEPRECATE build option.

2007.8.8 (Ver 2.41)

  • deleted unconditional login retry with password authentication after keyboard-interactive authentication is failure.
  • added to disable the serial port in New Connection dialog when there is no available COM ports.
  • stopped displaying pop-up error message when port-forward cannot start because already the socket is opening.
  • Bug fix: BOF(Buffer Over Flow) problem at the command line parameter.
  • Bug fix: disconnected SSH connection when a port-forward connection from remote side is fail.
  • Bug fix: socket of SSH channel was not closed when SSH channel cannot open.

2007.5.7 (Ver 2.40)

  • added parsing double-quoted key filename in the command line parameter.
  • Bug fix: When keyboard-interactive authentication enabled with plain password authentication, plain password authentication is displayed with the rhosts authentication in SSH authentication dialog.
  • Bug fix: SSH2 port forwarding memory leak when the channel connection is closed.
  • Bug fix: TTSSH crashes when new channel is not able to be opened.
  • added support for getting the user authentication list on SSH2 connection. TTSSH can try to login with keyboard-interactive method at the first time when the user selected the password authentication.

2007.3.10 (Ver 2.39)

  • added workaround(WinSock) that send() could have been regarded as success when the return value of send() is minus and the return value of WSAGetLastError() is less than WSABASEERR(10000).
  • Moved the focus to passphrase dialog when the user mistook the passphrase of SSH2 private key.
  • upgraded OpenSSL to 0.9.8e

2007.1.22 (Ver 2.38)

  • changed the handling of SSH2_MSG_IGNORE to do nothing. The data from Cisco router seems invalid.
  • Bug fix: TCP disconnection was mis-detected in the packet sending.

2006.11.20 (Ver 2.37)

  • added workaround(SSH_BUG_SIGBLOB) that generating the symmetric key is failure on Extreme Networks switch.

2006.11.1 (Ver 2.36)

  • Bug fix: Could not connect Tectia server with SSH2 protocol. Changed the timing of both MAC and packet compression method are enabled from user authentication to SSH2_MSG_NEWKEYS procedure.
  • Bug fix: Aborted when receiving the stderr data from Tectia server on Windows. Added a procedure for handling SSH2_MSG_CHANNEL_EXTENDED_DATA packet.

2006.10.28 (Ver 2.35)

  • Bug fix: TTSSH settings wasn't read from ini file which is specified by /F parameter of ttermpro.exe. This bug was introduced in 2.34.
  • Bug fix: Couldn't start a telnet session from 'New connection' dialog when main windows is connected with SSH protocol. This bug was introduced in 2.34.
  • Bug fix: invalid freeing DH memory in KEX_DH_GRP1_SHA1 or KEX_DH_GRP14_SHA1 sequence.

2006.10.09 (Ver 2.34)

  • added /ssh1, /ssh2, /telnet command line options.
  • added /ask4passwd command line option.
  • Bug fix: an error occurs at new connection from a window which is port-forwarding.
  • Bug fix: differentiate the case of command line parameter name.
  • Bug fix: parse the filename which includes white space.
  • upgraded OpenSSL to 0.9.8d

2006.9.16 (Ver 2.33)

  • added parsing double-quoted filename in the command line parameter.
  • Bug fix: Free the user password on heap memory after user authentication.
  • upgraded OpenSSL to 0.9.8c

2006.8.9 (Ver 2.32)

  • Bug fix: Title bar didn't use the small(16x16 dot) icon.

2006.8.5 (Ver 2.31)

  • added the check-box on SSH authentication dialog whether the user password string would be stored on heap memory. You can configure the its function enabling flag by "RememberPassword" entry of TTSSH section in the 'teraterm.ini' file.

2006.7.26 (Ver 2.30)

  • updated to new TTSSH icon file(ttsecure.ico). Special thanks to Tatsu Sakamoto.

2006.6.29 (Ver 2.29)

  • Bug fix: Using SSH2 protocol, changes of the TTSSH setup dialog could not feedback on next ssh session. Special thanks to NAGATA Shinya.
  • Bug fix: The 'ssh_known_files' file might not be saved in TeraTerm installation directory. Special thanks to NAGATA Shinya.
  • changed Copyright string.

2006.6.23 (Ver 2.28)

  • added support for SSH2 delayed compression(OpenSSH 4.2 later). Special thanks to NAGATA Shinya.

2006.6.14 (Ver 2.27)

  • Bug fix: TeraTerm enabled SSH compression could not connect to the server when OpenSSH 4.3 later was configured as delay SSH compression.

2006.6.11 (Ver 2.26)

  • Bug fix: Alt key was not available for SSH Port Forward dialog. Special thanks to NAGATA Shinya.
  • Bug fix: Message box dialog doesn't been quickly shown when TeraTerm does not connect to the server for SSH Port Forward dialog.

2006.5.7 (Ver 2.25)

  • upgraded OpenSSL to 0.9.8b

2006.4.7 (Ver 2.24)

  • Bug fix: disconnection of SSH2 protocol after X11 forwarding failure on HP-UX.

2006.4.4 (Ver 2.23)

  • added the user dialog option that delete the old entry in known_hosts file contains the multiple entries including the different host key type. Special thanks to NAGATA Shinya.

2006.3.29 (Ver 2.22)

  • Bug fix: application error when known_hosts file contains the multiple entries including the different host key type.

2006.3.27 (Ver 2.21)

  • added support for known_hosts on SSH2 connection.
  • added showing the server's fingerprint on known_hosts dialog.

2006.3.6 (Ver 2.20)

  • Improved SSH2 communication throughput by changing the window size adjustment.

2006.2.24 (Ver 2.19)

  • changed the compiler to Visual Studio 2005 Standard Edition.
  • replaced stricmp() to _stricmp().
  • replaced strdup() to _strdup().
  • added support for "command=" in authorized_keys file.
  • upgraded OpenSSL to 0.9.8b snapshot

2005.10.21 (Ver 2.18)

  • added the host history check button on connection dialog.
  • upgraded OpenSSL to 0.9.8a

2005.9.5 (Ver 2.17)

  • added minimizing the SSH authentication dialog with auto-login mode only using '/I' option.

2005.8.27 (Ver 2.16)

  • added minimizing the SSH authentication dialog with auto-login mode. Special thanks to Tomoo Takahashi.
  • upgraded zlib to 1.2.3

2005.7.24 (Ver 2.15)

  • added support of SSH2 port forwarding
  • added support of SSH2 packet compression
  • added sending TTY information(VERASE) to server with SSH2 connection.
  • Bug fix: The user can't login to the server since the second times when first user authentication is failed with SSH1 protocol.
  • Bug fix: The accelerator key(Alt + P or Alt + C) doesn't work on connection dialog.
  • upgraded OpenSSL to 0.9.8
  • added the security fix(CAN-2005-2096) to zlib 1.2.2

2005.5.28 (Ver 2.14)

  • added three file filter on private key saving dialog.
  • added zlib version information on "About TTSSH" dialog.

2005.4.24 (Ver 2.13)

  • added SSH key generator dialog(Setup - SSH KeyGenerator).
  • upgraded OpenSSL to 0.9.7g

2005.4.9 (Ver 2.12)

  • added SSH2 channel lookup mechanism for port forwarding.
  • fixed the bug of application fault at DH key re-creation (degradation at TTSSH version supporting SSH2 2.10).
  • added SSH auto-login with "Duplicate session".

2005.3.31 (Ver 2.11)

  • added the accelerator key at 'Use challenge/response to log in' on SSH2 authentication dialog.
  • added the focus COM input box when you open new connection using COM port.
  • added SSH log data(TTSSH.LOG).
  • added NetScreen(HITACHI) workaround. Sending SSH2_MSG_CHANNEL_REQUEST message to server is disabled wantconfirm entry.
  • upgraded OpenSSL to 0.9.7f

2005.3.13 (Ver 2.10)

  • upgraded ttxssh.dll version information from 1.5.4 to 2.10.
  • changed SSH client ID(SSH-2.0-TTSSH/X.XX Win32) including TTSSH version information.
  • added Tru64 UNIX workaround. Special thanks to Miguel.
  • added SSH2 dump logging
  • fixed the bug of being not able to get rid of CR when CR+LF code is included in SSH server ID.
  • changed TTSSH don't send SSH2_MSG_SERVICE_REQUEST to server once the client try to login.
  • changed the default value of [TTSSH] KeyboardInteractive to 0(disabled) because SSH connection is closed by server then the invalid method is used in OpenSSH 4.0. And also the password authentication label of SSH authentication dialog is dynamically changed.
  • added support of challenge/response login on SSH2 connection.

2005.2.22 (Ver 1.09)

  • fixed the SSH2 public key problem that TTSSH can't read the private key file in the directory starting by the dot.
  • added the configuration of HeartBeat(keep-alive), SSH2 keyboard-interactive on TTSSH setup dialog

2005.1.30 (Ver 1.08)

  • added support of keyboard-interactive authentication. You can configure the its authentication enabling flag by "KeyboardInteractive" entry of TTSSH section in the 'teraterm.ini' file.
  • added show of Project Homepage URL and OpenSSL version at "About TTSSH" dialog.
  • fixed the application fault of pushing enter key before be grayed at rhosts and TIS in SSH2 authentication dialog.
  • added support of public-key authentication auto-login. And also added /auth=publickey and /keyfile command line option.

2005.1.6 (Ver 1.07)

  • fixed application fault when changing terminal size on telnet connection (degradation at TTSSH version supporting SSH2 1.06)

2005.1.5 (Ver 1.06)

  • added support of changing terminal size
  • fixed application fault at DH key re-creation (degradation at TTSSH version supporting SSH2 1.05)

2004.12.27 (Ver 1.05)

  • fixed the bug of can't connect the server after disconnecting when 'Auto window close' function is disabled
  • fixed the memory leak of SSH2 KEX procedure
  • upgraded the error message string when reading the SSH2 private key is failure

2004.12.23 (Ver 1.04)

  • added support of public key authentication method

2004.12.18 (Ver 1.03)

  • added checking HMAC at received packet
  • added support of HMAC-MD5 message authentication code
  • added verifying the key of RSA and DSA at KEX procedure

2004.12.16 (Ver 1.02)

  • fixed application fault when using SSH auto-login mode
  • fixed application fault when pressing ESC key at "SECURITY WARNING" dialog

2004.12.11 (Ver 1.01)

  • added support of SSH heartbeat(keep-alive).
    You can configure the heartbeat interval "HeartBeat" entry of TTSSH section in the 'teraterm.ini' file. A measure of heartbeat is per second(default 60 seconds).

2004.12.8 (Ver 1.00)

  • added support of SSH1/SSH2 auto-login (only password authentication). And also added /auth, /username, /passwd options.
  • changed SSH default version to SSH2
  • fixed tab order of connection dialog
  • changed the focus of connection dialog to host name
  • added SSH2 auto-login sample macro(ssh2login.ttl)

2004.11.7 (Ver 1.00 beta1)

  • added support of encryption algorithm AES128
  • added support of KEX algorithm diffie-hellman-group14-sha(OpenSSH 3.9 later version)
  • added support of KEX algorithm diffie-hellman-group-exchange-sha1
  • added support of server host key algorithm ssh-dss
  • added show of SSH2 information in "About TTSSH" dialog
  • upgraded OpenSSL to 0.9.7e
  • rewrote README(English). Special thanks to Boris Maisuradze for his cooperation.

2004.10.25 (Ver 1.00 alpha4)

  • fixed the bug of window size control flow
  • added support of DH key re-creation after data-communication establishment
  • in addition, fine bug fix

2004.10.17 (Ver 1.00 alpha3)

  • added support of window size control flow
  • added send SSH2_MSG_CHANNEL_CLOSE to server on disconnect.
  • terminal type is now passed to the environment variable TERM.

2004.10.11 (Ver 1.00 alpha2)

  • added support of SSH1
  • fixed the bug of suddenly disconnecting SSH session (the message "Oversized packet received from server" was appearing in dialog box)
  • added /1, /2 command line options
  • added SSH protocol version related entry in teraterm.ini file

2004.8.8 (Ver 1.00 alpha1a)

  • replaced DLL release build version

2004.8.5 (Ver 1.00 alpha1)

  • first release

CygTerm+

v1.07_29 2016/11/26 (by maya)

  • Changed the icon image.

v1.07_28 2016/02/17 (by doda)

  • Add debug mode.

v1.07_27 2016/02/09 (by doda)

  • The directory selection by -d option is prior to -cd option(HOME_CHDIR=y).
  • When -d option is specified by using -ls option(LOGIN_SHELL=y), CHERE_INVOKING=y is set.

v1.07_26 2015/12/14 (by doda)

  • Add multiple connections support for the ssh-agent proxy.

v1.07_25 2015/02/21 (by doda)

  • Bug fix: The TERM environment variable can not be configured.

v1.07_24 2013/08/15 (by maya)

  • Support for 64bit Cygwin.

v1.07_23 2011/04/18 (by doda)

  • added the error message when the CygTerm can not move the directory specified by -d option.

v1.07_22 2011/03/03 (by maya)

  • Delete mutex object for running check by installer.

v1.07_21 2011/02/28 (by maya)

  • Add mutex object for running check by installer.

v1.07_20 2010/10/20 (by doda)

  • Security fix: A directory move timing delays by using -d option.

v1.07_19 2010/01/28 (by doda)

  • Accept keyword "AUTO" with '-s' option.

v1.07_18 2010/01/19 (by doda)

  • If '-d' option's parameter contains double quote, delete it.

v1.07_17 2009/06/16 (by doda)

  • Added TELNET SGA/ECHO negotiation.

v1.07_16 2008/11/21 (by doda)

  • The option that enables ssh-agent proxy support is changed from '-a' to '-A'.
  • Added '-a' option that disables ssh-agent proxy support.

v1.07_15 2008/11/01 (by doda)

  • Added ssh-agent proxy support. Using this feature, a user can access Pageant through CygTerm+.
    • Added '-a' option that enables ssh-agent proxy support.

v1.07_14 2007/12/17 (by doda)

  • Added '-o' option that is specifies additional option for terminal emulator.

v1.07_13 2007/08/03 (by maya)

  • Added '-d' option that is specifies the start directory.

v1.07_12 2007/06/10 (by doda)

  • Add 'SOCKET_TIMEOUT' entry which timeout of waiting telnet connection in cygterm.cfg file.

v1.07_11 2007/01/31 (import from cygterm v1.07)

  • Avoid WinMainCRTStartup() redefinition error with gcc 3.4.
  • Give an output gap for keyboard interrupt.

v1.06_11 2006/09/29 (by maya)

  • Stopped using HOME from environment variable and /etc/passwd.
    CygTerm passes HOME which is set by Cygwin. See also /etc/profile
  • Changed the priority of config files.
    command line arguments > ~/.cygtermrc > /etc/cygterm.conf > cygterm.cfg > /etc/passwd

v1.06_10 2006/09/28 (by doda)

  • Use getlogin() instead of environment variable USERNAME to get user name.

v1.06_09 2006/09/25 (by doda)

  • Get shell information from /etc/passwd if SHELL parameter is not specified.

v1.06_08 2006/08/30 (by maya)

  • Changed the priority of config files. cygterm.cfg is top priority config file.

v1.06_07 2006/08/19 (by maya)

  • Use `HOME' environment variable for changing home directory if the variable will be set.

v1.06_06 2006/08/18 (by doda)

  • Limit a parameter length of both '-s' and '-t' option.

v1.06_05 2006/08/18 (by maya)

  • Create mutex object for running check by installer.

v1.06_04 2006/08/15 (by doda)

  • Add 'LOGIN_SHELL' entry which the shell is invoked as the login shell in cygterm.cfg file.
    LOGIN_SHELL: yes | no

v1.06_03 2006/08/15 (by doda)

  • Add 'HOME_CHDIR' entry which home directory is changed in cygterm.cfg file.
    HOME_CHDIR: yes | no

v1.06_02 2006/02/09 (by babydamons@yahoo.co.jp)

  • Generated CygTerm's ICON by "DotWork 2.50".
    "DotWork 2.50" is available at http://www5a.biglobe.ne.jp/~suuta/.
    Special Thanks to "suuta at hamal dot freemal dot ne dot jp"
  • Makefile was changed, "clean" target was changed to don't remove cygterm.ico.

v1.06_01 2006/02/08 (by babydamons@yahoo.co.jp)

  • Import to TeraTerm Project
  • The following configuration file reading was supported:
    • /etc/cygterm.conf
    • ~/.cygtermrc
  • Shell is invoked with user's home-directory.
  • Get account configuration from /etc/passwd by getpwnam(3),
    getting account name from USERNAME environment by getenv(3).
  • Makefile was changed, default build is with icon executable.

v1.06 2004/01/24

  • The following command line options were added:
    • -t 'terminal-emulator' (specifies the terminal emulator)
    • -p port-number (specifies the port# to connect)
    • -dumb (specifies dumb terminal mode)
    • -s 'shell' (specifies the shell)
    • -v 'env-var' (specifies environment variables)
  • Makefile was changed.
    • Fixed to fail in `make install' if BINDIR was not found.
  • cygterm.cc and README.txt were changed to English version.

v1.05 2003/01/14

  • Fixed to transmit Ctrl+SPACE (NUL).
    The NUL character was not able to be transmitted even if Ctrl+SPACE was typed, because it was ignored simply as an way to handle the newline CR+NUL.

v1.04 2002/12/08

  • Changed to display error messages for failure to execute a terminal emulator or a shell.
  • Makefile was changed.
    • do not overwrite cygterm.cfg when `make install'.
    • add the gcc option -fno-exceptions against the GCC-3 link error.

v1.03 2002/07/24

  • Fixed to convert terminal type into lower-case when cygterm received it from a terminal emulator.
    Because some upper-case values such as `ANSI' `VT100' of the environment variable TERM might not be found in terminfo depending on the kind of terminal emulator. (Windows 2000 telnet.exe, etc)

v1.02 2002/07/22

  • Fix to be able to start a terminal emulator even if it was a console application. (Windows 2000 telnet.exe, etc)
    There was a mistake in calling CreateProcess().
  • Fixed to suppress duplicate newline on a shell by canceling LF when a terminal emulator sent CR+LF. (Windows 98 telnet.exe, etc)
  • Embedded the version number in cygterm.exe executable code.
    How to check: $ strings cygterm.exe | grep version

v1.01 2002/07/19

  • Fixed that cygterm did not work with zsh or tcsh. Input was blocked when zsh or tcsh started, because the approach to open the pseudo terminal was not good.

v1.00 2000/12/17

  • The initial version was released.

cyglaunch

2011.6.26 (Ver 1.03)

  • The CygTerm Here does not work well for the root directory.
  • The CygTerm Here does not work well for the UNC path.

2010.12.7 (Ver 1.02)

  • Security fix: The current directory changes to the cyglaunch.exe existing directory, and launches the cygterm.exe program.

2009.3.22 (Ver 1.01)

  • Bug fix: PATH environment variable is truncated to 1024 bytes.

2007.8.8 (Ver 1.00)

  • First release.

TTProxy

2019.12.7 (Ver 1.0.0.26)

  • Bug fixes
    • When the HTTP proxy connection fails and the status code is other than 400,401,403,405,406,407, invalid string is shown in the message box.

2019.08.31 (Ver 1.0.0.25)

  • Changes
    • When the negotiation is failed with SOCKS4 and 5, an error information is added to message.
  • Bug fixes
    • Bug fix: Depending on OS, setup dialog is not working correctly. This bug was introduced in 4.103.
    • Bug fix: When the hostname setting is domain, IPv6 and IPv4 fallback does not work well. And also, when you can not connect to the proxy server, Connection refused dialog is shown three times in a row.
    • Bug fix: When data can not receive from SOCKS server during negotiation with SOCKS4 and 5, the data may not be handled as an error.

2016.11.30 (Ver 1.0.0.24)

  • When an authentication is used on HTTP proxy, Tera Term(TTProxy) will be crashed.
  • When an authentication is used on HTTP proxy, the authentication does not be encoded with base64 protocol.
  • The HTTP proxy connection is changed from HTTP/1.0 to HTTP/1.1.

2016.08.31 (Ver 1.0.0.23)

  • The `-noproxy' option is added at command line. The function is same as `-proxy=none://' option that is disabled proxy configuration.
  • The priority(order) of loading TTX plugin is changed from 0 to 10.

2015.12.01 (Ver 1.0.0.22)

  • The command line option can be quoted from an offset when the '"' is used.

2015.05.31 (Ver 1.0.0.21)

  • The /F= command option can be read earlier than other option.

2014.06.01 (Ver 1.0.0.20)

  • The language file may not be reflected.
  • The SSL-type proxy type can not be shown because the feature can not work well.

2014.02.28 (Ver 1.0.0.19)

  • Bug fix: The command line parameter including space character can not be recognized well.

2011.3.5 (Ver 1.0.0.18)

  • added support for IPv6.
    • Bug fix: The IPv6 address can not be specified at the proxy server.
    • Bug fix: Tera Term can not connect the proxy server with the IPv6 address by the IPv6 protocol.
    • Bug fix: Tera Term can not connect the IPv6 host by using the SOCK5 proxy protocol.
  • change the timing of the name resolution.
    • Bug fix: Tera Term can not connect the host not resolving the domain name by using the HTTP/TELNET proxy protocol.
    • Bug fix: Tera Term will try to resolve the domain name by mistake despite the SOCKS proxy connection.

2010.12.7 (Ver 1.0.0.17)

  • Bug fix: When the port number is specified by the five-figure numeric, the application fault would occur.

2009.11.10 (Ver 1.0.0.16)

  • Bug fix: teraterm didn't connect to server in some cases because of failed to parse a command line parameters.
    changes of version 1.0.0.13 were incomplete.

2008.2.29 (Ver 1.0.0.15)

  • Bug fix: The port number over 32767 could not be available for proxy connection.
  • Bug fix: couldn't close "Setup dialog" by OK button without host name when the type of proxy is NONE.

2007.9.30 (Ver 1.0.0.14)

  • added support for dynamic loading of user interface messages.

2007.5.7 (Ver 1.0.0.13)

  • "protocol://<user<:password>@>proxyserver:proxyport" style parameter became unsupported.
    This style conflicts with TeraTerm parameter style "telnet://server<:port>".

2007.3.8 (Ver 1.0.0.12)

  • fix bug: Japanese resource was used with Windows that is not English.

2007.2.6 (Ver 1.0.0.11)

  • fix bug: url decode/encode was broken.
    teraterm didn't connect to the proxy server via "New connection" dialog, when host/user/pass are included out of [-\.0-9A-Z_a-z].

2006.12.12 (Ver 1.0.0.10)

  • deleted SetThreadLocale with the language which is detected from TeraTerm dialog resource.

2006.11.23 (Ver 1.0.0.9)

  • Bug fix: didn't respond when the style of TearTerm command line parameter is "telnet://host."
    returns the control to TeraTerm if proxy port number is 0.

2006.8.1 (Ver 1.0.0.8)

  • imported the source with permission of original author Yebisuya Sugoroku.

TeraTerm Menu

2021.6.5 (Ver 1.16)

  • The tool chip's text of button for registering to the list are changed to "Register" and "Unregister".
  • Bug fix: The extra "\" character is displayed on the version information.

2017.11.30 (Ver 1.15)

  • When the ttpmenu.ini file is used, the buffer size including whole host setting name is expanded from 2.6KB to 10KB.

2016.11.30 (Ver 1.14)

  • Updated the TeraTerm icon(teraterm.ico).

2015.05.31 (Ver 1.13)

  • When the filename and password value contains a semicolon(;) on SSH connection, the semicolon can not be quoted.

2014.08.31 (Ver 1.12)

  • Bug fix: A program icon in the notification area may not be displayed.

2011.12.04 (Ver 1.11)

  • added support for inputing the control character(^A-^_) as the password.

2011.6.26 (Ver 1.10)

  • Bug fix: Icon resource does not be released.

2009.7.5 (Ver 1.09)

  • added support for changing TTSSH command line specification.

2008.6.25 (Ver 1.08)

  • added support for Pageant.
  • updated to new TeraTerm icon file(teraterm.ico). Special thanks to Tatsu Sakamoto.

2007.12.4 (Ver 1.07)

  • added support for saving TeraTerm Menu configuration from registry to ini file. Touch "ttpmenu.ini" file in "ttpmenu.exe" installation directory when you want to use ini file. However, re-register your configuration manually because the registry database will not be migrated to the ini file. Special thanks to Matsumoto Hiroki.
  • added support for keyboard-interactive authentication(/challenge).
  • Bug fix: extension filters on file dialog didn't work when a message file does not exist.
  • Bug fix: application could not start when the application is specified by relative path.

2007.9.30 (Ver 1.06)

  • added support for dynamic loading of user interface messages.

2007.3.10 (Ver 1.05)

  • Bug fix: pop-up menu was displayed at invalid position on Windows Vista.

2006.2.24 (Ver 1.04)

  • fixed build error with VS2005.

2005.1.30 (Ver 1.03)

  • Bug fix: TeraTerm Menu pop-up menu couldn't be shown at right position using multi monitor system.

2005.1.30 (Ver 1.02)

  • added Kanji code(/KT=UTF8 /KR=UTF8) of default option
  • added specify of user parameter at SSH auto-login
  • deleted macro specification at SSH auto-login
  • added specify of private-key-file at SSH auto-login

2004.12.14 (Ver 1.01)

  • Changed the initial folder path of ttermpro.exe to current directory.

2004.12.8 (Ver 0.94r2)

  • added TeraTerm Menu 0.94r2(+SSH2 support 1.00). It is thankful to Shinpei Hayakawa.

TTX KanjiMenu

2021.6.5 (Ver 0.1.8)

  • UTF-8m setting does not shown in Korean mode.

2016.11.30 (Ver 0.1.7)

  • When Kanji code is changed, internal status regarding Kanji code of Tera Term core is cleared.

2009.7.5 (Ver 0.1.6)

  • added support when the setting of Language is Korean.

2009.3.22 (Ver 0.1.5)

  • added support for changing concurrently both the Recv and the Send.
    • added the UseOneSetting entry in the teraterm.ini file. The default value is off.
  • Bug fix: The menu can not display on Windows 95.

2008.2.29 (Ver 0.1.4)

  • Big fix: couldn't select "Recv: UTF-8m"

2007.8.8 (Ver 0.1.3)

  • linked to LIBCMT.LIB statically for Win98, Me and NT4.0.
  • added checking the valid range to set KanjiCode in shared variable numbers.
  • menu is displayed only when the setting of Language is Japanese.

2007.5.25 (Ver 0.1.2)

  • imported the source with permission of original author Sunao HARA.

TTXAlwaysOnTop

2009.7.5 (Ver 1.01)

  • added support for dynamic loading of user interface messages.

2008.12.16 (Ver 1.00)

  • first release

TTXKCodeChange

2013.02.28 (Ver 1.01)

  • added support for the control sequence to push/pop settings on stack.
  • When the sequence is continuing, a rear sequence will be not worked.

2008.12.16 (Ver 1.00)

  • first release

TTXResizeMenu

2019.12.7 (Ver 1.06)

  • Fixed the access key for the 16th and subsequent entries in the menu.

2018.11.30 (Ver 1.05)

  • added menu id to increase/decrease window size. (for shortcut keys)

2018.08.31 (Ver 1.04)

  • Fixed an issue where TTXResizeMenu can not be loaded on Windows 95/NT4.0.
  • Fixed an issue where TTXResizeMenu is not display on menu on Windows 95/98/Me/NT4.0.

2014.08.31 (Ver 1.03)

  • The maximum size of the screen width and height can be specified as the menu entry.

2013.02.28 (Ver 1.02)

  • increased max height of window from 200 lines to 500 lines.

2010.2.10 (Ver 1.01)

  • Deleted the default menu.

2008.12.16 (Ver 1.00)

  • first release

TTXttyrec

2019.12.7 (Ver 1.04)

  • Bug fix: Unexpected pauses and playback speed changes occur when replaying the editing by Vim.

2017.02.28 (Ver 1.03)

  • added [Replay again] entry under [File] menu that can replay again after one relaying.

2010.2.20 (Ver 1.02)

  • changed the default value of "RecordStartSize" to On.

2009.7.5 (Ver 1.01)

  • added support for displaying the replay speed on the window title. Special thanks to peterprvy.
  • added no-wait mode.
    • added the /ttyplay-nowait command line option.
  • added support for recording the current window size when recording is started. It is recorded as the window size change control sequence.
    • added the RecordStartSize entry in the teraterm.ini file. The default is off.
  • Bug fix: Replay speed changing doesn't work correctly. Special thanks to peterprvy.
  • Bug fix: Can't replay large data segment correctly.

2008.12.16 (Ver 1.00)

  • first release

TTXViewMode

2008.12.16 (Ver 1.00)

  • first release

TTXRecurringCommand

2016.11.30 (Ver 1.05)

  • added new configuration that carriage return can add at end of sending command.

2015.12.01 (Ver 1.04)

  • The command line option can be quoted from an offset when the '"' is used.

2013.11.30 (Ver 1.03)

  • Expanded the command buffer size from 50 byte to 1024 byte.

2011.12.04 (Ver 1.02)

  • added the menu id to enable and disable for the macro command.
  • added support for the reading the configuration file by using the /F= option.

2010.2.10 (Ver 1.01)

  • Changed the minimum value of the sending interval from 10 to 1 second.
  • added support for switching directly the enabling and disabling by the control menu.
  • added support for dynamic loading of user interface messages.

2009.6.30 (Ver 1.00)

  • first release


Differences from 2.3

There are differences between Tera Term(Tera Term 4.58) and Tera Term Pro 2.3 in the following table:

Feature Differences

Content | Tera Term Pro 2.3 | Tera Term
Source code | Opened | Opened
Development tool | Visual C++ 5.0 / Watcom C/C++ 11.0 | Visual Studio 2005[*1]
License | Proprietary[*2] | Modified BSD license[*3]
Icon | Tera Term [*4] | Tera Term [*4]
TTSSH icon | TTSSH | TTSSH [*4]
Maximum COM port | 16 | 256
Serial speed | from 110 to 115200 | from 110 to 921600
Plugin module | Need to setup "TERATERM_EXTENSIONS" environmental variable | No need
Linked library | SSLeay, zlib | OpenSSL(used as the encryption library, but not used as TLS) zlib Oniguruma PuTTY(used for cooperation with Pageant, but not used for communication and terminal emulation)
TTSSH | SSH 1.5 | SSH 1.5 and 2
support SSH protocol | shell, port-forwarding, X11 forwarding | shell, port-forwarding, X11 forwarding, SCP
nonsupport SSH protocol | SFTP, SCP | SFTP
SSH Symmetric key cipher algorithm | 3DES, DES, Blowfish | 3DES-CBC, Blowfish, AES128, AES192, AES256
SSH packet compression | Yes | Yes, and also supports SSH2 delayed compression.
Pageant[*5] collaboration | No | Yes
Japanese character code | EUC-JP/Shift_JIS/JIS | EUC-JP/Shift_JIS/JIS/UTF-8/UTF-8 MAC
Unicode | Not supported | Support single language[*6]
IPv6 | No | Yes
Transparency window | No | Yes
Heart beat[*7] | No | telnet, SSH1 and 2
Maximize window | No | Yes
Scroll Lock key | No | Yes
Prohibit right-clicking | No | Yes
Online help document | WinHelp | HtmlHelp
Clickable URL | No | Yes
Wheel mouse | No | Yes
I18N | No | Yes[*8]
Proxy | No | Yes[*9](HTTP, TELNET, SOCKS4, SOCKS5)
xterm 256 color mode | No | Yes

  • [*1] You can not use Visual Studio 2005 Express Edition because the partial code of source code is MFC(C++).
  • [*2] Without written permission by the author (Takashi Teranishi), you may not distribute modified versions of this package, and may not distribute this package for profit.
  • [*3] Tera Term is distributed under Modified BSD License.
  • [*4] Icon designer is Tatsuhiko Sakamoto.
  • [*5] An SSH authentication agent for PuTTY and WinSCP.
  • [*6] Tera Term can not simultaneously display multi languages because it has not completely implemented as Unicode API. Now Tera Term mutually converts between Unicode(UCS-2) and MBCS. Also, Chinese version Windows can display Chinese characters when you configure the locale for Unicode.
  • [*7] If there is no communication for a long time in NAT network, SSH session may disconnect because the router will clear NAT table.
  • [*8] You can switch the message language by using the language file(lang\*.lng). You need to re-startup Tera Term to active new message language.
  • [*9] Using TTProxy.

Other new features are shown below.

  • ANSI color change and continued-line copy.
  • Changing mouse cursor type.
  • Adding a comment to logging file.
  • Broadcast command feature.
  • Selecting all buffer.
  • Extend the maximum length of the host name.
  • TeraTerm Menu and LogMeTT included.
  • Duplicate session.
  • Extend the maximum byte of Tera Term scroll buffer.
  • Support for a drag-and-drop operation moving the folder from explorer.
  • The second later Tera Term instance can read teraterm.ini file from not the shared memory but disk file system.
  • Support for VisualStyle(WindowsXP).
  • Add new title format.
  • Add new type of log collection.
  • Support for a default log file name(You can use strftime format).
  • Add the wizard generating SSH authentication key.
  • Add CygTerm configuration dialog.
  • Support for having tabs by using Collector.
  • Add scroll through the screen buffer to the back page when <ESC>[J escape sequence is done.
  • Add log reply menu.
  • Add New-line to `LF' type.
  • Add support for selecting a current screen buffer.
  • Add support bash style shortcut key(C-u, C-d, C-k, C-p, C-n, C-b, C-f, C-a, C-a) in "Host" drop-down on "New connection" dialog.

Bug fixes: Tera Term Pro 2.3

  • Tera Term window size could not be changed after the window width is smaller than 84 dot(94 dot on XP LUNA style).
  • BOF(Buffer Over Flow) problem in ttpmacro.exe program, which 256 byte longer command line parameter is specified.
  • BOF(Buffer Over Flow) problem in ttpmacro.exe program when a line of macro is longer than 256 byte.
  • The program of ttermpro.exe can not send the server data to ttpmacro.exe program with DDE transaction.
  • The 'pause' macro command had a time-lag about 1 sec.
  • The macro script might stall with logging mode.
  • The cpu scheduling of Tera Term process could occupy while macro script running.
  • The division operator of macro language does not work.
  • Tera Term would crash when the sending file size exceeded 20MB with ZMODEM protocol.

New keyboard shortcut

Key | Function
ScrollLock | Tera Term window scroll locked or unlocked(toggle)
Alt + Enter | Switch to Tera Term next/prev window
Alt + D | Duplicate session (SSH, telnet only)
Alt + G | Cygwin connection
Left click, Shift + Left click | Select several pages of output from Tera Term window. Or expand ans contract of text area that has been selected.
Shift + Mouse drag | Deleted to support for above key shortcut
Alt + MouseDrag | Select rectangular block of text

New macro command

Command | Feature
connect | has SSH auto login parameters
waitregex | is waitln regular expression version.
ifdefined | can retrieve the type of the variable value.
mpause | can sleep per millisecond.
sprintf | can generate the format string as like printf function of C language.
str2int | can convert a hexadecimal string to a number.
fileread | can read specified byte data from file.
clipb2var | can copy data from the Clipboard.
var2clipb | can copy data to the Clipboard.
random | can generate the random number.
tolower | can translate characters to lowercase.
toupper | can translate characters to uppercase.
break | can exit from within a for or while loop.
inputbox | can specify a default string which the text box contains as default text.
rotateleft | can rotate the 32bit value toward the left per bit.
rotateright | can rotate the 32bit value toward the right per bit.
setenv | can change an environment variable on Tera Term process.
filenamebox | Displays a dialog box prompting user to input a string.
do - loop | Loop control
until - enduntil | Loop control
callmenu | can call Tera Term window menu.
cygconnect | Connects to Cygwin.
scpsend | Sends a file from the host with the SCP protocol.
scprecv | Receives a file from the remote host with the SCP protocol.
getver | Get the version of Tera Term.
setbaud | Causes Tera Term to change speed of COM port.

New teraterm.ini entry

"Tera Term" sections are shown below.

Entry | Feature
UILanguageFile | can specify the I18N language file. The default language is English.
ConnectingTimeout | is disconnection timeout value per second while TCP connecting. Also, this value can be specified at /timeout command line option.
DisablePasteMouseRButton | can disable pasting by right-click.
ConfirmPasteMouseRButton | can require the user to confirm an action before pasting by right-click is carried out.
DisableAcceleratorSendBreak | can disable sending break signal by Alt+B key shortcut.
ANSIColor | can configure ANSI color table.
EnableContinuedLineCopy | can enable concatenating the next line.
MouseCursor | can change the kind of the mouse pointer.
AlphaBlend | can setup the transparency value of Tera Term window.
CygwinDirectory | can specify a folder of Cygwin installation.
ViewlogEditor | can specify an editor program which open a log file.
Locale | can specify a locale for Unicode.
CodePage | can specify code page for Unicode.
UseNormalBGColor | can enable matching a character with a screen for a background color.
KanjiReceive | added "UTF-8" and "UTF-8m" option for Unicode.
KanjiSend | added "UTF-8" option for Unicode. Besides, "UTF-8m" is not necessary because sending procedure is NFC at UTF-8-MAC.
URLColor | can specify the emphasis color of Clickable URL. Actually, it does not work.
EnableClickableUrl | can enable Clickable URL.
LogTypePlainText | can not include control codes in logging file.
LogTimestamp | can insert OS timestamp in the head of the line while log collection doing.
LogDefaultName | can specify the default file name when log collection starts. You can use strftime format.
LogDefaultPath | can specify the default path name when log collection starts.
LogAutoStart | can automatically start log collection when Tera Term connect to remote server.
BroadcastCommandHistory | can record command history of Broadcast Command to teraterm.ini file.
AcceptBroadcast | does not send the command the user input to own window when this option is off.
TitleFormat | added "13", "29", "45" and "61" as format ID.
FileSendFilter | can configure filters of file name on sending dialog.
VTCompatTab | can enable that the tab display at the end of line is VT compatible terminal.
MaxBroadcatHistory | Number for the history of broadcast command
DisableAppKeypad, DisableAppCursor | can disable application keypad/cursor mode.
ClearComBuffOnOpen | Don't clear COM buffer when serial port opening.
Send8BitCtrl | Send C1 (ASCII $80-$9F) control characters.
SelectOnlyByLButton | enables only mouse left-click to select the text by dragging.
TelAutoDetect | controls telnet command detection.
ZmodemRcvCommand | Receive command for ZMODEM
XmodemRcvCommand | Receive command for XMODEM
ConfirmFileDragAndDrop | Confirmation of File Transfer by Drag & Drop
TranslateWheelToCursor | Mouse wheel action in application cursor mode
HostDialogOnStartup | Showing "New Connection" dialog on startup
MouseEventTracking | Mouse tracking mode
KillFocusCursor | Display the cursor even if the window comes out of focus
ConfirmChangePaste | Show the confirmation dialog when the Clipboard includes CR/LF by pasting
MaximizedBugTweak | How to scroll the screen when the window size is maximized

"TTSSH" sections are shown below.

Entry | Feature
CipherOrder | added "7" as 3DES-CBC, "8" as AES128, "9" as AES192, ":" as AES256, ";" as BlowfishBlowfish(SSH2).
ProtocolVersion | can be SSH protocol version.
HeartBeat | can be keep-alive(heart-beat) interval per second.
RememberPassword | can configure whether the password string which the user input will preserve on memory.
CheckAuthListFirst | disables SSH2 unsupported authentication method before trying user authentication.


Components

"Tera Term" includes in the following components.

Tera Term

This is a terminal emulator for supporting telnet, serial and so on.
Displaying UTF-8 and other many features are included.

Original author | T. Teranishi
Current author | TeraTerm Project
License | BSD Style License Please see "License" page for more details.
Copyright | Please see "Copyright" page.
History | Please see "History" page.

TTSSH

This is a plug-in module on Tera Term.
TTSSH can add Secure Shell protocol(both SSH1 and SSH2) on Tera Term. The original TTSSH has developed by Robert O'Callahan.

Original author | Robert O'Callahan
Current author | TeraTerm Project
License | BSD Style License Please see "License" page for more details.
Copyright | Please see "Copyright" page.
History | Please see "History" page.

CygTerm+

This is Cygwin binary module that relays Tera Term and shell on Cygwin. The user can use Cygwin shell using Tera Term.

Original author | NSym
Current author | TeraTerm Project
License | GPL version 2 Please see "License" page for more details.
Copyright | Please see "Copyright" page.
History | Please see "History" page.
Source code | Please see "osdn.net" page.

TTProxy

An add-on module that supports proxy connection.

Original author | Yebisuya Sugoroku
Current author | TeraTerm Project
License | BSD Style License Please see "License" page for more details.
Copyright | Please see "Copyright" page.
History | Please see "History" page.

TeraTerm Menu

A launcher software that supports automatic login.

Original author | S.Hayakawa
Current author | TeraTerm Project
License | BSD Style License Please see "License" page for more details.
Copyright | Please see "Copyright" page.

TTX KanjiMenu

A add-on module that switch kanji-code from menu.

Original author | Sunao HARA
Current author | TeraTerm Project
License | BSD Style License Please see "License" page for more details.
Copyright | Please see "Copyright" page.

LogMeTT

This is a launcher software that supports automatic login, has built-in macro editor.

author | Boris Maisuradze(NeoCom Ltd.)
License&Copyright | Please see "LogMeTT_license.txt" for more details.

Collector

This is Windows standalone application for doing tabbed other application.

author | Hiroshi Takahashi
License&Copyright | Please see "Collector\readme.txt" for more details.


License and Copyright

Contents

Composition Module

  • Tera Term ... 3-clause BSD license
  • TTSSH ... 3-clause BSD license
  • CygTerm+ ... GPL v2
  • TTProxy ... 3-clause BSD license
  • TeraTerm Menu ... 3-clause BSD license
  • TTX KanjiMenu ... 3-clause BSD license
  • Additional plugins ... 3-clause BSD license
  • Collector ... Freeware. Source code is not available.
  • LogMeTT, TTLEditor ... Freeware. Proprietary license. Source code is not available.

Using Library(Source Code)

  • Oniguruma ... 2-clause BSD license
  • SFMT ... 3-clause BSD license
  • OpenSSH ... BSD style license
  • OpenSSL ... Dual(both) license, OpenSSL License(Apache License 1.0) and SSLeay License(4-clause BSD license)
  • zlib ... zlib License
  • PuTTY ... MIT License
  • The reference C implementation of Argon2 ... Creative Commons CC0 1.0 License/Waiver or the Apache License 2.0

Tera Term

License

Copyright (C) 1994-1998 T. Teranishi
(C) 2004-2021 TeraTerm Project
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice,
     this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice,
     this list of conditions and the following disclaimer in the documentation
     and/or other materials provided with the distribution.
  3. The name of the author may not be used to endorse or promote products derived
     from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.

Copyright

  This program is free software. Tera Term is licensed under BSD style license.

  Copyright of original Tera Term Pro belongs to T.Teranishi.
  Copyright of ANSI color change & concatenating multi-line patch belongs to N.Taga.
  Copyright of UTF-8 and SSH2 codes belongs to Yutaka Hirata.
  Copyright of IPv6 version of Tera Term Pro belongs to J.Kato.
  Copyright of Cygterm belongs to NSym.
  Copyright of original TTSSH belongs to Robert O'Callahan.
  Copyright of original TeraTerm Menu to Shinpei Hayakawa.
  Copyright of LogMeTT to Boris Maisuradze.
  Copyright of Eterm lookfeel transparency window belongs to AKASI.
  Copyright of TTProxy to Yebisuya Hompo.
  Copyright of Japanized Tera Term belongs to Yasuhide Takahashi and Taketo Hashii.
  Copyright of Clickable URL to monkey magic.
  Copyright of supporting multi display to Tsuruhiko Ando.
  Copyright of Oniguruma to K.Kosako. Please see Oniguruma-LICENSE.txt for more information about license.
    Oniguruma is linked to this program statically.
  Copyright of SFMT to Mutsuo Saito and Makoto Matsumoto. Please see SFMT-LICENSE.txt for more information about license.
    This program uses the source code of SFMT.
  Copyright of general patch about both Tera Term and TTSSH to NAGATA Shinya.
  Copyright of Tera Term and TTSSH icon file to Tatsuhiko Sakamoto.
  Copyright of HTML help file to Mitsuyasu Ichimura, Masateru KUWATA, Taketo Hashii and Yutaka Hirata.
  Copyright of TTX KanjiMenu Plugin to Sunao HARA.

  This program is provided "as is" without warranties of any kind, either expressed or
  implied, including, but not limited to, the implied warranties of merchantability and fitness
  for a particular purpose. The entire risk as to the quality and performance of the program is
  with you. Should the program prove defective, you assume the cost of all necessary servicing,
  repair or correction. In no event will any copyright holder be liable to you for damages,
  including any general, special, incidental or consequential damages arising out of the use or
  inability to use the program (including but not limited to loss of data or data being rendered
  inaccurate or losses sustained by you or third parties or a failure of the program to operate
  with any other programs).

  URL: https://ttssh2.osdn.jp/
  Project: https://osdn.net/projects/ttssh2/
  forum: http://logmett.com/support-forums
  ML(Japanese): http://www.freeml.com/info/teraterm@freeml.com

  Tera Term Pro(original): http://hp.vector.co.jp/authors/VA002416/
  ANSI color change & concatenating multi-line patch: http://www.sakurachan.org/ml/teraterm/msg00264.html
  IPv6 version Tera Term Pro: http://win6.jp/TeraTerm/index.html
  Eterm lookfeel transparency window patch: http://www.geocities.co.jp/SiliconValley-PaloAlto/4954/av.html
  Oniguruma: https://github.com/kkos/oniguruma

  Special thanks to ...
  - T.Teranishi - author of original Tera Term Pro
    URL: http://hp.vector.co.jp/authors/VA002416/
  - Yutaka Hirata - added UTF-8 and SSH2 support

TTSSH

License

(C)1998-2001 Robert O'Callahan
(C) 2004-2021 TeraTerm Project
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice,
     this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice,
     this list of conditions and the following disclaimer in the documentation
     and/or other materials provided with the distribution.
  3. The name of the author may not be used to endorse or promote products derived
     from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.

Copyright

  This program is freeware. TTSSH is licensed under BSD style license.

  Copyright of original TTSSH belongs to Robert O'Callahan.
  Copyright of TTSSH supporting SSH2 belongs to Yutaka Hirata.
  Copyright of OpenSSL belongs to OpenSSL project. Please see OpenSSL-LICENSE.txt for more information about license.
    OpenSSL is linked to this program statically.
  Copyright of zlib belongs to Greg Roelofs and Jean-loup Gaill. Please see OpenSSL-LICENSE.txt for more information about license.
    zlib is linked to this program statically.
  Copyright of OpenSSH belongs to each developers. Please see OpenSSH-LICENSE.txt for more information.
    This program uses the source code of OpenSSH.
  Copyright of PuTTY belongs to Simon Tatham. Please see PuTTY-LICENSE.txt for more information about license.
    This program uses the source code of PuTTY.
  Copyright of The reference C implementation of Argon2 belongs to Daniel Dinu, Dmitry Khovratovich, Jean-Philippe Aumasson, and Samuel Neves. Please see Argon2-LICENSE.txt for more information about license.
    This program uses the source code of The reference C implementation of Argon2.
  Copyright of TTSSH icon file to Tatsuhiko Sakamoto.

  This program is provided "as is" without warranties of any kind, either expressed or
  implied, including, but not limited to, the implied warranties of merchantability and fitness
  for a particular purpose. The entire risk as to the quality and performance of the program is
  with you. Should the program prove defective, you assume the cost of all necessary servicing,
  repair or correction. In no event will any copyright holder be liable to you for damages,
  including any general, special, incidental or consequential damages arising out of the use or
  inability to use the program (including but not limited to loss of data or data being rendered
  inaccurate or losses sustained by you or third parties or a failure of the program to operate
  with any other programs).

  URL: https://ttssh2.osdn.jp/
  Project: https://osdn.net/projects/ttssh2/
  forum: http://logmett.com/support-forums
  ML(Japanese): http://www.freeml.com/info/teraterm@freeml.com

  Special thanks to ...
  - Robert O'Callahan - author of original TTSSH
  - Yutaka Hirata - added SSH2 support

Technology

TTSSH uses following technologies:
Key exchange method: diffie-hellman-group1-sha1, diffie-hellman-group14-sha1, diffie-hellman-group-exchange-sha1, diffie-hellman-group-exchange-sha256, ecdh-sha2-nistp256, ecdh-sha2-nistp384, ecdh-sha2-nistp521
Public key algorithm of server host key: ssh-rsa1, ssh-dss, ssh-rsa, ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, ecdsa-sha2-nistp521, ssh-ed25519
Encryption algorithm: DES, 3DES, AES(128bit,192bit,256bit), Blowfish(128bit), ARCFOUR(128bit,256bit), CAST-128(128bit). Camellia(128bit,192bit,256bit)
MAC algorithm: hmac-sha1, hmac-md5, hmac-sha1-96, hmac-md5-96, hmac-ripemd160@openssh.com, hmac-sha2-256, hmac-sha2-256-96, hmac-sha2-512, hmac-sha2-512-96
Public key algorithm of public key authentication: ssh-dss, ssh-rsa, ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, ecdsa-sha2-nistp521

CygTerm+

License

Using Cygwin with a terminal emulator.
Copyright (C) 2000-2006 NSym
(C) 2004-2016 TeraTerm Project

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

Copyright

  This program is free software. CygTerm+ is licensed under GPL version 2.
  Please see CygTerm+-LICENSE.txt for more information about GPLv2.

  Copyright of original CygTerm belongs to NSym.
  Copyright of feature expansion belongs to each authors.

  This program is provided "as is" without warranties of any kind, either expressed or
  implied, including, but not limited to, the implied warranties of merchantability and fitness
  for a particular purpose. The entire risk as to the quality and performance of the program is
  with you. Should the program prove defective, you assume the cost of all necessary servicing,
  repair or correction. In no event will any copyright holder be liable to you for damages,
  including any general, special, incidental or consequential damages arising out of the use or
  inability to use the program (including but not limited to loss of data or data being rendered
  inaccurate or losses sustained by you or third parties or a failure of the program to operate
  with any other programs).

  URL: https://ttssh2.osdn.jp/
  Project: https://osdn.net/projects/ttssh2/
  ML(Japanese): http://www.freeml.com/info/teraterm@freeml.com

  Special thanks to ...
  * NSym - author of original CygTerm
    URL: https://googledrive.com/host/0B1s-dM6d6yC4fmhEZ3c0VTNFWEFtV3daUlRGQmFHVnBmVHRybUNnUVliNWktNDRlZ2NnZTQ/index-e.html

TTProxy

License

Copyright (C) 2003-2006 YebisuyaHompo
(C) 2004-2016 TeraTerm Project
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice,
     this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice,
     this list of conditions and the following disclaimer in the documentation
     and/or other materials provided with the distribution.
  3. The name of the author may not be used to endorse or promote products derived
     from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.

Copyright

  This program is free software. TTProxy is licensed under BSD style license.

  Copyright of original TTProxy belongs to Yebisuya Sugoroku.
  Copyright of feature expansion belongs to each authors.

  This program is provided "as is" without warranties of any kind, either expressed or
  implied, including, but not limited to, the implied warranties of merchantability and fitness
  for a particular purpose. The entire risk as to the quality and performance of the program is
  with you. Should the program prove defective, you assume the cost of all necessary servicing,
  repair or correction. In no event will any copyright holder be liable to you for damages,
  including any general, special, incidental or consequential damages arising out of the use or
  inability to use the program (including but not limited to loss of data or data being rendered
  inaccurate or losses sustained by you or third parties or a failure of the program to operate
  with any other programs).

  URL: https://ttssh2.osdn.jp/
  Project: https://osdn.net/projects/ttssh2/
  ML(Japanese): http://www.freeml.com/info/teraterm@freeml.com

  Special thanks to ...
  * Yebisuya Sugoroku - author of original TTProxy
    URL: http://yebisuya.dip.jp/Software/TTProxy/en/

TeraTerm Menu

License

Copyright(C) 1997-2003 S.Hayakawa
(C) 2004-2016 TeraTerm Project
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice,
     this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice,
     this list of conditions and the following disclaimer in the documentation
     and/or other materials provided with the distribution.
  3. The name of the author may not be used to endorse or promote products derived
     from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.

Copyright

  This program is free software. TeraTerm Menu is licensed under BSD style license.

  Copyright of original TeraTerm Menu belongs to S.Hayakawa.

  This program is provided "as is" without warranties of any kind, either expressed or
  implied, including, but not limited to, the implied warranties of merchantability and fitness
  for a particular purpose. The entire risk as to the quality and performance of the program is
  with you. Should the program prove defective, you assume the cost of all necessary servicing,
  repair or correction. In no event will any copyright holder be liable to you for damages,
  including any general, special, incidental or consequential damages arising out of the use or
  inability to use the program (including but not limited to loss of data or data being rendered
  inaccurate or losses sustained by you or third parties or a failure of the program to operate
  with any other programs).

  URL: https://ttssh2.osdn.jp/
  Project: https://osdn.net/projects/ttssh2/
  ML(Japanese): http://www.freeml.com/info/teraterm@freeml.com

  Special thanks to ...
  - S.Hayakawa - author of TeraTerm Menu
    URL(Japanese): http://park11.wakwak.com/~shinpei/freesoft/

TTX KanjiMenu

License

Copyright (C) 2007 Sunao HARA
(C) 2004-2021 TeraTerm Project
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice,
     this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice,
     this list of conditions and the following disclaimer in the documentation
     and/or other materials provided with the distribution.
  3. The name of the author may not be used to endorse or promote products derived
     from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.

Copyright

  This program is free software. TTX KanjiMenu is licensed under BSD style license.

  Copyright of original Sunao HARA belongs to T.Teranishi.

  This program is provided "as is" without warranties of any kind, either expressed or
  implied, including, but not limited to, the implied warranties of merchantability and fitness
  for a particular purpose. The entire risk as to the quality and performance of the program is
  with you. Should the program prove defective, you assume the cost of all necessary servicing,
  repair or correction. In no event will any copyright holder be liable to you for damages,
  including any general, special, incidental or consequential damages arising out of the use or
  inability to use the program (including but not limited to loss of data or data being rendered
  inaccurate or losses sustained by you or third parties or a failure of the program to operate
  with any other programs).

  URL: https://ttssh2.osdn.jp/
  Project: https://osdn.net/projects/ttssh2/
  ML(Japanese): http://www.freeml.com/info/teraterm@freeml.com

  Special thanks to ...
  - Sunao HARA - author of original TTX KanjiMenu
    URL: http://naoh16.seesaa.net/article/35220277.html


Requirements

Supported operating systems:

  • Microsoft Windows 95 (*1) (*2) (*3) (*4)
  • Microsoft Windows 98, 98 Second Edition
  • Microsoft Windows Me
  • Microsoft Windows NT 4.0 SP6 (*2) (*4)
  • Microsoft Windows 2000
  • Microsoft Windows XP
  • Microsoft Windows Vista
  • Microsoft Windows Server 2003, 2003 R2
  • Microsoft Windows Server 2008, 2008 R2
  • Microsoft Windows 7
  • Microsoft Windows 8
  • Microsoft Windows Server 2012
  • Microsoft Windows 8.1
  • Microsoft Windows Server 2012 R2
  • Microsoft Windows 10

NOTE1: Not supporting Microsoft Windows 3.1.
NOTE2: Supporting x64 and IA-64 Windows.(by WOW64)
NOTE3: Tera Term's installer does not support less than Windows 2000(version 4.95 or later).
NOTE4: CygTerm+ is supported on Windows Vista or later(version 4.105 or later). Please build CygTerm+'s source code by using Cygwin for older Windows, if CygTerm+ wants to run on older Windows.
(*1) Windows Sockets2.0 requirement
(*2) Internet Explorer 5 later requirement
(*3) LogMeTT and TTLEditor can not work.
(*4) Tahoma font is recommended.


Emulations

  • DEC VT100 and selected features of VT200/300 [*1]
  • ANSI control sequences, which are not supported by VT100 (color attribute etc.), are also supported.
  • The xterm extension sequences like as the mouse and the 256 color are supported.
  • You can enable or disable the use of bold style font for characters with the bold attribute. You can also set the color to display them.
  • Characters with the blink attribute don't actually blink. Instead, you can set the color with which to display them.
  • Characters with double width/height and VT52 mode are not supported.
  • Tektronix TEK4010

[*1] DEC special font
The line drawing characters by using the Linux TUI(Text User Interface) are controlled as the DEC special font(Tera Special font). The special font is defined as the <ESC>(0 escape sequence, and assigned to the line drawing character from 0140(0x60) to 0176(0x7f).
Reference: Frequently asked questions


Supported Control Functions

C0 Control Character

Hexadecimal | Mnemonic | Description
0x00 | NUL |
0x01 | SOH |
0x02 | STX |
0x03 | ETX |
0x04 | EOT |
0x05 | ENQ | Sends the answerback message.
0x06 | ACK |
0x07 | BEL | Sounds the bell tone.
0x08 | BS | Moves the cursor one character position to the left.
0x09 | HT | Moves the cursor to the next tab stop.
0x0a | LF | Cause a line feed or a new line operation, depending on the setting of line feed/new line mode.
0x0b | VT | Same as LF.
0x0c | FF | Same as LF.
0x0d | CR | Moves the cursor to the left margin on the current line.
0x0e | SO | Maps G1 character set into GL.
0x0f | SI | Maps G0 character set into GL.
0x10 | DLE |
0x11 | DC1 |
0x12 | DC2 |
0x13 | DC3 |
0x14 | DC4 |
0x15 | NAK |
0x16 | SYN |
0x17 | ETB |
0x18 | CAN |
0x19 | EM |
0x1a | SUB |
0x1b | ESC | Introduces an escape sequence.
0x1c | FS |
0x1d | GS |
0x1e | RS |
0x1f | US |

C1 Control Character

Hexadecimal | Equivalent 7-bit control | Mnemonic | Description
0x80 |  | PAD |
0x81 |  | HOP |
0x82 |  | BPH |
0x83 |  | NBH |
0x84 | ESC D | IND | Moves the cursor down one line in the same column.
0x85 | ESC E | NEL | Moves the cursor to the first position on the next line.
0x86 |  | SSA |
0x87 |  | ESA |
0x88 | ESC H | HTS | Sets a horizontal tab stop at the column where the cursor is.
0x89 |  | HTJ |
0x8a |  | VTS |
0x8b |  | PLD |
0x8c |  | PLU |
0x8d | ESC M | RI | Moves the cursor up one line in the same column.
0x8e | ESC N | SS2 | Temporarily maps the G2 character set into GL or GR, for the next graphic character.
0x8f | ESC O | SS3 | Temporarily maps the G3 character set into GL or GR, for the next graphic character.
0x90 | ESC P | DCS | Device Control String. Introduces a DCS Sequence.
0x91 |  | PU1 |
0x92 |  | PU2 |
0x93 |  | STS |
0x94 |  | CCH |
0x95 |  | MW |
0x96 |  | SPA |
0x97 |  | EPA |
0x98 | ESC X | SOS | Start of string. Introduces a SOS Sequence.
0x99 |  | SGCI |
0x9a |  | SCI |
0x9b | ESC [ | CSI | Control Sequence Introducer. Introduces a CSI Sequence.
0x9c | ESC \ | ST | String terminator. Ends a DCS, SOS, OSC, PM and APC sequence.
0x9d | ESC ] | OSC | Operating System Command. Introduces a OSC Sequence.
0x9e | ESC ^ | PM | Privacy Message. Introduces a PM Sequence.
0x9f | ESC _ | APC | Application Program Command. Introduces a APC Sequence .

Escape Sequence

Sequence | Mnemonic | Description
ESC 6 | DECBI | Moves the cursor backward one column. If the cursor is at the left margin, then all screen data within the margins moves one column to the right. The column shifted past the right margin is lost.
ESC 7 | DECSC | Save the following items. - Cursor position - Character attributes (SGR) - GL and GR state - Wrap flag - Origin mode state - Selective erase attribute (DECSCA) - Any single SS2 or SS3 functions sent
ESC 8 | DECRC | Restores the terminal to the state saved by the save cursor (DECSC) function.
ESC 9 | DECFI | Moves the cursor forward one column. If the cursor is at the right margin, then all screen data within the margins moves one column to the left. The column shifted past the left margin is lost.
ESC = | DECKPAM | Using Application Keypad Mode.
ESC > | DECKPNM | Using Normal Keypad Mode.
ESC D | IND | Moves the cursor down one line in the same column.
ESC E | NEL | Moves the cursor to the first position on the next line.
ESC H | HTS | Sets a horizontal tab stop at the column where the cursor is.
ESC M | RI | Moves the cursor up one line in the same column.
ESC N | SS2 | Temporarily maps the G2 character set into GL or GR, for the next graphic character.
ESC O | SS3 | Temporarily maps the G3 character set into GL or GR, for the next graphic character.
ESC P | DCS | Device Control String. Introduces a DCS Sequence.
ESC X | SOS | Start of string. Introduces a SOS Sequence.
ESC Z | DECID | Reports a Terminal ID.
ESC [ | CSI | Control Sequence Introducer. Introduces a CSI Sequence.
ESC \ | ST | String terminator. Ends a DCS, SOS, OSC, PM and APC sequence.
ESC ] | OSC | Operating System Command. Introduces a OSC Sequence.
ESC ^ | PM | Privacy Message. Introduces a PM Sequence.
ESC _ | APC | Application Program Command. Introduces a APC Sequence.
ESC c | RIS | Terminal Full Reset.
ESC g | - | Visible Bell.
ESC n | LS2 | Maps G2 character set into GL.
ESC o | LS3 | Maps G3 character set into GL.
ESC | | LS3R | Maps G3 character set into GR.
ESC } | LS2R | Maps G2 character set into GR.
ESC ~ | LS1R | Maps G1 character set into GR.
ESC SP F | S7C1T | 7-bit control mode.
ESC SP G | S8C1T | 8-bit control mode.
ESC # 8 | DECALN | Fills the complete screen area with 'E'.
ESC $ | Designates character set. (ISO/IEC 2022)
ESC (
ESC )
ESC *
ESC +

CSI Sequence

Sequence | Mnemonic | Description
CSI Ps @ | ICH | Insert Ps space (SP) characters starting at the cursor position. The default value of Ps is 1.
CSI Ps A | CUU | Moves cursor up Ps lines in the same column. The default value of Ps is 1.
CSI Ps B | CUD | Moves cursor down Ps lines in the same column. The default value of Ps is 1.
CSI Ps C | CUF | Moves cursor to the right Ps columns. The default value of Ps is 1.
CSI Ps D | CUB | Moves cursor to the left Ps columns. The default value of Ps is 1.
CSI Ps E | CNL | Moves cursor to the first column of Ps-th following line. The default value of Ps is 1.
CSI Ps F | CPL | Moves cursor to the first column of Ps-th preceding line. The default value of Ps is 1.
CSI Ps G | CHA | Moves cursor to the Ps-th column of the active line. The default value of Ps is 1.
CSI Ps1 ; Ps2 H | CUP | Moves cursor to the Ps1-th line and to the Ps2-th column. The default value of Ps1 and Ps2 is 1.
CSI Ps I | CHT | Moves cursor to the Ps tabs forward. The default value of Ps is 1.
CSI Ps J ED Erase in display. The default value of Ps is 0.
Ps = 0      Erase from cursor through the end of the display.
   = 1      Erase from the beginning of the display through the cursor.
   = 2      Erase the complete of display.
CSI Ps K EL Erase in line. The default value of Ps is 0.
Ps = 0      Erase from the cursor through the end of the line.
   = 1      Erase from the beginning of the line through the cursor.
   = 2      Erase the complete of line.
CSI Ps L | IL | Inserts Ps lines, starting at the cursor. The default value of Ps is 1.
CSI Ps M | DL | Deletes Ps lines in the scrolling region, starting with the line that has the cursor. The default value of Ps is 1.
CSI Ps P | DCH | Deletes Ps characters from the cursor position to the right. The default value of Ps is 1.
CSI Ps S | SU | Scroll up Ps lines. The default value of Ps is 1.
CSI Ps T | SD | Scroll down Ps lines. The default value of Ps is 1.
CSI Ps X | ECH | Erase Ps characters, from the cursor position to the right. The default value of Ps is 1.
CSI Ps Z | CBT | Moves cursor to the Ps tabs backward. The default value of Ps is 1.
CSI Ps ` | HPA | Moves cursor to the Ps-th column of the active line. The default value of Ps is 1.
CSI Ps a | HPR | Moves cursor to the right Ps columns. The default value of Ps is 1.
CSI Ps b | REP | Repeat the last output character Ps times. The default value of Ps is 1.
CSI Ps c DA Primary Device Attribute. The default value of Ps is 0.
Ps = 0    Asks for the terminal's architectural class and basic attributes.
Response: Depends the Terminal ID setting.
  VT100     ESC [ ? 1 ; 2 c
  VT100J    ESC [ ? 5 ; 2 c
  VT101     ESC [ ? 1 ; 0 c
  VT102     ESC [ ? 6 c
  VT102J    ESC [ ? 15 c
  VT220J    ESC [ ? 62 ; 1 ; 2 ; 5 ; 6 ; 7 ; 8 c
  VT282     ESC [ ? 62 ; 1 ; 2 ; 4 ; 5 ; 6 ; 7 ; 8 ; 10 ; 11 c
  VT320     CSI ? 63 ; 1 ; 2 ; 6 ; 7 ; 8 c
  VT382     CSI ? 63 ; 1 ; 2 ; 4 ; 5 ; 6 ; 7 ; 8 ; 10 ; 15 c
  VT420     CSI ? 64 ; 1 ; 2 ; 7 ; 8 ; 9 ; 15 ; 18 ; 21 c"
  VT520     CSI ? 65 ; 1 ; 2 ; 7 ; 8 ; 9 ; 12 ; 18 ; 19 ; 21 ; 23 ; 24 ; 42 ; 44 ; 45 ; 46 c
  VT525     CSI ? 65 ; 1 ; 2 ; 7 ; 9 ; 12 ; 18 ; 19 ; 21 ; 22 ; 23 ; 24 ; 42 ; 44 ; 45 ; 46 c
CSI Ps d | VPA | Move to the corresponding vertical position (line Ps) of the current column. The default value of Ps is 1.
CSI Ps e | VPR | Moves cursor down Ps lines in the same column. The default value of Ps is 1.
CSI Ps1 ; Ps2 f | HVP | Moves cursor to the Ps1-th line and to the Ps2-th column. The default value of Ps1 and Ps2 is 1.
CSI Ps g TBC Clears the tab stop. The default value of Ps is 0.
Ps = 0      Clears the tab stop at the cursor.
   = 3      Clears all tab stops.
CSI Pm h | SM | Sets mode. (See Modes (Standard))
CSI Pm i MC Printing mode.
Ps = 0      Print screen.
   = 4      Turn off printer controller mode.
   = 5      Turn on printer controller mode.
CSI Ps j | HPB | Moves cursor to the left Ps columns. The default value of Ps is 1.
CSI Ps k | VPB | Moves cursor up Ps lines in the same column. The default value of Ps is 1.
CSI Pm l | RM | Resets mode. (See Modes (Standard))
CSI Pm m | SGR | Select character attributes. The default value of Pm is 0. (See Character Attributes.)
CSI Ps n DSR Reports device status.
Ps = 5      Requests the terminal's operation status report. Always returns "CSI 0 n" (Terminal ready).
            Response: CSI s n
            s = 0    Terminal ready.
   = 6      Requests cursor position report. (CPR)
            Response: CSI r ; c R
              r    Line number.
              c    Column number.
CSI Ps1 ; Ps2 r DECSTBM Set top and bottom margins.
Ps1    Line number for the top margin.
       The default value is 1.
Ps2    Line number for the bottom margin.
       The default value is current number of lines per screen.
CSI s | SCP | Save cursor position. Same as DECSC. SCP only works when DECLRMM is reset.
CSI Ps1 ; Ps2 s DECSLRM Set left and right margins. DECSLRM only works when DECLRMM is set.
Ps1    Column number for the left margin.
       The default value is 1.
Ps2    Column number for the right margin.
       The default value is current number of columns per screen.
CSI Ps1 ; Ps2 ; Ps3 t (DECSLPP) Window manipulation.
Ps1 =  1    De-iconify window.
    =  2    Minimize window.
    =  3    Move window to [Ps2, Ps3].
    =  4    Resize window to height Ps2 pixels and width Ps3 pixels.
    =  5    Raise the window to the top of the stacking order.
    =  6    Lower the window to the bottom of the stacking order.
    =  7    Refresh window.
    =  8    Resize window to Ps2 lines and Ps3 columns.
    =  9    Change maximize state of window.
            Ps2 = 0    Restore maximized window.
                = 1    Maximize window.

    = 10    Change full-screen state of window. Currently use the window maximizing instead.
            Ps2 = 0    Undo full-screen mode.
                = 1    Change to full-screen.
                = 2    Toggle full-screen.

    = 11    Reports window state.
            Response: CSI s t
              s = 1    Normal. (non-iconified)
                = 2    Iconified.

    = 13    Reports window position.
            Ps2 = Omitted, 0, 1
                       Reports whole window position.
                = 2    Reports text area position.
            Response: CSI 3 ; x ; y t
              x    X position of window.
              y    Y position of window.

    = 14    Reports window size in pixels.
            Ps2 = Omitted, 0, 1
                       Reports text area size.
                = 2    Reports whole window size.
            Response: CSI 4 ; y ; x t
              y    Window height in pixels.
              x    Window width in pixels.

    = 15    Reports root window size in pixels.
            Response: CSI 5 ; y ; x t
              y    Root window height in pixels.
              x    Root window width in pixels.

    = 16    Reports character size in pixels.
            Response: CSI 6 ; y ; x t
              y    character height in pixels.
              x    character width in pixels.

    = 18    Reports terminal size in characters.
            Response: CSI 8 ; y ; x t
              y    Terminal height in characters. (Lines)
              x    Terminal width in characters. (Columns)

    = 19    Reports root window size in characters.
            Response: CSI 9 ; y ; x t
              y    Root window height in characters.
              x    Root window width in characters.

    = 20    Reports icon label.
            Response: OSC L title ST
              title    icon label. (window title)

    = 21    Reports window title.
            Response: OSC l title ST
              title    Window title.
    = 22    Save window title on stack.
            Ps2 = 0, 1, 2    Save window title.
    = 23    Restore window title from stack.
            Ps2 = 0, 1, 2    Restore window title.
CSI u | RCP | Restore cursor position. Same as DECRC.
CSI < r | TTIMERS | Restore IME open state.
CSI < s | TTIMESV | Save IME open state.
CSI < Ps t TTIMEST Change IME open state. The default value of Ps is 0.
Ps = 0      Close IME.
   = 1      Open IME.
CSI = Ps c DA3 (Tertiary DA) Tertiary Device Attribute. The default value of Ps is 0.
Ps = 0      Tertiary Device Attribute request.
            Response: DCS ! | dddddddd ST
              dddddddd  Terminal Unique ID
CSI > Ps c DA2 (Secondary DA) Secondary Device Attribute. The default value of Ps is 0.
Ps = 0      Secondary Device Attribute request.
            Response: CSI > 32 ; 331 ; 2 c
CSI > 3 ; Ps1 ; Ps2 ; Ps3 ; Ps4 J - Erase rectangular area.
Ps1   Top-line border.
Ps2   Left-column border.
Ps3   Bottom-line border.
Ps4   Right-column border.
CSI > 3 ; Ps1 ; Ps2 K - Erase characters from Ps1 column through Ps2 column.
CSI > 5 ; Ps K -
Ps = 3..6   Draw Line
   = 12     Set foreground color
CSI ? Ps J DECSED Selective erase in display. DECSED only erase characters defined as erasable by the DECSCA control function. The default value of Ps is 0.
Ps = 0      Erase from cursor through the end of the display.
   = 1      Erase from the beginning of the display through the cursor.
   = 2      Erase the complete of display.
CSI ? Ps K DECSEL Selective erase in line. DECSEL only erase characters defined as erasable by the DECSCA control function. The default value of Ps is 0.
Ps = 0      Erase from the cursor through the end of the line.
   = 1      Erase from the beginning of the line through the cursor.
   = 2      Erase the complete of line.
CSI ? Pm h | DECSET | Sets DEC/xterm specific mode. (See Modes (DEC/xterm specific).)
CSI ? Pm i DECMC Printing mode.
Pm =  1     Print cursor line.
   =  4     Disables auto-print mode.
   =  5     Enables auto-print mode.
CSI ? Pm l | DECRST | Resets DEC/xterm specific modes. (See Modes (DEC/xterm specific).)
CSI ? Ps n DECDSR Reports device status.
Ps = 55     Reports locator device status. Always returns "CSI ? 50 n" (Locator ready).
            Response: CSI ? s n
              s = 50    Locator ready.
CSI Ps SP q DECSCUSR Sets cursor style. The default value of Ps is 0.
Ps = 0,1    Block cursor / Blink
   = 2      Block cursor / Steady
   = 3      Underline cursor / Blink
   = 4      Underline cursor / Steady
   = 5      Vertical line cursor / Blink
   = 6      Vertical line cursor / Steady
CSI ! p | DECSTR | Soft reset
CSI Ps1 ; Ps2 " p DECSCL Select terminal's conformance level.
Ps1 = 61    VT-Level 1 (VT100 mode)
    = 62    VT-Level 2 (VT200 mode)
    = 63    VT-Level 3 (VT300 mode)
    = 64    VT-Level 4 (VT400 mode)
    = 65    VT-Level 5 (VT500 mode)

Ps2 = 0     8 bit mode (S8C1T)
    = 1     7 bit mode (S7C1T)
    = 2     8 bit mode (S8C1T)
CSI Ps " q DECSCA Select character protection attribute. Selective erase control functions (DECSED, DECSEL and DECSERA) can only erase characters defined as erasable.
Ps = 0      Not protected. DECSED, DECSEL and DECSERA can erase characters.
   = 1      Protected. DECSED, DECSEL and DECSERA cannot erase characters.
   = 2      Same as 0.
CSI Ps $ p (Standard)
CSI ? Ps $ p (DEC/xterm) 		DECRQM Request Standard or DEC/xterm specific mode to terminal.
Ps: Mode number to request.
Response: CSI Ps1 ; Ps2 $ y     -- Standard Mode
          CSI ? Ps1 ; Ps2 $ y   -- DEC/xterm Extended Mode
  Ps1   Requested mode number
  Ps2 = 0    Mode not recognized
      = 1    Set
      = 2    Reset
      = 3    Permanently set
      = 4    Permanently reset
CSI Ps1 ; Ps2 ; Ps3 ; Ps4 $ z DECERA Erase rectangular area. The default value of Ps1 - Ps4 is current cursor position.
Ps1   Top-line border.
Ps2   Left-column border.
Ps3   Bottom-line border.
Ps4   Right-column border.
CSI Ps1 ; Ps2 ; Ps3 ; Ps4 $ { DECSERA Selective erase rectangular area. DECSERA only erase characters defined as erasable by the DECSCA control function. The default value of Ps1 - Ps4 is current cursor position.
Ps1   Top-line border.
Ps2   Left-column border.
Ps3   Bottom-line border.
Ps4   Right-column border.
CSI Ps $ } DECSASD Moves cursor from/to status line. The default value of Ps is 0.
Ps = 0      Moves to main screen.
   = 1      Moves to status line.
CSI Ps $ ~ DECSSDT Select the type of status line displayed. The default value of Ps is 0.
Ps = 0      No status line.
     1      No status line.
     2      Host-writable status line.
CSI Ps1 ; Ps2 ; Ps3 ; Ps4 ' w DECEFR Enables filter rectangle for locator report.
Ps1   Top boundary of filter rectangle.
Ps2   Left boundary of filter rectangle.
Ps3   Bottom boundary of filter rectangle.
Ps4   Right boundary of filter rectangle.
Filter rectangles are always treated as "one-shot" events. Anytime the locator is detected to be outside a filter rectangle, an outside rectangle event is generated and the rectangle is disabled.
CSI Ps1 ; Ps2 ' z DECELR DEC locator reporting mode.
Ps1 = 0     Disables locator report.
    = 1     Enables locator report.
    = 2     One shot (allow one report, then disable).
Ps2 = 0     Character mode. Same as 2.
    = 1     Pixel mode. Reporting unit is device physical pixels.
    = 2     Character mode. Reporting unit is character cells.
CSI Pm ' { DECSLE Select the locator event.
Pm = 0      Disables button up/down events, Disables filter rectangle.
   = 1      Enables button down event.
   = 2      Disables button down event.
   = 3      Enables button up event.
   = 4      Disables button up event.
CSI ' | DECRQLP Requests locator report.
Response: CSI Pe ; Pb ; Pr ; Pc ; Pp & w
Pe: Event code.
Pe =  0    Received a locator report request (DECRQLP), but the locator is unavailable.
   =  1    Received a locator report request (DECRQLP).
   =  2    Left button down.
   =  3    Left button up.
   =  4    Middle button down.
   =  5    Middle button up.
   =  6    Right button down.
   =  7    Right button up.
   =  8    Button 4 down. (not supported)
   =  9    Button 4 up. (not supported)
   = 10    Locator outside filter rectangle.

Pb: Button code, ASCII decimal 0-15 indicating which buttons are down if any.
    The state of the four buttons on the locator correspond to the low four
    bits of the decimal value, "1" means button depressed.
  1    Right button.
  2    Middle button.
  4    Left button.
  8    Button 4. (not supported)

Pr: Row coordinate.

Pc: Column coordinate.

Pp: Page. Always 1.

Modes (Standard)

Mode No. | Mnemonic | Set (SM) | Reset (RM)
2 | KAM | Locks the keyboard. | Unlocks the keyboard.
4 | IRM | Insert mode. | Replace mode.
12 | SRM | Local echo off. | Local echo on.
20 | LNM | New line mode. - Cursor moves to the first column of the next line when the terminal receives an LF, FF or VT character. - New-line (Transmit) setting is changed to "CR+LF". | Line feed mode. - Cursor moves to the current column on the next line when the terminal receives an LF, FF or VT character. - New-line (Transmit) setting is changed to "CR".
33 | WYSTCURM | Steady cursor. | Blinking cursor.
34 | WYULCURM | Underline cursor. | Block cursor.

Modes (DEC/xterm specific)

Mode No. | Mnemonic | Set (DECSET) | Reset (DECRST)
1 | DECCKM | Application cursor keys. | Normal cursor keys.
3 | DECCOLM | 132 column mode. | 80 column mode.
5 | DECSCNM | Reverse video mode. | Normal video mode.
6 | DECOM | Enable origin mode. - The home cursor position is at the upper-left corner of the screen, with in the margins. - The starting point for line numbers depends on the current top margin setting. - The cursor cannot move outside of the margins. | Disables origin mode. - The home cursor position is at the upper-left corner of the screen. - The starting point for line numbers independent of the margins. - The cursor can move outside of the margins.
7 | DECAWM | Enables autowrap mode. | Disables autowrap mode.
8 | DECARM | Auto-repeat keys. | No auto-repeat keys.
9 | XT_MSE_X10 | Enables X10 mouse tracking. Send mouse X & Y on button press. | Disables mouse tracking.
12 | XT_CBLINK | Blinking cursor. | Steady cursor.
19 | DECPEX | Set print extent to full screen. | Limit print to scrolling region.
25 | DECTCEM | Show cursor. | Hide cursor.
38 | DECTEK | Switch to TEK window. | Do nothing.
47 | XT_ALTSCRN | Switch to alternate screen buffer. | Switch to normal screen buffer.
59 | DECKKDM | Kanji terminal mode. | Katakana terminal mode.
66 | DECNKM | Application keypad mode. | Numeric keypad mode.
67 | DECBKM | Backspace key sends BS. | Backspace key sends DEL.
69 | DECLRMM | Enable left and right margins. DECSLRM can set margins. SCP cannot save cursor position. | Disable left and right margins. DECSLRM cannot set margins. SCP can save cursor position.
1000 | XT_MSE_X11 | Enables normal mouse tracking. Send mouse X & Y on button press and release. | Disables mouse tracking.
1002 | XT_MSE_BTN | Enables button-event mouse tracking. Essentially same as normal mouse tracking mode, but also reports button-motion event. | Disables mouse tracking.
1003 | XT_MSE_ANY | Enables any-event mouse tracking. Same as button-event mode, except that all motion events are reported, even if no mouse button is down. | Disables mouse tracking.
1004 | XT_MSE_WIN | Enables focus reporting mode. | Disables focus reporting mode.
1005 | XT_MSE_UTF | Enables xterm (UTF-8) style extended mouse reporting format. | Disables extended mouse reporting format.
1006 | XT_MSE_SGR | Enables xterm (SGR) style extended mouse reporting format. | Disables extended mouse reporting format.
1015 | - | Enables rxvt-unicode style extended mouse reporting format. | Disables extended mouse reporting format.
1047 | XT_ALTS_47 | Switch to alternate screen buffer. | Clear screen, and switch to normal screen buffer.
1048 | XT_ALTS_48 | Save cursor position. | Restore cursor position.
1049 | XT_EXTSCRN | Save cursor position, switch to alternate screen buffer, and clear screen. | Clear screen, switch to normal screen buffer, and restore cursor position.
2004 | RL_BRACKET | Enables Bracketed paste mode. | Disables Bracketed paste mode.
7727 | - | Enables Application Escape mode. | Disables Application Escape mode.
7786 | - | Enables mouse wheel - cursor key translation. | Disables mouse wheel - cursor key translation.
8200 | TTCTH | Move cursor to home when erase the complete of display (ED 2). | Don't move cursor when erase the complete of display (ED 2).

Character Attributes. (SGR)

No. | Attribute
0 | Normal
1 | Bold
4 | Underlined
5 | Blink
7 | Inverse
22 | Normal (neither bold nor faint)
24 | Not underlined
25 | Steady (not blinking)
27 | Positive (not inverse)
30 | Set foreground color to Black. (Color No. 0)
31 | Set foreground color to Red. (Color No. 1)
32 | Set foreground color to Green. (Color No. 2)
33 | Set foreground color to Yellow. (Color No. 3)
34 | Set foreground color to Blue. (Color No. 4)
35 | Set foreground color to Magenta. (Color No. 5)
36 | Set foreground color to Cyan. (Color No. 6)
37 | Set foreground color to White. (Color No. 7)
38 ; 2 ; r ; g ; b 38 ; 2 ; r : g : b 38 ; 2 : r : g : b 38 : 2 : r : g : b | Set foreground color in RGB value, matching closest entry in 256 colors palette.
38 ; 5 ; Ps 38 ; 5 : Ps 38 : 5 : Ps | Set foreground color to color number Ps.
39 | Set foreground color to default.
40 | Set background color to Black. (Color No. 0)
41 | Set background color to Red. (Color No. 1)
42 | Set background color to Green. (Color No. 2)
43 | Set background color to Yellow. (Color No. 3)
44 | Set background color to Blue. (Color No. 4)
45 | Set background color to Magenta. (Color No. 5)
46 | Set background color to Cyan. (Color No. 6)
47 | Set background color to White. (Color No. 7)
48 ; 2 ; r ; g ; b 48 ; 2 ; r : g : b 48 ; 2 : r : g : b 48 : 2 : r : g : b | Set background color in RGB value, matching closest entry in 256 colors palette.
48 ; 5 ; Ps 48 ; 5 : Ps 48 : 5 : Ps | Set background color to color number Ps.
49 | Set background color to default.
90 | Set foreground color to Gray. (Color No. 8)
91 | Set foreground color to Bright Red. (Color No. 9)
92 | Set foreground color to Bright Green. (Color No. 10)
93 | Set foreground color to Bright Yellow. (Color No. 11)
94 | Set foreground color to Bright Blue. (Color No. 12)
95 | Set foreground color to Bright Magenta. (Color No. 13)
96 | Set foreground color to Bright Cyan. (Color No. 14)
97 | Set foreground color to Bright White. (Color No. 15)
100 | Set background color to Gray. (Color No. 8)
101 | Set background color to Bright Red. (Color No. 9)
102 | Set background color to Bright Green. (Color No. 10)
103 | Set background color to Bright Yellow. (Color No. 11)
104 | Set background color to Bright Blue. (Color No. 12)
105 | Set background color to Bright Magenta. (Color No. 13)
106 | Set background color to Bright Cyan. (Color No. 14)
107 | Set background color to Bright White. (Color No. 15)

DCS Sequence

Sequence | Mnemonic | Description
DCS Ps1 ; Ps2 | Pt ST | DECUDK | Define user function key.
DCS ! { Pt ST | DECSTUI | Change Terminal Unique ID to Pt. DECSTUI works only when LockTUID LockTUID setting is off.
DCS $ q Pt ST DECRQSS Request selection or setting.
Pt: the setting that the host asks about.
Pt = m    SGR
   = r    DECSTBM
   = s    DECSLRM
   = " p  DECSCL
   = " q  DECSCA
   = SP q DECSCUSR
   = * x  DECSACE

Response: DCS Ps $ r Pt ST
Ps = 0    Valid request.
          Pt indicates the current setting of a valid control function
          that the host asked about.
          Pt consists of all the characters in the control function,
          except the CSI or ESC [ introducer characters.
   = 1    Invalid request. Does not send Pt.
DCS + q Pt ST - Request Termcap/Terminfo string.
Pt: capability name encoded in hexadecimal (2 digits per character).

Response: DCS Ps + r Pt ST
Ps = 0   Invalid request. Does not send Pt.
   = 1   Valid request.

OSC Sequence

Format

OSC Ps ; Pt ST
OSC Ps ; Pt BEL
Ps | Description
0, 1, 2 | Change window title to Pt.
4 Change color.
Pt = c ; spec
Change color number c to the color specified by spec.
spec accepts following formats.
rgb:r/g/b
rgb:rr/gg/bb
rgb:rrr/ggg/bbb
rgb:rrrr/gggg/bbbb
#rgb
#rrggbb
#rrrgggbbb
#rrrrggggbbbb
?
When the spec is "?", the color responses with below format.
OSC 4 ; c ; rgb:rrrr/gggg/bbbb ST
5 Change special color.
Pt = c ; spec
Change special color number c to the color specified by spec.
The Pt is the c ; spec format, and configure the color of the character attribute regarding the c at the spec.
The c and character attribute are in the following:
c = 0   Bold
  = 1   Underline
  = 2   Blink
  = 3   Reverse
Format of spec is same as OSC 4's spec.
10 | Change VT Window's text color to Pt. Format of Pt is same as OSC 4's spec.
11 | Change VT Window's background color to Pt. Format of Pt is same as OSC 4's spec.
15 | Change TEK Window's text color to Pt. Format of Pt is same as OSC 4's spec.
16 | Change TEK Window's background color to Pt. Format of Pt is same as OSC 4's spec.
52 Clipboard access.
Pt = Pc ; Pd
Change the contents of clipboard Pc to Pd.

Pc: ignored.
Pd: new clipboard contents. encoded in base64.
When the Pd is the "?", the request does. The clipboard content responses as same style.
104 | Reset color number Pt.
105 | Reset special color number Pt.
110 | Reset VT Window's text color.
111 | Reset VT Window's background color.
115 | Reset TEK Window's text color.
116 | Reset TEK Window's background color.

SOS Sequence

Format

SOS Pt ST

Tera Term implements no SOS functions; Pt is ignored.

PM Sequence

Format

PM Pt ST

Tera Term implements no PM functions; Pt is ignored.

APC Sequence

Format

APC Pt ST

Tera Term implements no APC functions; Pt is ignored.

References

  • ECMA-48
  • VT100.net
  • Xterm control sequences
  • Locator input models for ANSI Terminals (sixth revision)
  • all-escapes.txt
  • aixterm


Frequently asked questions

Please read this page carefully before you contact the author.

[About Tera Term]

Q. Where can I find the latest version?
A. You can find it at the following sites:
https://ttssh2.osdn.jp/
Note: These sites may be changed in future.

Q. When will the next version be released?
A. See Tera Term home page. A. Periodical release will be done once every three months, as February, May, August and November. This release may be delayed for any reason.
A. When critical problem like as security hole is found, new version will be released at the timing other than periodical release.

Q. Can a user use the Tera Term's execution programs and source codes at the user's place of business for commercial purposes?
A. No problem. Need not announce to us. Tera Term has been distributed under the BSD License.

Q. I want to participate in Tera Term development.
A. Anybody who would like to participate can participate. Please register your account on the OSDN and contact the author.

Q. Can I utilize screenshots from Tera Term?
A. Please use at your own risk under license.

[Basic usage]

Q. I can not connect to a host.
A. Please check the following things:

  • Network configuration of your PC. See Control Panel.
  • Can you use other network applications such as WWW browsers and ftp
  • clients?
  • Is the host name or IP address correct?
  • Can you connect to the host from other machines?

Please do not ask the author how to configure network properties. Please read books and magazines or ask the network administrator.

Q. How do I connect to a host with dial-up TCP/IP (PPP)?
A. Before you run Tera Term, establish the PPP connection. In the case of Win 95, you should use "Dial-Up Networking".
After the dial-up (PPP) connection is established, run Tera Term. Enter the host name or IP address at the [File] New connection dialog box. If you don't know the name or IP address of the host, ask the network administrator.
In the case of PPP connection, the serial port is controlled by the PPP connection utility. Serial port functions of Tera Term are for non-PPP connections and nothing to do with the PPP connection.

Q. Tera Term automatically closes when I logout a telnet host. How to disable closing?
A. Turn "Auto window close" off in the [Setup] TCP/IP dialog box.

Q. I want to connect to a telnet host, but a serial port is always opened when Tera Term is started.
A. Set "Default port" to "TCP/IP" in the [Setup] General dialog box.

[Keyboard]

Q. How to set the Backspace or Delete key to work for the backspace function.
A. For the Backspace key, turn "Backspace key" on or off in the [Setup] Keyboard dialog box. For the Delete key, turn "Delete key" on (this may not work in some hosts).

Q. How to use numeric keys in normal way?
Q. I can not enter "/", "*", "-" and "+" by using the numeric keypad.
A. See "Numeric keypad".

Q. How to use F1-F4 keys as VT100 PF1-PF4 keys?
A. See "PF1-PF4 keys of VT100".

Q. F1 (or whatever) key does not work. How to configure the keyboard?
A. In most cases, I can not answer this kind of question because I don't know how the key works. If you know what character (string) should be sent or what function should be performed by pressing the key, you can make the key work by editing the keyboard setup file. Read KEYCODE.TXT.

Q. How to change the keyboard shortcut for the [Edit] Paste (Copy) command to Ctrl+V (Ctrl+C)?
A. See "User shortcut keys" and KEYCODE.TXT.

[Miscellaneous]

Q. What is "Tera Term extension interface"?
A. It is the interface between Tera Term and add-on modules. An add-on module is provided as a DLL which can hook Tera Term user interface functions, setup functions and Winsock functions. At the point of Mar 1998, no add-on module has been developed. Projects of developing add-on modules which support ssh and SSL are in progress. See Tera Term home page for currently available add-on modules.

Q. Line drawing characters ("Tera Special" font characters) are not displayed properly.
A. Remove the "Tera Special" font from "Fonts" of Control Panel, restart the system and reinstall the "Tera Special" font manually at "Fonts" of Control Panel.

Q. When line drawing characters are displayed, a "line" character does not match with an "angle" character smoothly.
A. Tera Term provides the original font "Tera Special" font to display line drawing characters. The font is scaled to fit the size of normal character font. Depending on the scaling factor, this mismatch problem may occur. Please find a good choice of font and size for normal characters which does not cause this problem.

Q. Why number of fonts in the list of [Setup] Font dialog box is so small?
Q. Why I can not select the "Times" font at the [Setup] Font dialog box?
A. Tera Term uses only fixed-pitch fonts such as "Terminal" and "Courier" because characters should be displayed with equal spacing in order to emulate the VT terminal properly. Displaying proportional font characters with equal spacing is in principle possible but it makes program complicated and slow. So Tera Term does not use proportional fonts.
A.On Windows7, the font dialog uses the current user's show/hide font settings to determine the font list to display. This will result in the display of fewer font lists in most instances. To disable font hiding, users should go to the Font Settings page in the Fonts CPL and no-select the "Hide fonts based on language settings" check-box.

Q. How to change the behavior of text selection by mouse double clicking?
A. See "Delimiters of a word selected by double clicking".

Q. The "at" command of Windows NT does not work for executing Tera Term.
A. Specify "/interactive" option for the "at" command.

Q. The window title can not change by using the /W= of the command line option and the settitle macro command.
A. Some Linux distributions overwrite the window title after the current users' changing. To prevent this behavior, try either one of the following two methods:

  • A user configures the user's shell settings to disable sending the control sequence for the window title changing.
  • A user turns off the "Accept Window Title Change Request" on the General tab of the [Setup]Additional Setting dialog.


Requests

Please read this page carefully before you contact the author.
This page summarizes requests frequently asked by users. Please do not ask the author about these things and the schedule for them.
Requests not listed here may have already been supported. Please read this help, MACRO help, README.TXT, KEYCODE.TXT and Tera Term home page carefully.

Items which may be supported in future

  • Blinking and double height/width characters of VT100.
  • Faint, italic rapid blinking, invisible and strike out characters of ECMA-48 terminal.
  • VT3XX line drawing between characters (lines).
  • Tool bar and status bar.
  • Dialer.
  • GUI tool to configure the keyboard.
  • Customizing menus and dialog boxes.
  • Word search.
  • Screen buffer and scroll bar for TEK window.
  • Improving resolution of TEK window printing.
  • In file transfers, displaying a progress bar [1], time to finish and the transfer speed.
  • ZMODEM recovery function.
  • Chinese and Korean [2] character code sets.
  • [File] Print setup command
  • Saving selected text or text in the scroll buffer to a file.[3]
  • Selecting the text/background color by using color pallets.
  • Switching to a small font when the screen mode is switched to the 132-column mode.
  • Displaying Chinese/Japanese/Korean characters in non-Chinese/Japanese/Korean Windows.
  • Unicode supporting in the Tera Term internal design
  • SFTP(SSH File Transfer Protocol)
  • OpenSSH: ProxyCommand

Items which may be supported in future (MACRO related items)

  • Array variables. [4]
  • Supporting the redirection by the "exec" command.
  • Waiting for binary data by the "wait" command.
  • Connect to Tera Term that is already running.

Items which may be supported in very far future

  • TEK41XX and 42XX emulations
  • Televideo and Wyse emulations
  • TN3270
  • Sharing a serial port with other applications at the same time.
  • Line input mode and a window for line input.
  • Improving the speed of Kermit transfer. [5]
  • Proportional fonts.
  • ANSI/AVATAR
  • ReGIS
  • Sixel
  • Direct communication I/O from MACRO.
  • Mouse protocol(NetTerm) except xterm and DEC Locator mode.

Note

  1. ^ Displaying a progress bar is supported since rev. 4.60.
  2. ^ Korean character set(KS5601) is supported since rev. 4.60.
  3. ^ see screencapture.ttl.
  4. ^ Supported since rev. 4.72.
  5. ^ Kermit Long Packet is supported since rev. 4.73.


Contacting the author

Please do not ask the author questions about usage: network configuration, how to connect a host, host configuration, keyboard configuration, how to write a macro file and so on. Please read the documentation included in the Tera Term package. Useful information and tools may be found at

Tera Term Home Page: https://ttssh2.osdn.jp/ (The address may be changed in future.)

You may ask the author questions about Tera Term copyrights or a permission for a special way of distributing Tera Term. If you want to send just a message without any question, request and bug report, it may be welcome.

Before you send bug reports or requests to the author, please read carefully the following:

  • Q & A
  • Requests
  • Tera Term setup file (Your request may have already been supported.)
  • MACRO Help
  • KEYCODE.TXT
  • Related topics in this help.
  • Other files:
    • LogMeTT_README.txt
    • Collector\readme.txt

Before you report a problem, please make sure that it is not caused by bad configuring of Tera Term and Windows.
If other applications also have the same problem, it may not be a bug of Tera Term. When you report the problem to the author, show the version number of Tera Term and information which may be related to the problem. If possible, please also show how to reproduce the problem.

The author may not be able to reply your message quickly. The author may ignore bug reports
already known, requests already received and questions answered by the Tera Term documentation.

E-mail address of the author: ttssh2-contact@lists.osdn.me (The address may be changed in future.)


Document writer

  • Masateru KUWATA mkuwata at excite.co.jp
  • Yutaka Hirata
  • IWAMOTO Kouichi sue at iwmt.org
  • NAGATA Shinya
  • 2Y -Yuta Yamashita- yuta at user.osdn.me


Keyboard

You can change some keyboard setup items in the [Setup] Keyboard dialog box.

You can modify key assignments by editing the keyboard setup file. See also KEYCODE.TXT.

Shortcut keys

VT window

Alt+B
Sends a break signal to the host.
Alt+C
Copies selected text to the clipboard.
Alt+D
Duplicates the current session.
Alt+G
Connects to the local Cygwin.
Alt+I
Disconnects with the current host.
Alt+N
Connects to a new host or a serial port.
Alt+P
Prints the current screen, or the selected text.
Alt+Q or Alt+F4
Closes Tera Term.
Alt+R
Sends text in the clipboard to the host, and then sends a new-line code.
Alt+T
Sends a AYT (Are You There) telnet signal to the host. Usually, the host sends back some message responding to it. This key is available only with a telnet connection.
Alt+V
Sends text in the clipboard to the host.
Ctrl+Esc
Switches to another window.

TEK window

Alt+C
Copies a selected portion of the screen to the clipboard.
Alt+O
Moves to VT window.
Alt+P
Prints the current screen, or the selected portion of the screen.
Alt+R
Same as VT window.
Alt+Q or Alt+F4
Closes TEK window.
Alt+V
Same as VT window.
Ctrl+Esc
Switches to another window.

Meta key

When "meta key" is selected in the [Setup] Keyboard dialog, the Alt key works as the meta key in the VT window. For example in the meta-key mode, the Alt+A key sends ESC A. Shortcut keys which use the Alt key (such as Alt+C) are disabled in this mode.


Mouse

VT window

Mouse wheel
This package supports mouse wheel button. Also, a user can send cursor key sequences as the mouse wheel rotating when the application cursor mode is enabled by starting vi or less command.
Mouse wheel on title bar
The value of transparency can be temporarily changed by moving the mouse wheel on the title bar (NOTE: This value can not be recorded).
When active status of the window is changed, the value of transparency switches to set value.
Dragging with the left button
Selects text, and copies it to the clipboard.
Dragging with the left button while pressing the Alt key
Selects text in a rectangular region of the screen, and copies it to the clipboard.
Double clicking the left button
Selects a word, and copies it to the clipboard.
Triple clicking the left button
Selects a line, and copies it to the clipboard.
Dragging with the right button
Selects text, copies it to the clipboard, and then sends it to the host.
It is effective when both DisableMouseRButtonPaste and SelectOnlyByLButton are disabled.
Clicking the right button
Sends text in the clipboard to the host.
It is effective when DisableMouseRButtonPaste is disabled.
Double clicking the left button on the title bar
The behaviour is changed according to the "Term size = win size" setting.
On
Maximize window. If the window is already maximized, restore to the original size.
Off
If the window size (real screen size) is not equal to the terminal size (logical size of the terminal), resizes the window to the terminal size. A further double clicking restores the original window size.
Clicking the left button while pressing the Ctrl key
If the menu bar is hidden, the pop-up menu appears. To hide the menu bar, check the Hide menu bar option in the [Setup] Window dialog box.
Dragging the window by the left button while pressing the Alt key
Moves the window, if the title bar is hidden. To hide the title bar, check the Hide title bar option in the [Setup] Window dialog box.
Clicking the right button while pressing the Alt key
Minimizes the window, if the title bar is hidden.
Dragging a text file and dropping it into the window
Displaying Confirmation Dialog
When ConfirmFileDragAndDrop is on
Dialog is shown after dropping
However, when "Do not display this dialog, next drop" is checked on the dialog, the dialog is not shown. Next, the dialog can be shown by using CTRL key pressing.
When ConfirmFileDragAndDrop is off
When one file is dropped, the action is done without dialog displaying. The default action is Send File (Paste content of file).
When one or multiple folders are dropped, the action is done without dialog displaying. The default action is Paste Filename.
The dialog is shown other than these(multiple files/a file and folder). In this case, the dialog can be shown by using CTRL key pressing.
Dialog
When the file and folder is dropped, the action can be determined.
SCP
The file is sent with SCP method.
On SSH2 connection, this menu can be selected with the file.
dest
Specify the destination path.
The path is treated as home directory when dest is empty.
NOTICE: The "~" may not be used in some cases of remote OS and shell.
Send File (Paste content of file)
The file content is sent(pasted) into the terminal.
When the file is dropped, this menu can be selected with the file.
Binary
When this option is checked, the file content is transmitted as it is.
When this option is not checked, KANJI and new line code are converted.
Paste Filename
A file name and folder name is pasted.
Escape
When this option is checked, below processing is done.
  • The path delimiter is changed from "\" to "/".
  • " ;&()$!`'[]{}#^~" characters are escaped with "\".
Separator is Space
When multiple files are dropped, the file delimiter is space.
Separator is NewLine
When multiple files are dropped, the file delimiter is new line.
Do this for the next N files
When this option is checked, remaining files and folders are processed the same way.
Do same process, next drop
The dialog setting is recorded into memory, and then the setting is reused by using next action.(When the dialog is shown, the dialog setting is update. Otherwise same action is done without confirmation.)
Do not display this dialog, next drop
When this option is checked, the dialog is not shown on next file dropping and the action is done without confirmation.
This option can be used when ConfirmFileDragAndDrop is off.
This option is a different setting from ConfirmFileDragAndDrop, and then the option can not be saved by using [Setup] Save Setup.
For example, when "Do same process, next drop" and SCP are selected, a folder is dropped. Next, when the action can not be done(needing confirmation) or dropping by using CTRL key pressing, the dialog is shown.
Dragging with the middle button, Clicking the middle button
These actions are no longer supported.

TEK window

Dragging with the left button
Selects a portion of the screen.
Clicking the right button
Same as VT window.
Clicking the left button while pressing the Ctrl key
Same as VT window.


Shortcut

ScrollLock
Tera Term window scroll locked or unlocked(toggle)
Ctrl + Tab, Ctrl + Shift + Tab
Switch to Tera Term next/prev window
Alt + Enter
Maximize Tera Term window(toggle)
Alt + Space Alt + X
Maximize Tera Term window
Alt + N
New connection
Alt + D
Duplicate session (SSH, telnet only)
Alt + G
Cygwin connection
Ctrl + Up/Down cursor
LineUp or LineDown
Ctrl + PageUp/PageDown
PageUp or PageDown
Ctrl + Home
Move to buffer top
Ctrl + End
Move to buffer bottom
Alt + C, Ctrl + Insert, MouseDrag
Copy selected string to the clipboard
Alt + V, Shift + Insert, Mouse Middle/Right button
Paste from the clipboard
F1 key
Push Num pad NumLock key
F2 key
Push Num pad '/'
F3 key
Push Num pad '*'
F4 key
Push Num pad '-'
Alt + MouseDrag
Select rectangular block of text
Left click Shift + Left click
Select several pages of output from Tera Term window.
Or expand ans contract of text area that has been selected.
Mouse wheel button scrolling
LineUp or LineDown
Dragging a text file and dropping it into the window
Sends text in the file to the host.
Dragging a folder and dropping it into the window
Sends the folder full-path to the host.


SSH connection

Description of SSH connection which is a feature of Tera Term. When the TTSSH module is installed, Tera Term supports the SSH connection.

Prerequisite

SSH is composed of two protocols, namely SSH1 and SSH2. Be careful that SSH2 is NOT upward compatible of SSH1. These protocols should be chosen carefully according to the host to be connected. TTSSH supports both protocols.

There are several ways of connection of SSH as follows

  • Password authentication
  • Public Key (and Private key pair) authentication
    • By using the PuTTY authentication agent `Pagent'.
  • rhosts authentication for SSH1
  • challenge/response(TIS) authentication for SSH1
  • keyboard-interactive authentication for SSH2
In this document, we will describe Password authentication and Key-pair authentication which would be most widely used.

Procedure of connection

When Tera Term is activated, the following dialog will let you choose login procedure.

When using SSH, you should change SSH version in a default parameter. Make sure that it is synchronized to the host to be connected.

Once connected, then you will be prompted to select authentication method in a dialog.
You can change default value in "TTSSH: Authentication Setup" dialog

The TTSSH can support some authentication methods and a user should select one of methods. When an authentication method is failed, the TTSSH does not retry to authenticate another method.
For example, the OpenSSH client will be able to login to the server without regard to the difference the password and the keyboard-interactive authentication. However, the TTSSH can not login to the server with the keyboard-interactive and public key authentication by using the password authentication.

  • If you want to use Password authentication, then make sure that [Use plain password to log in] is chcked and type in username and password. If they are correct, you can login.
    NOTE: The password can not be sent as plain text like TELNET protocol because the SSH packet including the password data is encrypted.
  • When using public key authentication, check [RSA/DSA/ECDSA/ED25519 key to log in] (second from the top line) and click [Private key file:] to specify Private key file. Then type in username and Private key pass phrase.
    Note: TTSSH 2.63(Tera Term 4.76) later can support the PuTTY format and SECSH(ssh.com) format of the SSH2 private key.
  • When the keyboard-interactive authentication is used, check the [Use keyboard-interactive to log in] and input your user name.
    Next, the dialog with the server prompt and string is shown and input your password.
  • When the Pageant is used, check the [Use Pageant] and input your user name.

Inputing Username

When this dialog is displayed, username was entered according the setting.

In addition, when the username is entered, or when the focus is moved from the input field after inputing username, the server is accessed according to the setting.

You can select an option by pushing the button next to the username box. If username is empty, tab key moves focus to this button. If username was enterd, tab key moves focus to password and passphrase input box.

Use default usename
Default username was entered according the setting. You can not select when default username is empty.
Use logon usename
Windows logon username was entered

Inputing Password and Passphrase

The password and passphrase input box differs from normal dialog box.

  • Control character(0x01 - 0x1F) can be inputted by Control + A - Z, [, \, ], ^ and _.
  • Control + V can not be used because the key equals SYN (0x16). Please use Shift + Insert combination for pasting.

You can select an option by pushing the button next to the username field.

Paste from clipboard
Paste from clipboard to password input box
Paste from clipboard and clear clipboard
Paste from clipboard to password input box, And clear clipboard
Use control characters
If checked, you can enter control characters, but you can not perform operations such as paste clipboard paste with Control + V. If it is not checked, you can not enter control characters, but you can perform operations such as paste the clipboard with Control + V.
Show passphrase
You can choose to display the passphrase or not

Security Warning

ssh_known_hosts file

On SSH connection, Tera Term searches the server host key into the ssh_known_hosts file. If the host key can not be found, the security warning is shown.
The result is described below.

  • No host key in ssh_known_hosts.
  • Mismatching the host key type found in ssh_known_hosts.
  • Mismatching the host key found in ssh_known_hosts.
  • Matching the host key found in ssh_known_hosts(not warning).

When the security warning message is shown, a user will receive a network attack known as spoofing secretly redirecting the user's connection to a different server.
However, this message will be shown when a user connects to a server for the first time and the server's host key is newly updated by reinstalling the server computer. If a user will see this warning, please compare a fingerprint on the warning dialog to the trusted fingerprint.

OpenSSH: The server administrator can get the fingerprint(hash) of the server's host key by using below command.

ssh-keygen -l -f /etc/ssh/ssh_host_rsa_key.pub

SSHFP RR

When a user is using SSH to connect to a server, the user can use SSHFP RR (Secure SHell FingerPrint Resource Record) defined in RFC 4255. However, this feature is experimentally implemented because the current Tera Term can not do the DNSSEC verification.

A domain owner can register the SSHFP record into the DNS zone. The client software(Tera Term) can get the SSHFP record on connection and verify the record with the server's host key.
However, this feature can be used on Windows 2000 or later by the limitation of the Windows resolver.

Please refer to below one sentence in RFC 4255.
A public key verified using this method MUST NOT be trusted if the SSHFP resource record (RR) used for verification was not authenticated by a trusted SIG RR.
The DNSSEC verification always fails because the Windows resolver used by Tera Term can not verify the DNSSEC signature.

Generating Key

Here, we will describe how to generate Public/Private key pair. To generate key, select [Setup] menu and choose [SSH KeyGenerator...].

Choosing key generation

Then you will see a dialog of key generation.

Key generation dialog

[Key type] is to select key types - [RSA1] for SSH1 protocol and [RSA], [DSA], [ECDSA] or [ED25519] for SSH2 protocol should be chosen respectively. After choosing key type, you will be prompted for pass phrase by clicking [Generate] button. Type in pass phrase (like a password, but it can include blank and usually much longer than password). Then click [Save public key] button, [Save private key] button to save these keys. File name can be left as default if you don't need. At the completion, click [Cancel] to finish this process.

For this file, when it is saved as default, all files which have an extension of [pub] (public key) will be stored in the specified location in the server (usually, it is (home directory)/.ssh/authorized_keys). All files which have NOT an extension are recognized as private key and you have to specify it at login.

Note: Since Private key should not be disclosed to other party, please be careful to make it secret. Please make that it is NOT sent to server by accident.


Cygwin connection

Tera Term can connect to local Cygwin environment.
Cygwin is a Linux-like environment for Windows.
Cygwin is open source software.

[NOTE] Cygwin 1.5.x doesn't seem support Windows 7. Please use Cygwin 1.7.x on Windows 7 or later.

Cygterm+

Tera Term uses the Cygterm+ program to connect local Cygwin.
Select "Cygwin connection" from "File" menu or press "Alt + G " to connect to Cygwin.

Saving configuration

Be careful not to save [Setup] [Save setup] in the situation that it was started by cygterm.exe.
Otherwise telnet port number of TCP/IP is saved but 23 you will be confused by connection failure when you normally run Tera Term to do telnet. In that case it will be recovered by saving the setting with specifying TCP/IP Port# 23.

How to search Cygwin

Tera Term must need to find the Cygwin installation path to launch the Cygterm+ program. So, Tera Term and cyglaunch will search the installation path in the following order.

  1. TERATERM.INI
    1. Reads the CygwinDirectory entry in the TERATERM.INI file which is placed in the directory loaded by the teraterm.exe and the cyglaunch.exe directory.
    2. Searches the bin\cygwin1.dll file under the CygwinDirectory folder.
    3. Adds the bin\cygwin1.dll file into the PATH environment variable if the file exists.
    4. Launch the cygterm.exe program.
  2. PATH environment variable
    1. Searches the bin\cygwin1.dll file into the directory included in the PATH environment variable.
    2. Launch the cygterm.exe program.
  3. Round robin drive root
    1. Searches the bin\cygwin1.dll file under cygwin and cygwin64 directory of the drive direct root from C: to Z:.
    2. Searches the bin\cygwin1.dll file into the directory included in the PATH environment variable.
    3. Launch the cygterm.exe program.

The CygwinDirectory entry in the TERATERM.INI file will be empty when Tera Term is newly installed. If the automatic retrieval is failed, please configure the CygwinDirectory entry.
The format is "drive-letter:\directory".

----------------------------
; Cygwin install path
CygwinDirectory = c:\cygwin
; 64bit Cygwin
; CygwinDirectory=c:\cygwin64
----------------------------

64bit Cygwin

A user needs an execution file by Tera Term needs the cygterm+ program built on the 64bit Cygwin environment to connect 64bit Cygwin. Basically, Tera Term installation program will recognize the installed Cygwin version and copy an appropriate cygterm+ program.
If the Tera Term installer makes an error in determination, please overwrite the cygterm.exe in the cygterm+-x86_64 directory to the Tera Term installation directory. Moreover, please rebuild the Cygterm+ source code.

Build Cygterm+

When the cygterm.exe program can not work well, please rebuild the Cygterm+ source code.
Latest source code is included as cygterm+.tar.gz.

Packages that will need to be built
32bit Cygwin | 64bit Cygwin
Devel/gcc-g++ Devel/make Devel/mingw-gcc-core | Devel/gcc-g++ Devel/make Devel/mingw64-x86_64-gcc-core

Cygterm Here

When this option is selected on the Tera Term installer, the "Cygterm Here" context menu is added on the right-click and opened folder. A user can open the Cygwin connection on the selected folder.

Tera Term installer will configure the generic parameter, however the csh/tcsh may not check the CHERE_INVOKING. If indicated, please modify the /etc/csh.login file or modify the Cygterm Here registry in the following:

before:
"C:\Program Files\teraterm\cyglaunch.exe" -nocd -v CHERE_INVOKING=y -d "\"%L\""
after:
"C:\Program Files\teraterm\cyglaunch.exe" -nocd -nols -d "\"%L\""


Connecting through Proxy

Description of Proxy connection using Tera Term

Prerequisite

Proxy is a technology which can be used to connect to outside where Internet environment and LAN are separated as shown in the following figure. However, a user may be not able to connect to the outside network because your gateway can not support the NAT.

There are various types of Proxy for this purpose. When a user uses the TTProxy plug-in, Tera Term supports the following types of Proxy

  • HTTP (*)
  • TELNET(for telnet)
  • SOCKS4
  • SOCKS5

How to configure

Setup procedure

To configure, select [Setup] menu, then choose [Proxy].

Then [Proxy Setup] dialog will appear. Specify the type of proxy in [Type], Hostname (or IP address) of Proxy server in [Hostname], Proxy port number in [Port number] and click [OK]. [Username] and [Password] can be used only when Proxy needs an authentication.

Now, you are ready - try to connect.

Notice of HTTP proxy using

A user may be not able to connect the following type because basically the HTTP proxy server processes the HTTP request.

  • No HTTP and HTTPS.
  • Port number is not 80 and 443.
  • Port number is not 443 by using CONNECT method.

A use can not connect through the proxy to the TELNET and SSH server because these connections apply to above conditions.


LogMeTT Tutorial

1. What is LogMeTT?

LogMeTT is a launcher application for TeraTerm -terminal emulator- macro. A user can automate login procedure to the remote host as well as running any process on the server. Though `TeraTerm Menu' is already available as auto-login application, LogMeTT has more feature than TeraTerm Menu. These features include SSH2 connection, scheduling, auto logging, color setup per the remote host and so on. In addition, LogMeTT supports the tree repository per a macro file. LogMeTT author is Boris living in USA. LogMeTT has been included in TeraTerm package.

2. What can LogMeTT do?

A user can manage an automated connection to remote hosts by using LogMeTT. Also a user can effectively administrate these configuration files because these host information can be registered as a tree repository. However, LogMeTT lacks the feature such as quick launching by keyboard shortcut which is supported by TeraTerm Menu.

3. How to launch

LogMeTT can be launched from File menu of TeraTerm. When it is activated, LogMeTT icon will appear in the notification area, far right of a taskbar.

4. Configuration

We will explain LogMeTT configurations in this chapter. A user will realize an easy-to-use automated procedure using TeraTerm.

1. Right-click LogMeTT icon in the notification area (see upper 3. figure), and then select "Configure...".

2. Configuration dialog will appear. Click the "Settings" tab, and then select the "Run at log on to Windows" check box on the "Settings" tab. LogMeTT will be automatically launched immediately after logon to Windows.

3. When "Start logging" is checked on New Connections tab under Settings tab, auto logging will start by launching LogMeTT from TeraTerm macro (The log file is located in `TeraTerm installation directory\Logs\LogMeTTmenu name_timestamp.log').

4. When a user selects "Add Child" under "Connection" menubar, an entry will be added. A user can also select "Add Child" by right-click "This computer" on screen left.

5. Next, "Unnamed connection #1" icon will be added under "This computer". Then select the icon and rename by pressing F2 key.

6. Select "Macro" tab, and then enter a description of macro script to login to the remote host. If you want User Name to be fixed and Password to be entered via dialog box, refer to the following macro script. Alternatively, you can directly write the user's password in the macro file although it is not recommended.
*NOTICE* Refer to 5. section about the security conscious macro.

username = 'nike'
hostname = '192.168.1.3'

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

msg = 'Enter password for user '
strconcat msg username
passwordbox msg 'Get password'

msg = hostname
strconcat msg ':22 /ssh /auth=password /user='
strconcat msg username
strconcat msg ' /passwd='
strconcat msg inputstr

connect msg

7. Press F9 key for your macro script to be verified. If it is confirmed, save the macro script to the file by pressing Apply button at upper right direction.

8. A user can select the user's registered remote host configuration in the notification area.

9. If a user specifies some messages on "Popup" tab in the following window:

Then below popup message will be shown.

Popup dialog can be used to confirm a notice when a user connects to an important host or a user switches the privilege level to the super user level. When a user presses OK button on the popup message, then the macro script will be run. Otherwise when a user presses Cancel button, then the macro script will be cancelled.

10. On "Colors" tab, a user can modify TeraTerm coloration for each connection. Like as Popup dialog, this tab can be used to change coloration. It prevents a user miss operation.

11. On "Schedule" tab, a user can automatically run the macro script. By using this feature, a user can do as follows.

  • Power cycle
  • Send e-mail or call upon failure by combination "Settings" tab and "User Data" tab.
  • Periodically backup or status check

NOTICE: If a user puts a child tree in schedule, all parent tree will be run. If a user want to run it as an independent task, a child tree should be moved under "This computer" top tree. Also, please be careful of the difference of timestamp between remote host and local host.

RECOMMENDATION: If a user utilizes scheduling feature, turn on auto-logging mode.

5. Security-conscious macro script

This section is to discuss the topic about TeraTerm macro.

Although the user name is directly described in the macro script in an example of Section 4, this is not appropriate for security policy. Therefore, a new procedure for encrypting the user name and the password is described below.

1. sample macro for auto-login with encrypting the user's password.

The user name is scott, the host name is remote.host, and the destination of the password file is located in C:\mydata\filename.dat.

; setting
hostname = 'remote.host'
username = 'scott'
getpassword 'C:\mydata\filename.dat' 'usrpass' inputstr

; connection & login
msg = hostname
strconcat msg ':22 /ssh /2 /auth=password /user='
strconcat msg username
strconcat msg ' /passwd='
strconcat msg inputstr
connect msg

getpassword 'filepath\filename' 'IDENTIFICATION' $stored variable

A user can save the encrypted password with multiple identifications in a sample file.

This macro script confirms the user password for the first time. After this, the encrypted password in "C:\mydata\filename.dat" is used for auto-login.

2. Sample macro script of auto-login saving the encrypted user name and the password file are located in C:\mydata\filename.dat.

The host name is remote.host, and the destination of the user name and the password file are specified on C:\mydata\filename.dat.

; setting
hostname = 'remote.host'
getpassword 'C:\mydata\filename.dat' 'usrid' username
getpassword 'C:\mydata\filename.dat' 'usrpass' inputstr

; connection & login
msg = hostname
strconcat msg ':22 /ssh /2 /auth=password /user='
strconcat msg username
strconcat msg ' /passwd='
strconcat msg inputstr
connect msg

getpassword 'filepath\filename' 'IDENTIFICATION' $stored variable

The user names are also stored as "usrid" identification in this macro script. A user must input both the user name and password for the first time, however a user no longer needs to input these information for the second time or later. A user can encrypt the host name in a same manner, however a user must be careful of adding the host name to TeraTerm history buffer for security policy.

3. Using telnet protocol

Be advised that the macro script by using telnet -port23- protocol is different from the above. The reason is that telnet protocol authenticates the user after connection established.

; setting
hostname = 'remote.host'
getpassword 'C:\mydata\filename.dat' 'usrid' username
getpassword 'C:\mydata\filename.dat' 'usrpass' inputstr
;; login session [*]
UsernamePrompt = 'Please login:'
PasswordPrompt = 'Please Enter password:'

; connection
msg = hostname
strconcat msg ':23'
strconcat msg ' /nossh'
connect msg

; login
wait   UsernamePrompt
sendln username
wait   PasswordPrompt
sendln inputstr

[*] A user may change these prompt strings for the corresponding remote host.

Caution of the file saving encryption data

A user can maintain the password file stored in secure location and it is available for root user to be prompted for this password. For instance, an administrator configures a long password string for the first time, then he/she can delete the file after save in the password file.

As above stated, when the password is saved in the local file, it is a good idea to add a batch which deletes the password file on LogMeTT startup so that a user only needs to be authenticated for the first time.

There is no complete security solution in the world, may these topics help you to tighten the security.

6. Latest download

Basically, we will include LogMeTT latest version at the time of TeraTerm release. However, it is not necessarily the case that TeraTerm installation package includes LogMeTT latest version because LogMeTT project is different from TeraTerm project. Sure, the latest version is here.

Also, the user can get LogMeTT latest version by selecting "Check for updates" on "Help" menu.

7. Contact address

e-mail: boris at logmett.com


Tera Term Menu Tutorial

1. About Tera Term Menu

Tera Term Menu(ttpmenu.exe) is a launcher tool which can kick the Tera Term easily. Tera Term Menu copyright belongs to S.Hayakawa, however the Tera Term Menu is currently maintained by TeraTerm Project and this is included into the Tera Term installation package.

2. Registry

Tera Term Menu configuration is recorded into the registry(HKEY_CURRENT_USER\Software\ShinpeiTools\TTermMenu). If the ini file wants to be used instead of the registry, please put the "ttpmenu.ini"(empty size) in the "ttpmenu.exe" directory in advance.
NOTE: The registry database can not be exported into the ini file automatically. Please use the converting script.

3. How to launch

When the Tera Term Menu is launched, the application be shown on the tasktray. When the tasktray icon is clicked by the left mouse button, a user can kick the Tera Term from the menulist. And when the icon is clicked by the right mouse button, the user can register the menu list and configure the behavior of the Tera Term Menu.

4. Configuration

When a user uses the Tera Term Menu for the first time, the menu list is empty. First, please make the menu list. Click the tasktray icon by the right mouse button, and select the "List Configuration". Next, input some entries on the "Configuration" and push the left arrow button. So, your menu list will be registered on the "List Item" at the left side.

The above is the example that Tera Term connects to the Linux machine(Fedora) has 192.168.153.128 ip address by SSH protocol. When a user want to use the SSH connection, please check the "use SSH". If SSH port number uses any number other than 22, please specify the ip address and port number(ip:port) at the Host Name.
If the public key authentication uses, please specify the private key file at the Keyfile entry.

When a user specifies the detail configuration on server connection, please push the "details" button and then call the below configuration screen.

The above is the example that the Option specifies the "/KT=UTF8 /KR=UTF8". This option is passed in the Tera Term command line. So, the Tera Term command line will be in the following parameter:

"C:\Program Files\teraterm\ttermpro.exe" 192.168.153.128:22 /ssh /auth=password /user=yutaka /passwd=****** /KT=UTF8 /KR=UTF8

When the menu list is completely registered, a user can click the Tera Term Menu icon by the left mouse button and then the menu list will be shown. At the result, the user can launch the Tera Term easily.

5. Contact

TO: TeraTerm Project


Unicode

To use UTF-8, changed from English to "UTF-8" or "Japanese" or "Korean" under Setup->General menu.

When the Language "UTF-8" is selected, below function can not be used beside Japanese setting.

  • The JIS, EUC and SJIS character code except for UTF-8
  • Specifying Japanese character set of ISO/IEC 2022
  • TTXKanjiMenu plug-in

If you set the Language "Japanese" or "Korean", select "Terminal" from the Tera Term "Setup" menu. Inside the dialog-box, select "UTF-8" from "Kanji(receive)" or "Kanji(transmit)". There is no need to restart Tera Term to activate these configuration changes.
When "UTF8" is specified with '/KT' or '/KR' option in the command line, UTF-8 encoding/decoding can be used during transmitting and receiving of data.

Actually, Tera Term does not support completely Unicode language because the internal design is based on MBCS(Multiple Byte Character Set). So, the Unicode characters are two-step conversion as follows.

UTF-8 <-----> Unicode(UTF-16LE) <-----> MBCS
        (1)                       (2)

(1): Unicode information is no longer missing on decoding UTF-8 because four byte UTF-8 is supported after version 4.102.
When the KanjiCode(recv) is set to UTF-8m, a part of combining character are processed for Mac OS X(HFS+).
(2): A user must specify the locale to convert the characters between Unicode and MBCS.

To enable Unicode character sets with the localized language, you have to set properly the locale parameters in the 'teraterm.ini' file. See example of these values below.

; Locale for Unicode
Locale = japanese

To change this value, you can use [Locale] in "Terminal setup" dialog-box.

Check the following web-sites to learn more about setting of locale in Tera Term:

  • Language Strings

Example of WindowsXP Simplified Chinese

  • On Setup -> Terminal dialog, select locale=chs.
  • On Setup -> Font dialog, select FontName=NSimSun, CharacterSet=CHINESE_GB2312 and Size=9.

Example of WindowsXP USA

; Locale for Unicode
Locale = american

And you have to configure the font setting correctly to display MBCS.
You can choose a font from Setup->Font dialog-box. Select a font that include characters what you want to display. And select "Script" what you want to display.
Tera Term can display other language characters if locale and font settings are correct. For example "Japanese" characters on "English" Windows, "Korean" characters on "Japanese" Windows.
But Tera Term doesn't support the multilingual display, and therefore it can't display "Japanese" and "Korean" at the same time on one Tera Term window.

[NOTE] for Mac OS X users

For Mac OS X(HFS+) use "UTF-8m" encoding. Currently it only supports receiving mode.
To use this mode specify "UTF8m" as the value of the command line parameter '/KR'.

[NOTE] Language Strings for Locale

Primary language | Sub-language | Language string
Chinese | Chinese | "chinese"
Chinese | Chinese (simplified) | "chinese-simplified" or "chs"
Chinese | Chinese (traditional) | "chinese-traditional" or "cht"
Czech | Czech | "csy" or "czech"
Danish | Danish | "dan" or "danish"
Dutch | Dutch (default) | "dutch" or "nld"
Dutch | Dutch (Belgium) | "belgian", "dutch-belgian", or "nlb"
English | English (default) | "english"
English | English (Australia) | "australian", "ena", or "english-aus"
English | English (Canada) | "canadian", "enc", or "english-can"
English | English (New Zealand) | "english-nz" or "enz"
English | English (United Kingdom) | "eng", "english-uk", or "uk"
English | English (United States) | "american", "american english", "american-english", "english-american", "english-us", "english-usa", "enu", "us", or "usa"
Finnish | Finnish | "fin" or "finnish"
French | French (default) | "fra" or "french"
French | French (Belgium) | "frb" or "french-belgian"
French | French (Canada) | "frc" or "french-canadian"
French | French (Switzerland) | "french-swiss" or "frs"
German | German (default) | "deu" or "german"
German | German (Austria) | "dea" or "german-austrian"
German | German (Switzerland) | "des", "german-swiss", or "swiss"
Greek | Greek | "ell" or "greek"
Hungarian | Hungarian | "hun" or "hungarian"
Icelandic | Icelandic | "icelandic" or "isl"
Italian | Italian (default) | "ita" or "italian"
Italian | Italian (Switzerland) | "italian-swiss" or "its"
Japanese | Japanese | "japanese" or "jpn"
Korean | Korean | "kor" or "korean"
Norwegian | Norwegian (default) | "norwegian"
Norwegian | Norwegian (Bokmal) | "nor" or "norwegian-bokmal"
Norwegian | Norwegian (Nynorsk) | "non" or "norwegian-nynorsk"
Polish | Polish | "plk" or "polish"
Portuguese | Portuguese (default) | "portuguese" or "ptg"
Portuguese | Portuguese (Brazil) | "portuguese-brazilian" or "ptb"
Russian | Russian (default) | "rus" or "russian"
Slovak | Slovak | "sky" or "slovak"
Spanish | Spanish (default) | "esp" or "spanish"
Spanish | Spanish (Mexico) | "esm" or "spanish-mexican"
Spanish | Spanish (Modern) | "esn" or "spanish-modern"
Swedish | Swedish | "sve" or "swedish"
Turkish | Turkish | "trk" or "turkish"


Background transparency

Tera Term supports window background transparency. Now Tera Term has two types of transparency function. You can select either function.

(1) AlphaBlend window

In this type Tera Term window can be background transparency. As a point that should be noted, this function is enabled on only Windows2000 later.
You can configure the value in "Visual" tab on [Setup] Additional settings.
You can set up the value of transparency. The range of transparency is from 0 to 255. The more transparency reduces the value, the more window transparency is blinding. Default value is 255 (opaque).

(2) Eterm lookfeel window

In this type Tera Term window looks like Eterm background transparency. If this function is enabled, Tera Term window becomes background transparency and mixes the wallpaper with your specified image file(*.jpg).
Please edit the "BGEnable=on" in the teraterm.ini file, or you can configure the value in "Visual" tab on [Setup] Additional settings.

Please refer to "Eterm lookfeel window" for more detailed settings.

(3) Background image

When both Eterm lookfeel and Background Image is enabled, an image file can be drawn into the terminal background.
And then, the background window does not make transparent.


Tips

  • How to configure Tera Term
  • Log and replay functions
  • User shortcut keys
  • Numeric keypad
  • Keypad mode
  • PF1-PF4 keys of VT100
  • Tips on XMODEM
  • Tips on ZMODEM
  • Tips on B-Plus
  • Transfer the file via the intermediate server
  • Tips on TCP/IP connection with a port other than 23
  • Delimiter character of word selected by double-click
  • Associate with TELNET protocol
  • Vim control sequence examples
  • Named pipe
  • Virtual Store


Window resize plug-in

[Resize] menu on Tera Term top menu bar

Feature

A user can add the [Resize] menu on the top menu bar by using the TTXResizeMenu plug-in.
When the [Resize] menu entry is selected, Tera Term window is automatically resized by the specified size.

Usage

Basically, the [Resize] menu does not display after the plug-in is installed.
Next, a user must register the menu entry in the teraterm.ini file.

Add a [Resize Menu] section in the teraterm.ini file, and describe the "ResizeMenuN = X, Y" entry. N is an 1-origin number.
When X or Y equals zero, the value is not changed. For example, (X, Y)=(0, 37) means that the width is not changed and the height is changed into 37 lines.
When the X or Y value is -1, the value is regarded as the maximum value not exceeding the screen size.
These value maximum is 20.

Example

[Resize Menu]
;
; width 80 columns, height 37 rows
ResizeMenu1 =  80, 37
;
; normal VT size
ResizeMenu2 =  80, 24
;
; Width is not changed, Height is changed to 52 lines.
ResizeMenu3 =   0, 52
;
; Height is not changed, Width is changed to 132 columns(DECCOLM equivalence).
ResizeMenu4 = 132,  0

ToDo

  • The Resize menu value can be changed by the dialog box.


[File] menu

New connection...
Connects to a new host or a serial port or a named pipe.
Duplicate session
Duplicates current session. Only TELNET, SSH and Cygwin connection is duplicated.
Log...
Logs received characters to a file.
Pause Logging
Pause logging.
Comment to Log...
Adds comment to the log file. Maximum allowed length of comment is 255 characters.
View Log
Opens the log file.
Show Log dialog...
Displays the log dialog.
Stop Logging
Stop logging and closes the log file.
Send file...
Sends a file to the host.
Transfer
Transfers files between the PC and the host with the Kermit/XMODEM/YMODEM/ZMODEM/B-Plus/Quick-VAN protocols.
SSH SCP
Transfers files between the PC and the host with the Secure Protocol.
Change directory...
Changes the current directory for file transfers.
Replay Log...
Replays the binary log file. This feature and the /R option are equivalent.
Print...
Prints the current screen, or the selected text.
Disconnect
Closes the connection. If the connection type is TCP/IP and the Auto window close option is selected, Tera Term is also closed.
Exit
Closes Tera Term. If the connection is open, it is also closed.
Exit All
Closes All Tera Term instances without confirmation. If the connection is open, it is also closed.


New connection ([File] menu)

Connects to a new host or a serial port or a named pipe. Also, Replays a log file. If the connection is already open, opens a new Tera Term window.

"New connection" dialog box

TCP/IP

Host
Enter the host name or IP address(IPv4 and IPv6) or named pipe, or select one from the host list. To edit the host list, use the [Setup] TCP/IP command.
The IPv6 address is surround with the bracket. (Refer to RFC3986 / RFC5952)
You can enter not only the host name or address, but also the command line parameters like the following:
    myhost.example.com                  Host name only.
    myhost.example.com:23               Host name with a port number.
    foohost.example.org /F=FOOHOST.INI  Host name & setup file name.
    /C=1                                Specifies the serial port connection.
    /R=LOG.DAT                          Replays the log file.
    [2001:db8:1:2:8401:2ff:fe03:405]    IPv6 address
    [fe80::8401:2ff:fe03:405%3]:8022    IPv6 address and Port number
    user@myhost.example.com:10022 /ssh  SSH connection to a port number other than 22
    ssh://user@myhost.example.com       SSH connection to the SSH protocol(ssh://)
    \\.\pipe\vmware-serial-port         Named pipe connection
This edit control can support the Ctrl+a(Home key), Ctrl+e(End key), Ctrl+b(left-arrow), Ctrl+f(right-arrow), Ctrl+n(down-arrow), Ctrl+p(up-arrow), Ctrl+d(delete the character at point), Ctrl+k(kill the text from point to the end of the line) and Ctrl+u(kill backward from point to the beginning of the line).
History
Displayed when TTSSH is enabled.
This option is select, the entered hostname will be added to the top of the host list when connecting to the input host. This checkbox uses function of History in the [Setup] menu.
Telnet
Enables the telnet protocol.
SSH
Default selected option. Displayed when TTSSH is enabled.
Enables the SSH protocol.
Other
Displayed when TTSSH is enabled.
Enables other protocol from except telnet and SSH.
TCP port#
Specify the port number according to the selected service.
The default is as follows.
Service | TCP port# | etc.
Telnet | 23 | well-known ports
SSH 22 well-known ports
Displayed when TTSSH is enabled.
Other | (Optional) | Displayed when TTSSH is enabled.
SSH version
Displayed when TTSSH is enabled.
Uses for connection by selected from version ssh1 or ssh2.
IP version
Selects as an IP version from AUTO or IPv6 or IPv4.
The AUTO try to connect to the IP address associated with the hostname.
Either IPv6 or IPv4 using depends on the OS setting(priority of IP version).

Note:
Only if <telnet flag> is on and <TCP port#> is 23, Tera Term starts spontaneously sending telnet commands to the host for the option negotiation when the TCP/IP connection is established. In any cases, Tera Term can respond to telnet commands sent by the host.

See also:
Telnet port number / Terminal setup for non-telnet connection

Serial

Port
Select a port from the list. By default, maximum serial port number in the list is 256. Also, the serial port does not show when there is no available port. It is configurable in MaxComPort setting.


Log ([File] menu)

Logs received characters to a file.

"Log" dialog box (to input the log file name)

File Name
Enter or select the log file name.
Binary
If you select this option, received characters are written without any modifications. Otherwise, new-line codes are converted and escape sequences are stripped out.
Append
If you select this option and the specified log file already exists, received characters are appended to the file. Otherwise, the file is overwritten.
Plain text
If you select this option, ASCII non-printable characters are not written.
NOTE: When the Binary option is enabled, this option can not be checked and the value will be disabled.
Hide dialog
If you select this option, "Log" dialog box is not displayed.
Include screen buffer
If you select this option, the logging starts after current all buffer is written into a log file.
Timestamp
If you select this option, a timestamp is added on top of each log line. The timestamp is added when the first character of the line appears.
The timestamp type can be selected from following.
Local Time
Record the time in local time.
UTC
Record the time in UTC.
Elapsed Time (Logging)
Record the elapsed time from the start of logging.
Elapsed Time (Connection)
Record the elapsed time from the start of connection.
The timestamp format is specified with LogTimestampFormat when the timestamp type is "Local Time" and "UTC".
The LogTimestampFormat is ignored when the timestamp type is "Elapsed Time (Logging)" or "Elapsed Time (Connection)".
NOTE: When the Binary option is enabled, this option can not be checked and the value will be disabled.

"Log" dialog box (displayed while logging)

Close
The Close button quits logging and closes the log file.
Pause/Start
The Pause button pauses logging. The Start button restarts logging. These buttons function as toggles.


Send file ([File] menu)

Sends a file to the host.

"Send file" dialog box (to input the file name)

File Name
Enter or select the file name of an existing file.
Binary
If you select this option, received characters are sent without any modifications. Otherwise, new-line codes are converted and control characters (except TAB, LF and CR) are stripped out.

"Send file" dialog box (displayed while sending)

Close
The Close button quits sending.
Pause/Start
The Pause button pauses sending. The Start button restarts sending. These buttons function as toggles.


Kermit Get ([File] Transfer menu)

Receives files from the host, which is in the Kermit server state.

"Kermit Get" dialog box

Enter the file name to be received. The received file is stored in the current directory.


Kermit Send ([File] Transfer menu)

Sends files to the host. Activate the Receive or Server command of the host's Kermit before executing this command.

"Kermit Send" dialog box

Enter or select the file names of the existing files to be sent.


XMODEM Receive ([File] Transfer menu)

Receives a file from the host with the XMODEM protocol. Activate the send command of the host's XMODEM before executing this command.

"XMODEM Receive" dialog box

File Name

Enter the file name to be received.

Option

Checksum/CRC
Selects type of error detection(Checksum/CRC).
Packet size(1K) can be only specified at sender side.
Binary
The binary file transfer option. If you want to receive a text file, don't select this option.

Tips on XMODEM


XMODEM Send ([File] Transfer menu)

Sends a file to the host with the XMODEM protocol. Activate the receive command of the host's XMODEM before executing this command.

"XMODEM Send" dialog box

File Name

Enter or select the file name of the existing file to be sent.

Option

1K
Selects this option when packet size(1K) is sent.
Type of error detection(Checksum/CRC) can be only specified at receiver side.

Tips on XMODEM


ZMODEM Send ([File] Transfer menu)

Sends files to the host. Activate the receive command of the host's ZMODEM before executing this command.

"ZMODEM Send" dialog box

File Name

Enter or select the file names of the existing files to be sent.

Option

Binary
The binary file transfer option. If you want to send text files, don't select this option.

Tips on ZMODEM


B-Plus Send ([File] Transfer menu)

Sends a file to the host with the B-Plus protocol. Activate the upload command of the host before executing this command.

"B-Plus Send" dialog box

Enter or select the file name of the existing file to be sent.

Tips on B-Plus


Quick-VAN Send ([File] Transfer menu)

Sends files to the host with the Quick-VAN protocol. Activate the upload command of the host before executing this command.

"Quick-VAN Send" dialog box

Enter or select the file names of the existing files to be sent.

Tips on Quick-VAN


Change directory ([File] menu)

Changes the current directory for file transfers.

"Change directory" dialog box

Enter a new directory name.
When this setting is used, the environment variable is expanded if it is included.


Print ([File] menu)

"Print" dialog box

Print Range
If you choose All, the current screen is printed.
If you choose Selection, the selected text is printed.


[Edit] menu

Copy
Copies selected text to the clipboard.
Note: Normally, you don't need to use this command, because dragging text automatically copies text to the clipboard (see mouse usage). Use this command to re-copy selected text to the clipboard.
Copy table
Copies selected text to the clipboard. If the copied text consists of words, each space between words is converted to a Tab character. If you copy a table on the screen by using this command, you can paste it into a spread sheet application, like Excel.
Paste
Sends text in the clipboard to the host.
Paste<CR>
Sends text in the clipboard to the host, and then sends a new-line code.
Clear screen
Erases the screen.
Clear buffer
Erases the scroll buffer and the screen.
Cancel selection
Reset selection. Clipboard content is not changed.
Select screen
Select current screen buffer and copy it into clipboard.
Select all buffer
Select complete screen buffer and copy it into clipboard.


[Setup] menu

The changed setup is not saved to setup file automatically. To keep the changed setup permanently, save setup from [Save setup...] menu manually.

Terminal...
Setting up Terminal emulator
Window...
Setting up screen display
Font...
changing FONT
Keyboard...
Setting up keyboard
Serial port...
Setting up Serial port
Proxy...
Setting up Proxy
SSH...
Setting up generic SSH parameters
SSH Authentication...
Setting up SSH authentication
SSH Forwarding...
Setting up SSH port forwarding
SSH Keygenerator...
Generating key to be used by SSH key-pair authentication
TCP/IP...
Setting up TCP/IP
General...
Setting up general parameters
Additional settings...
Setting up the new Tera Term options introduced by the UTF-8 package.
Save setup...
Saving current configuration into Tera Term configuration file.
Restore setup...
Restoring Tera Term parameters using configuration file
Setup directory...
Open path to current configuration file.
Load key map...
Restoring keyboard using configuration file


Terminal ([Setup] menu; English mode)

This page is described when the Language is selected to English on the Setup - General dialog. Please refer to below page if another language mode is used.

  • Japanese mode
  • Korean mode
  • Russian mode
  • UTF-8 mode

"Terminal setup" dialog box

Terminal size
The logical size of the terminal (numbers of columns and lines). Note that the window size (real screen size) is not necessarily equal to the terminal size.
Term size = win size
Forces the terminal size to be always equal to the window size.
Auto window resize
When the terminal size is changed, resizes the window to the terminal size.
New-line (receive)
CR
Tera Term doesn't convert it.
CR+LF
Received CR ($0D) character is converted to CR+LF ($0D $0A) pairs.
e.g.) If "CR LF" is received, it is converted to "CR LF LF."
LF
Received LF ($0A) character is converted to CR+LF ($0D $0A) pairs.
e.g.) If "CR LF" is received, it is converted to "CR CR LF."
AUTO
Received CR ($0D) or LF ($0A) character is converted to CR+LF ($0D $0A) pairs.
e.g.) If "CR+LF" are received, it is not converted.
If "CR" is received, it is converted to "CR LF."
If "LF" is received, it is converted to "CR LF."
New-line (transmit)
CR
Tera Term doesn't convert it.
CR+LF
CR ($0D) character to be sent is converted to CR+LF ($0D $0A) pairs before it is actually sent.
LF
CR ($0D) character to be sent is converted to LF ($0A) before it is actually sent.
Terminal ID
Terminal ID to be reported to the host when the host requests it. Note that the terminal ID is not identical to the telnet terminal type. To change the telnet terminal type, use the [Setup] TCP/IP command.
Local echo
Enables local echoing of characters sent.
Answerback
The string to be answered back to the host, when the ENQ ($05) character is received. Each non-printable character in the string can be expressed as a "$" and ASCII code in two-character hex number. For example, the string "ABC<CR><LF>" is expressed as the following:

ABC$0D$0A

Auto switch (VT<->TEK)
Enables auto switching between VT and TEK emulations.


Window ([Setup] menu)

"Window setup" dialog box

Title
Text displayed in the window title.
Cursor shape
Cursor shape. Block, Vertical line or Horizontal line.
Enable bold font
Enables the use of bold style font for characters with the bold attribute.
Hide title bar
Hides the title bar and menu bar. You can move the window by dragging it with the left mouse button while pressing the Alt key. You can minimize the window by clicking the right mouse button while pressing the Alt key. Clicking the left mouse button while pressing the Ctrl key causes the pop-up menu to appear.
Hide menu bar
Hides the menu bar. Clicking the left mouse button while pressing the Ctrl key causes the pop-up menu to appear.
16 Colors (PC style)
Enables the PC style mapping of bold color. In this mode, the bold (blink) attribute is used as a color attribute bit for text (background). This option increases the number of colors for text and background specified by escape sequences twice, from 8 to 16.
16 Colors (aixterm style)
Enables aixterm style 16 colors mode. This option increases the number of colors for text and background specified by escape sequences twice, from 8 to 16.
NOTE: The escape sequence(<CSI>100m) which changes the background color to the color number nine would conflict the escape sequence of the resetting rxvt-style characters and background color. So, if a user enables this mode, the behavior of <CSI>100m escape sequence will work never before.
If a user does not like this behavior, turn off this option.
256 Colors (xterm style)
Enables xterm style 256 colors mode. This option increases the number of colors for text and background specified by escape sequences twice, from 8 to 256.
Also, a user can change the color table by the escape sequence.
Scroll buffer
Enables the scroll buffer. If enabled, the number of lines in the scroll buffer (including the displayed area) can be specified. The maximum number of lines is 10000. If memory is not enough, this value is reduced automatically.
See also Maximum scroll buffer size.
Color
Text
Text color.
Background
Background color.
Attribute
Attribute of characters (Normal, Bold, Blink, Reverse or URL) whose colors are being changed.
Note: Currently, the function URL attribute is disabled.
Reverse
Exchanges the text color and background color.
R, G, B
Specifies the RGB value of the character color.
Always use Normal text's BG
If this option is ON, Tera Term uses Normal background color instead of Bold, Blink and URL's background color.


Font ([Setup] menu)

Changes the font.

"Font" dialog box

Font
Select a font from the list.
Font style
Ignored.
Size
Select a font size in points.
Script
Select a character set from the list.

Note:

  • The Tera Special font, which is included in the distribution package, can not be selected in this dialog box. It is used automatically by Tera Term.
  • Hidden fonts specified by OS can not be shown on font list by default. Please enable the List hidden fonts in font dialog setting on the General tab of Additiona settings dialog to select hidden fonts.
  • The font quality can be selected by using the Font quality on the Visual tab of Additional settings dialog.
  • When the dialog font is set to very large size and wide font, displayed font may be corrupted, and also you may not press [ok] button because the dialog goes out of screen.


Keyboard ([Setup] menu)

"Keyboard setup" dialog box

Transmit DEL by:
Backspace key
If this option is checked, pressing the backspace key sends the DEL character (ASCII 0x7F). If not checked, the BS character (ASCII 0x08) is sent. Even if this option is (not) checked, the BS (DEL) character can be sent by pressing the Ctrl+backspace key.
Delete key
If this option is checked, pressing the Delete key sends the DEL character. If not checked, the function assigned for the Delete key is determined by the keyboard setupfile.
Meta key
Enables the meta-key mode. The Alt key is used as the meta key. For example, the sequence ESC A is sent by pressing the Alt+A key. Shortcut keys which use the Alt key (such as Alt+C) are disabled.
Please set the "left" value to input the character with AltGr key and the Meta key is enabled. However, this value can be enabled with Windows NT 4.0 later.
Disabled mode:
Application Keypad
This option disables Application Keypad mode.
If this option is selected, you can prevent a problem of a numeric keypad from being unavailable due to an accidental transition to Application Keypad mode.
Note that some application which uses application keypad mode may encounter other problems when this option is selected.
Application Cursor
This option disables Application Cursor mode.

You can modify key assignments by editing the keyboard setupfile.

Help for Russian mode


Serial port ([Setup] menu)

"Serial port setup" dialog box

OK button
The label of OK button is changed according to the connection state.
Connect with New window ... Serial connection is launched with new window since TCP/IP connection is using.
New open ... Serial connection starts.
Close and New open ... Current COM port is closed and serial connection starts with new COM port.
New setting ... The setting of current COM port is changed.
Cancel button
Discards the setting change and closes the dialog.
Help button
Displays the help file.
Port
Serial port to be used. By default, maximum serial port number in the list is 256. It is configurable in MaxComPort setting.
Speed, Data, Parity, Stop bits, Flow control
Serial port parameters. Choose the appropriate parameters for the modem or the host.

The Speed can be specified with any number. Actually, the serial port driver may not reflect your speed.

Flow control can be configured in the following:
Xon/Xoff ... Software flow
RTS/CTS ... Hardware flow(RTS/CTS)
DSR/DTR ... Hardware flow(DSR/DTR)
none ... No flow control

Note: If Data is 7 bit, the XMODEM, ZMODEM, B PLUS and Quick-VAN protocols are disabled. If Flow control is Xon/Xoff, the XMODEM and Quick-VAN protocols are disabled.

Note: The "hardware" prior to version 4.104 applies to RTS/CTS.

Transmit delay
Time intervals between characters (lines) being sent, in milliseconds.
Detail information of COM port
The detail information of selected port is shown in the text box.
You can select all data by using CTRL+A. You can scroll horizontally by using CTRL/SHIFT + wheel.


Proxy([Setup] menu)

NOTICE: You need to save setup and restart Tera Term for enabling proxy settings.

"Proxy Setup" dialog box

Type
Configure Proxy type
  • Without Proxy: Do not use Proxy
  • HTTP: Use HTTP Proxy
  • TELNET: Use TELNET Proxy
  • SOCKS4: Use SOCKS4 Proxy *Protocol does not support IPv6.
  • SOCKS5: Use SOCKS5 Proxy
Hostname
Specify Proxy Server

The host name, IPv4 and IPv6 address can be specified.
The IPv6 address need not to be surround with the bracket.

Port number
Specify port number for Proxy server
Username
When an authentication is required for Proxy server, specify user name
Password
When an authentication is required for Proxy server, specify password
Other setup
Move to "Other Setup" menu

"Other Setup" menu

Common setup

Connection Timeout
The connection to Proxy will be reset if a communication with Proxy (including keep-alive) is lost for this time (seconds)
Proxy connection log
The communication with Proxy server will be logged in this file

SOCKS proxy setup

Specify a name resolution method by Name

auto resolve
Automated resolution
resolve remote
Resolution is done by SOCKS server
resolve local
Resolution is done by PC where Tera Term is running

TELNET Proxy setup

Configure TELNET Proxy parameters

Hostname prompt
Specify prompt characters for Host name
Username prompt
Specify prompt characters for User name
Password
Specify prompt characters for Password
Connected
Specify message for notice of connection completed
Error message
Specify message to notify error from Proxy server


SSH([Setup] Menu)

"TTSSH: Setup" Dialog box

Preferred cipher order
Specify the type of encryption for SSH with the order.
<ciphers below this line are disabled>
aes256-gcm@openssh.com | not RFC5647, PROTOCOL of OpenSSH
camellia256-ctr | draft-kanno-secsh-camellia-02
chacha20-poly1305@openssh.com | PROTOCOL.chacha20poly1305 of OpenSSH
aes256-ctr | RFC4344
camellia256-cbc | draft-kanno-secsh-camellia-02
aes256-cbc | RFC4253
camellia192-ctr | draft-kanno-secsh-camellia-02
aes192-ctr | RFC4344
camellia192-cbc | draft-kanno-secsh-camellia-02
aes192-cbc | RFC4253
aes128-gcm@openssh.com | not RFC5647, PROTOCOL of OpenSSH
camellia128-ctr | draft-kanno-secsh-camellia-02
aes128-ctr | RFC4344
camellia128-cbc | draft-kanno-secsh-camellia-02
aes128-cbc | RFC4253
3des-ctr | RFC4344
3des-cbc | RFC4253
blowfish-ctr | RFC4344
blowfish-cbc | RFC4253
cast128-ctr | RFC4344
cast128-cbc | RFC4253
3DES(SSH1)
arcfour256 | RFC4345
arcfour128 | RFC4345
arcfour | RFC4253
Blowfish(SSH1)
DES(SSH1)
SSH Known Hosts
Specify the file which includes a name of Host connected via SSH (and Public key for Host).
Host key rotation

Configure the host key rotation feature(OpenSSH 6.8 or later).

SSH server has the host key, however the host key may be changed for any reason.
In this case, SSH server sends a list of new host keys to client. Next, the server urges updating of host key lists to client.
TTSSH can support this feature. When a list of new host key is received, the known hosts list of client is updated.

No
Do not update the known hosts file.
Yes
Automatically update the known hosts file.
Ask
A user is asked to confirm the modifications to the known hosts file.
HeartBeat (keep-alive)
A Keep-alive packet is sent on a regular basis to maintain the connection (particularly useful under NAT). If 0 is specified, this feature is disabled.
Remember password in memory
The user password is preserved in the memory. The password in the memory is used by "Duplicate session" function. The password is deleted in the memory when Tera Term session disconnects.
Enable agent forwarding
The SSH agent forwarding is enabled using by the Pageant application.
Confirm agent forwarding
When the SSH agent-forwarding is requested, a user will confirm contacting the Pageant.
Verify host key fingerprint by DNS
The host key of the SSH server is verified by using the SSHFP Resource Record.
The result of this verification should be used only as a guide.
KEX order (SSH2 only)
Specify the type of KEX(Key Exchange) for SSH2 with the order.
<KEXs below this line are disabled>
ecdh-sha2-nistp256 | RFC5656
ecdh-sha2-nistp384 | RFC5656
ecdh-sha2-nistp521 | RFC5656
diffie-hellman-group18-sha512 | RFC8268
diffie-hellman-group16-sha512 | RFC8268
diffie-hellman-group14-sha256 | RFC8268
diffie-hellman-group-exchange-sha256 | RFC4419
diffie-hellman-group-exchange-sha1 | RFC4419
diffie-hellman-group14-sha1 | RFC4253
diffie-hellman-group1-sha1 | RFC4253
MAC order (SSH2 only)
Specify the type of MAC for SSH2 with the order.
<MACs below this line are disabled>
hmac-sha2-512-etm@openssh.com
hmac-sha2-256-etm@openssh.com
hmac-sha1-etm@openssh.com
hmac-sha2-512 | RFC6668
hmac-sha2-256 | RFC6668
hmac-sha1 | RFC4253
hmac-ripemd160-etm@openssh.com
hmac-ripemd160@openssh.com
hmac-md5-etm@openssh.com
hmac-md5 | RFC4253
hmac-ripemd160-etm@openssh.com
hmac-md5-96-etm@openssh.com
hmac-sha1-96 | RFC4253
hmac-md5-96 | RFC4253
Host key order (SSH2 only)
Specify the type of host key for SSH2 with the order.
<Host keys below this line are disabled>
ecdsa-sha2-nistp256 | RFC5656
ecdsa-sha2-nistp384 | RFC5656
ecdsa-sha2-nistp521 | RFC5656
ssh-ed25519 | draft-ietf-curdle-ssh-ed25519-02
ssh-rsa | RFC4253
ssh-dss | RFC4253
Compression order (SSH2 only)
Specify the type of compression key for SSH2 with the order.
<Compressions below this line are disabled>
zlib@openssh.com | Delayed compression(Starts compressing after authentication)
zlib
none | No compression
Compression level
Specify the level of compression for transmission. The more right, the more compression is done (note: it may degrade the throughout with a high-speed link such as ADSL or FTTH).
By using SSH1 protocol, when the Compression level is 0, the packet compression is disabled, or the Compression level is over 1, the compression is enabled.
By using SSH2 protocol, use the Compression order to enable the packet compression. And then, set the Compression level to 1 over.
LogLevel
Specify the debug level of TTSSH module.
When the debug level is greater than 0, the debug data is recorded in "TTSSH.LOG",
"ssh2connect.log" and "ssh2packet.log" under ttermpro.exe directory.
Value | Meaning
0 | Disabled
5 | Fatal
10 | Error
30 | Warning
50 | Notice
80 | Information
100 | Verbose
200 | SSH Dump


SSH Authentication([Setup] Menu)

"TTSSH: Authentication Setup" Dialog box

User name
Specify user name to be used for SSH connection.
When Check the supported authentication methods before login was checked, you can not change user name.
Do not enter username
Do not enter username.
Use default username
Use default username.
Default username is entered in the edit box.
However, nothing will be input if the edit box is empty.
Use logon username
Use Windows logon username.
Specify default authentication method.
Use plain password to log in
Specify Password if a password authentication is used.
Use RSA/DSA/ECDSA/ED25519 key to login
Choose an authentication method using RSA/DSA/ECDSA/ED25519 key which are previously generated.
Private key file
Specify OpenSSH format private key file.
TTSSH 2.63(Tera Term 4.76) later can support the PuTTY format and SECSH(ssh.com) format of the SSH2 private key.
Use rhost to login (SSH1)
Specify if rhost connection is allowed by Host.
Local user name
Specify user name.
Host private key file
Specify OpenSSH format private key file.
Use SSH1:challenge/response(TIS) / SSH2:keyboard-interactive to log in
SSH1
Choose if Challenge/Response authentication is available. It may be S/Key authentication depending on the server.
SSH2
Choose if keyboard-interactive authentication is available. This authentication method is used to log in to the server by using your password that has disabled password authentication such as FreeBSD.
Encrypted input data are sent to the server with the method. When a password is input for authentication, same as password authentication, encrypted password passes through.
Use Pageant
Choose an authentication method using RSA/DSA key with Pageant.
TTSSH does not handle a private key file.
Check the supported authentication methods before login (SSH2)
Modified to confirm the available authentication method for the server prior to login and invalidate unsupported method.
Modified to access the server by using only user name in background when displaying authentication dialog. In order for this feature to work, user name must be identified when a connection request is started. If user name is specified in a default user name or in a command line, it will be used.
If a focus is lost after user name is entered, a content of user name field is used and it can't be changed afterward.


SSH Forwarding ([Setup] menu)

"TTSSH: Forwarding" dialog box

SSH port forwarding

Port Forwarding

Add...
Add a port forwarding entry.
Edit...
Edit a selected entry.
Remove
Remove a selected entry.

X Forwarding

Display remote X application on local X server
Check this option if you want to redirect X11 connection over the secure channel.

"TTSSH: Forwarding Edit" dialog box

Edit each forward setting.

local forwarding

Forward local port
Source port to forward of local side.
listen
Listen address of local side. If omitted, localhost is used.
to remote machine
Destination host name of remote side.
port
Destination port number.

remote forwarding

Forward remote server port
Source port to forward of remote side.
listen
Listen address of remote side. If omitted, localhost is used.
It is not used with SSH1 protocol.
to local machine
Destination host name of local side.
port
Destination port number.

dynamic forwarding

Forward dynamic port
Source port to dynamic forward of local side. Port acts as a SOCKS proxy server.
listen
Listen address of local side. If omitted, localhost is used.


SSH Keygenerator ([Setup] Menu)

"TTSSH: Key Generator" Dialog box

Please refer to "Generating Key" of SSH connection for further detail.

Key type
Specify the type of key to generate.
RSA1
Generate SSH1 RSA key.
RSA
Generate SSH2 RSA key.
DSA
Generate SSH2 DSA key.
The DSA key does not have 1024 bits is invalid, so the key can not be generated because the key will not be used for some servers.
If the key bits is over 1024, the security level can not be stronger. Please use the RSA and ECDSA key algorithm if your security level is higher.
ECDSA-256
Generate SSH2 ECDSA(256bit) key.
ECDSA-384
Generate SSH2 ECDSA(384bit) key.
ECDSA-521
Generate SSH2 ECDSA(521bit) key.
ED25519
Generate SSH2 ED25519 key.
Key Bits
Specify the key length to generate.
bcrypt KDF
Specify the bcrypt KDF format of the private key.
Generate
Generate the key.
Key passphrase
Specify passphrase of private key.
Confirm passphrase
Confirm passphrase of private key. Please input the same passphrase as Key passphrase.
Save public key
Save public key.
Save private key
Save private key
The private key is encrypted by the AES-128 algorithm. The key is encrypted by the 3DES into the Tera Term 4.76(TTSSH 2.63) before.


TCP/IP ([Setup] menu)

"TCP/IP setup" dialog box

Host list
You can edit here the host list to be displayed in the [File] New connection dialog box. It is convenient to add your favorite hosts to the list. You can add not only host names and IP addresses, but also the command line parameters like the following:
      myhost.mydomain                   Host name only.
      myhost.mydomain:23                Host name with a port number.
      foohost.foodomain /F=FOOHOST.INI  Host name & setup file name.
      /C=1                              Specifies the serial port connection.
      /R=LOG.DAT                        Replays the log file.
History
If this option is selected, a host name entered in the [File] New connection dialog box is appended to the top of host list.
Auto window close
Closes Tera Term when the connection is closed.
TCP port#
TCP port number. Normally, port number 23 is used for the telnet protocol.
Telnet
Enables the telnet protocol. Usually, you should select this option.
Keep alive
This feature is called by Telnet keep-alive(heart-beat) mechanism. If this feature is enabled, Tera Term will send NOP message(IAC NOP: 255 241) periodically. 0 to turn off. The default value is 300 seconds.
Terminal type
Terminal type to be reported to the host when the telnet connection is established.
When TermType is set to "xterm" the applications (e.g. vim6) supporting ANSI color will appear in color. This function is from the original Tera Term.
You should specify "vt100" or "ANSI" for Windows Telnet Server. "xterm" will cause a problem.


General ([Setup] menu)

"General setup" dialog box

Default port
Default port type (TCP/IP or Serial) to be used when Tera Term is run without command line parameter.
Language
Language mode (English, Japanese, Korean, Russian or UTF-8) of the terminal emulation.
LanguageUI
The message catalog(menu and dialog message) can be changed by specifying the language file(lang\*.lng). Refer to Language file.


Additional settings([Setup] Menu)

"General" Tab

Enable clickable URL
Launches the web browser by clicking URL string.
Disable accelerator send break
Disables accelerator key of send break.
Accept broadcast
Accept the broadcast command.
Can be only enabled when the "Realtime mode" is off. However, this option is always ignored when the "Realtime mode" is on.
Mouse wheel scroll line
Configures the mouse wheel scroll line.
Auto scroll only in bottom line
Stop auto scrolling except when the bottom line is displayed.
Clear display when window resized
The current screen is cleared when the VT window resizes.
Change cursor shape with IME state
When the IME is enabled, the caret is gray.
List hidden fonts in font dialog
A feature that some fonts can be shown or not on the font list is added on Windows 7 or later. When this setting is enabled, whole fonts can be selected on the Font setting dialog.
Title format
Configures the window title format.
Display host/port name
Displays hostname or serial port name
Display session number
Displays session number
Display VT/TEK
Displays VT or TEK
Swap hostname and title position
Swaps the hostname and title text, displays hostname first.
Display tcp port number
Displays tcp port number (TCP/IP connection only)
Display serial port speed
Displays speed of serial port (serial connection only)

"Control Sequence" Tab

Accept mouse event tracking
Tera Term would send the escape sequence of the mouse operation when VT window is changed to the mouse tracking mode by the host application.
However, TERM environment variable should be "xterm" type.
Disable mouse event tracking when Control is pressed
The mouse tracking mode is enabled, TeraTerm does not send the mouse operation while the control key is pressed.
Accept window title change request
Configures whether a user accepts the window title changing.
off
Do not accept it.
overwrite
Accept it, and then display only the window tile.
ahead
Accept it, and then insert the window title before the canonical title.
last
Accept it, and then insert the window title after the canonical title.
Window title report
A user can configure how Tera Term can respond to the dtterm window title and icon label reporting request.
ignore
Ignore a window title reporting request.
accept
Tera Term reports the current window title. However, be careful about using this feature because the security problem will occur.
empty
Report empty string.
Window control sequence
added support for the position moving, the minimization, the maximization, the most front, the most back, the refresh and the window size changing(per pixel and character) control sequences regarding the dtterm window operation.
Window report sequence
This function enables the dtterm control sequence such as the window status reporting, the window position reporting, the window size(in pixel and character) reporting and the root window size reporting, among the window information reporting features.
If you do not want window information to be sent to remote host by some reason such as security, please disable this setting.
Cursor control sequence
Enables the control sequence for the cursor shape.
This function enables cursor shape change by cursor change sequence of DECSCUSR(cursor shape change), WYSTCURM(Wyse no-blinking cursor), WYULCURM(Wyse underlined cursor) and AT&T 610 blinking cursor.

If a user uses the vim editor, write below entries in the ~/.vimrc to enable this feature.

set t_SI=^[[3\ q
set t_EI=^[[1\ q
NOTE: Input ^[ by using Control-V Control-[.
If the cursor periodically blinks after an application exits, a user should configure as follows.
In the ncurses 5.7 terminfo, the invisible(civis)/normal display(cnorm)/highlighting(cvvis) of the xterm cursor are as follows:
civis=\E[?25l
cnorm=\E[?12l\E[?25h
cvvis=\E[?12;25h
When the upper configuration is enabled, the normal cursor displays with the non-blinking mode and the emphasis cursor displays with the blinking mode. So, the cursor does not blink when the terminfo application displays the own cursor.
If a user want to blink the cursor, turn off the CursorCtrlSequence entry or do in the following commands:
% infocmp xterm > xterm.ti
Open the xterm.ti file, change from a value of cnorm and cvvis to \E?25h.
% tic -o ~/.terminfo xterm.ti
Execute the tic command.
# tic xterm.ti
If the configuration is enabled as whole system, execute the upper command with a root user.
Clipboard access from remote
permits the host to access the clipboard.
off
can not permit
write only
can permit a clipboard to write
read only
can permit a clipboard to read
read/write
can permit a clipboard to write and read
Notify clipboard access from remote
Notifies the access of clipboard from remote host.
Accept clearing scroll buffer from remote
Enables the control sequence for clearing the scroll buffer. When enabled, the clear command clears the scroll buffer.

"Copy and Paste" Tab

Enable continued line copy
Concatenates current line with the next line including word characters when the whole line is stepped over.
Disable mouse R button paste
Disables pasting clipboard data when mouse right button is clicked.
Confirm mouse R button paste
Displays popup menu and confirm pasting clipboard data when mouse right button is clicked.
Select only by L button
Enable selection by mouse drag only with left button.
Trim trailing new line character when pasting
Remove trailing new line character when pasting.
Normalize line break when pasting
Normalize new line on pasting. When new line of clipboard is CR and LF, every new line is changed to CR+LF.
Confirm change paste
When the Clipboard includes CR/LF, the confirmation dialog can be shown to paste by right-click or Alt+V. This is a foolproof way.
String file
When the Clipboard includes any strings in the specified file, the confirmation dialog can be shown to paste by right-click or Alt+V. This is a foolproof way.
This function works when the ConfirmChangePaste is enabled.
Delimiter characters
Includes delimiter characters for the word selection.
Paste delay per line
A user can delay to send a line data to the remote host when the user pastes multiple lines. The delay time can be specified by this option on the millisecond time scale.
Disabling text selection when the window is activated
When an inactive window is activated by clicking the text area with the mouse, the text selection is disabled.

"Visual" tab

Window Opacity / Active
Window Opacity / Inactive
You can set up the value of opacity when the window is active (on focus) and not active (non-focus). The range of opacity is from 0 to 255. The more reduces the this value, the more window transparency is blinding.
Eterm lookfeel
Tera Term window looks like Eterm look-feel background transparency.
NOTICE: You need to save setup and restart Tera Term for enabling this settings.
Mixed ThemeFile to Background
When the Eterm look-feel feature is enabled, you can specify whether to mix the wallpaper and the image of theme file.
However, this option can not be used with Background Image at the same time.
Background Image
When the Eterm look-feel feature is enabled, an image file can be specified as background.
Image Brightness
When the Eterm look-feel feature is enabled, the brightness of an image file can be specified. The range of value is from 0 to 255.
The more brightness reduces the value, the more image brightens.

See also Background transparency.

MouseCursor
Mouse cursor can have one of the 4 shapes listed below:
ARROW = standard arrow cursor
IBEAM = ibeam cursor(default)
CROSS = cross cursor
HAND  = hand cursor
Font quality
Specifies the font quality. This feature will work well only if the operating system supports.
Default         = Dependent on OS configuration(Smooth edges of screen fonts).
Non-Antialiased = Disable the anti-aliasing.
Antialiased     = Enable the anti-aliasing.
ClearType       = Use the ClearType.
ANSI color
Specifies the RGB value of the color for PC style and aixterm style 16 colors mode.
Enable Bold attribute color
Enable Blink attribute color
Enable Reverse attribute color
Enable URL attribute color
Enable ANSI color
Enables each color attributes and color setting.
If ANSI color is disabled, 16 colors and 256 colors modes are also disabled.
Underline URL string
Enables Underline attribute on URL string.

"Log" tab

View log editor
Specify the editor that is used for display log file
Default log file name(strftime format)
Specify default log file name. It can include a format of strftime.
SYNOPSIS:
&h      Host name(or empty when not connecting)
&p      TCP port number(or empty when not connecting, not TCP connection)
&u      Logon user name
%a      Abbreviated weekday name
%A      Full weekday name
%b      Abbreviated month name
%B      Full month name
%c      Date and time representation appropriate for locale
%d      Day of month as decimal number (01 - 31)
%H      Hour in 24-hour format (00 - 23)
%I      Hour in 12-hour format (01 - 12)
%j      Day of year as decimal number (001 - 366)
%m      Month as decimal number (01 - 12)
%M      Minute as decimal number (00 -  59)
%p      Current locale's A.M./P.M. indicator for 12-hour clock
%S      Second as decimal number (00 - 59)
%U      Week of year as decimal number, with Sunday as first day of week (00 - 53)
%w      Weekday as decimal number (0 - 6; Sunday is 0)
%W      Week of year as decimal number, with Monday as first day of week (00 - 53)
%x      Date representation for current locale
%X      Time representation for current locale
%y      Year without century, as decimal number (00 - 99)
%Y      Year with century, as decimal number
%z, %Z  Either the time-zone name or time zone abbreviation, depending on registry settings;
    no characters if time zone is unknown
%%      Percent sign
Default log save folder
Specify default path to save log file. It is used when the log file name is not a full path.
Auto start logging
Start logging automatically when connecting. Default Log File Name is used for log file name.
When the /nolog command line is specified, this feature is always disabled.
Log Rotate
The log rotation is enabled. The extension of the rotated file is added .1, .2, .3 etc.
Size
The log file is rotated when it grows bigger than Size bytes. If the size is followed by KB, the size is assumed to be in kilobytes. If the MB is used, the size is in megabytes.
Rotate
The log file is rotated Rotate times before being removed. If the Rotate is 0, the old version is not removed rather than rotated.
Log option
Specify the log type.
Binary
If you select this option, received characters are written without any modifications. Otherwise, new-line codes are converted and escape sequences are stripped out.
Append
If you select this option and the specified log file already exists, received characters are appended to the file. Otherwise, the file is overwritten.
Plain text
If you select this option, ASCII non-printable characters are not written.
NOTE: When the Binary option is enabled, this option can not be checked and the value will be disabled.
Hide dialog
If you select this option, "Log" dialog box is not displayed.
Include screen buffer
If you select this option, the logging starts after current all buffer is written into a log file.
Timestamp
If you select this option, a timestamp is added on top of each log line. The timestamp is added when the first character of the line appears.
The timestamp type can be selected from following.
Local Time
Record the time in local time.
UTC
Record the time in UTC.
Elapsed Time (Logging)
Record the elapsed time from the start of logging.
Elapsed Time (Connection)
Record the elapsed time from the start of connection.
The timestamp format is specified with LogTimestampFormat when the timestamp type is "Local Time" and "UTC".
The LogTimestampFormat is ignored when the timestamp type is "Elapsed Time (Logging)" or "Elapsed Time (Connection)".
NOTE: When the Binary option is enabled, this option can not be checked and the value will be disabled.

"Cygwin" tab

Cygwin install path
Specify the install directory of Cygwin.
CygTerm
Configure CygTerm settings. Please refer to CygTerm+ setup file for details.

NOTE: The cygterm.cfg file is automatically updated after configuration on version 4.88 or earlier, however the file is not automatically updated on version 4.89 or later.
Please do Setup - Save Setup to update the cygterm.cfg file.


Save setup ([Setup] menu)

Saves the current setup to the Tera Term setup file.

"Save setup" dialog box

Enter or select the setup file name. If the file already exists, it is overwritten. If you omit the file name extension, the extension ".INI" is used.


Restore setup ([Setup] menu)

Restores the setup from the Tera Term setup file.

"Restore setup" dialog box

Enter or select the file name of the existing setup file. If you omit the file name extension, the extension ".INI" is assumed.


Setup directory ([Setup] menu)

The path to the configuration file stored in the memory is opened with the explorer.

The configuration file that Tera Term is storing in the memory can be below operated.
When the Virtual Store(Windows Vista or later) is enabled, the operation object is the Virtual Store directory.

...
The path to the configuration file is opened with the explorer.
Open File
The configuration file is opened with the application specified by the View log editor.


Load key map ([Setup] menu)

Load a keyboard configuration from a keyboard setup file.

"Load key map" dialog box

Enter or select the file name of the existing keyboard setup file. If you omit the file name extension, the extension ".CNF" is assumed.


[Control] menu

Reset terminal
Resets various terminal modes.
Are you there
Sends a AYT (Are You There) telnet signal. Usually, the host sends back some message responding to it. This command is available only with a telnet connection.
Send break
Sends a break signal to the host. Refer to sendbreak macro command.
Reset port
Resets the serial port. This command is available only with a serial connection.
Broadcast command
Display the dialog for the transmission of broadcast command.
Open TEK
Opens the TEK window.
Close TEK
Closes the TEK window.
Macro
Runs a macro file.
Show Macro Window
Shows the running macro window.


Broadcast command([Control] Menu)

If "Realtime mode" is off

Command input control
Input the command to be sent to each window.
Enter key
Choose an option whether new line is added or not after the transmission of the control command specified in above. A New line code can be chosen from the list of "CRLF", "CR", "LF".
Submit
Transmit the command. If "AcceptBroadcast" of the window is effective, the command will be received.
History
Choose an option whether to save the history of transmitted commands. A maximum number of history to be saved can be specified by "MaxBroadcatHistory" .
Send to this process only
If this option is chosen, the command will be transmitted only to the Tera Term window where "Broadcast command" dialog is specified.
Windows List
Choose the windows where the commands will be transmitted.

If "Realtime mode" is on

Command input control
Keys entered with this control focused will be transmitted to the windows that are chosen in the following window list. The command will be received by the window where "AcceptBroadcast" is even disabled.
Windows List
Choose the windows where the commands will be transmitted.


[Window] menu

You can activate one of existing Tera-Term windows by selecting it from the list in this menu. At most 9 windows can be listed in this menu. If actual number of windows exceeds 9 and you want to activate a window which is not in the list, use the Window command in this menu.

Window...
Activates or closes a Tera-Term window.
Minimize All
Minimize all Tera-Term window.
Restore All
Restore all Tera-Term window.
Cascade
Cascade, which puts windows in a single stack that has been fanned out so that the window title appear.
Stacked
Stacked, which puts windows in one or more vertical stacks depending on how many windows you have open.
Side By Side
Side by side, which places each window -open, but not maximized- on the desktop so you can see all the windows at once.
Undo - Cascade|Stacked|Side By Side
Undo the Tera Term window position after arranging windows.


Window ([Window] menu)

Activates or closes a Tera-Term window.

"Window list" dialog box

Window
List of existing Tera-Term windows. Select one from the list.
Open
Activates the selected window and closes this dialog box.
Close window
Closes the selected window.


[Help] menu

Index
Displays this help.
Using help
Displays the help about Windows Help.
About Tera Term...
Displays information about Tera Term.


[Resize] menu

The registered window list are shown on the menu bar.
When the entry is selected, the Tera Term window is automatically resized.

NOTICE

  • This feature can be only used by using the TTXResizeMenu plugin.
  • When no one menu entry is registered, the [Resize] menu can not be displayed. A user must register the menu entry.


[File] menu(TEK window)

Print...
Prints the current screen, or the selected portion of the screen.
Exit
Closes the TEK window.


Print (TEK window [File] menu)

"Print" dialog box

Print Range
If you choose All, the current screen is printed.
If you choose Selection, the selected portion of the screen is printed.


[Edit] menu (TEK window)

Copy
Copies a selected portion of the screen to the clipboard.
Copy screen
Copies the screen to the clipboard.
Paste
Sends text in the clipboard to the host.
Paste<CR>
Sends text in the clipboard to the host, and then send a new-line code.
Clear screen
Erases the screen.


[Setup] menu (TEK window)

Window...
Changes the window setup.
Font...
Changes the font.


Window (TEK window [Setup] menu)

"Window setup" dialog box

Title
Text displayed in the window title.
Cursor shape
Cursor shape. Block, Vertical line or Horizontal line.
Hide title bar
Hides the title bar and menu bar. You can move the window by dragging it with the left mouse button while pressing the Alt key. You can minimize the window by clicking the right mouse button while pressing the Alt key. Clicking the left mouse button while pressing the Ctrl key causes the pop-up menu to appear.
Hide menu bar
Hides the menu bar. Clicking the left mouse button while pressing the Ctrl key, causes the pop-up menu to appear.
Color emulation
Enables the emulation of colors for text and graphics. Note: Enabling this option consumes larger amount of memory.
Color
Text
Text color.
Background
Background color.
Reverse
Exchanges text color and background color.


Font (TEK window [Setup] menu)

Changes the font.

"Font" dialog box

Font
Select a font from the list.
Size
Select a font size in points.


[VT-window] command

Moves to VT window.


[Window] menu (TEK window)

You can activate one of existing Tera-Term windows by selecting it from the list in this menu. At most 9 windows can be listed in this menu. If actual number of windows exceeds 9 and you want to activate a window which is not in the list, use the Window command at the bottom of this menu.

Window...
Activates or closes a Tera-Term window.


[Help] menu (TEK window)

Index
Displays this help.
Using help
Displays the help about Windows Help.
About Tera Term...
Displays information about Tera Term.


Tera Term command line

TTERMPRO [ <host>[[:]<TCP port#>] | telnet://<host>[:<TCP port#>][/] | \\<server>\pipe\<pipe name>]
         [/B] [/BAUD=<speed>] [/C=<serial port#>] [/DS] [/E] [/ES]
         [/F=<setup file>] [/FD=<file transfer directory>]
         [/H] [/I] [/K=<keyboard setup file>]
         [/KR=<kanji code (receive)>] [/KT=<kanji code (transmit)>]
         [/L=<log file>] [/LA=<language>] [/M=<macro file>] [/NOLOG]
         [/P=<TCP port#>] [/R=<replay file>] [/SPEED=<speed>] [/T=<telnet flag>]
         [/TEKICON=<icon name>] [/TIMEOUT=<connecting timeout value>]
         [/V] [/VTICON=<icon name>] [/W="<window title>"] [/WAITCOM]
         [/X=<window pos (x)>] [/Y=<window pos (y)>] [/PIPE]
         [/AUTOWINCLOSE=<flag>] [/OSC52=<operations to permit>]
         [;<comment>]

Options

<host>
Host name or IP address.
<host>:<TCP port#>
<host> with a TCP port number.
":" is placed between <host> and <TCP port#>.
<host> <TCP port#>
<host> with a TCP port number.
Space character(s) between <host> and <TCP port#>.
Number just after <host> is interpreted as a port number.
telnet://<host>[:<TCP port#>][/]
URL style - for telnet handler
TCP port number and "/" at the end are optional.
If TCP port number is omitted, use 23. (TCPPort setting in setup file is ignored.)
\\<server>\pipe\<pipe name>
Pipe name.
Connects to a named pipe <pipe name> on the <server>.
Connects to local named pipe by specifying \\.\pipe\<pipe name>.
/B
Telnet binary option.
/BAUD=<speed>
speed of serial port. Same as the /SPEED= option. Actually, the serial port driver may not reflect your speed.
/C=<serial port#>
Serial port
  • /C=1 COM1
  • /C=2 COM2
  • /C=3 COM3
  • :
  • /C=256 COM256
By default, maximum serial port number is 256. It is configurable in MaxComPort setting.
/CDATABIT=<value>
Data bit of serial port
  • /CDATABIT=7 7bit
  • /CDATABIT=8 8bit
/CPARITY=<value>
Parity of serial port
  • /CPARITY=none none
  • /CPARITY=odd odd
  • /CPARITY=even even
  • /CPARITY=mark mark
  • /CPARITY=space space
/CSTOPBIT=<value>
Stop bit of serial port
  • /CSTOPBIT=1 1bit
  • /CSTOPBIT=1.5 1.5bit
  • /CSTOPBIT=2 2bit
/CFLOWCTRL=<value>
Flow control of serial port
  • /CFLOWCTRL=x Xon/Xoff
  • /CFLOWCTRL=hard RTS/CTS
  • /CFLOWCTRL=rtscts RTS/CTS
  • /CFLOWCTRL=none none
  • /CFLOWCTRL=dsrdtr DSR/DTR
/CDELAYPERCHAR=<value>
Transmission delay time per character of serial port(msec)
  • /CDELAYPERCHAR=n n millisecond
/CDELAYPERLINE=<value>
Transmission delay time per line of serial port(msec)
  • /CDELAYPERLINE=n nmillisecond
/DS
Disable displaying the "New connection" dialog on startup
/E
Disable TCPLocalEcho and TCPCRSend option
/ES
Enable displaying the "New connection" dialog on startup
When the port type is TCP/IP, "New connection" dialog is shown basically. However, the dialog can be not shown when HostDialogOnStartup is off. The /ES option can be forced to show the "New connection" dialog regardless of the setting.
When the port type is Serial, the "New connection" dialog does not be shown. Also, the /ES option can not be effected.
/F=<setup file>
Setup file
/F=TERATERM.INI (default)
If this value is not a full path, it is understood as a relative path from ttermpro.exe.
/FD=<file transfer directory>
File transfer directory
/H
Hide title bar.
/I
Iconify Tera Term window.
NOTICE: This mode can also be used with Windows task scheduler when a user is not logged in.
/K=<keyboard setup file>
Keyboard setup file
/K=KEYBOARD.CNF (default)
If this value is not a full path, it is understood as a relative path from ttermpro.exe.
/KR=<kanji code (receive)>
Note: Japanese, Korean and UTF-8 mode only
  • /KR=SJIS
  • /KR=EUC
  • /KR=JIS
  • /KR=UTF8 UTF-8(Normalization Form C: Windows, Linux)
  • /KR=UTF8m UTF-8(Normalization Form D: Mac OS X)
  • /KR=KS5601 for Korean mode
/KT=<kanji code (transmit)>
Note: Japanese and Korean mode only
  • /KT=SJIS
  • /KT=EUC
  • /KT=JIS
  • /KT=UTF8
  • /KT=KS5601 for Korean mode
/L=<log file>
Start Tera Term with logging.
/LA=<language>
Language mode.
  • /LA=E English
  • /LA=J Japanese
  • /LA=K Korean
  • /LA=R Russian
  • /LA=U UTF-8
/M=<macro file>
Start Tera Term with macro.
If this value is not a full path, it is understood as a relative path from ttermpro.exe.
/MN=<multicastname>
Multicast name for sendmulticast macro command.
/NOLOG
Start Tera Term without logging.
/OSC52=<operations to permit>
operations to permit for clipboard access from remote host.
  • /OCS52=off deny read and write access.
  • /OCS52=read permits read access only
  • /OCS52=write permits write access only
  • /OCS52=readwrite permits read and write access
/P=<TCP port#>
TCP port number
/R=<replay file>
Replay file
/SPEED=<speed>
speed of serial port. Same as the /BAUD= option. Actually, the serial port driver may not reflect your speed.
/T=<telnet flag>
  • /T=1 Enable telnet
  • /T=0 Disable telnet
/TEKICON=<icon name>
TEK window icon. Could be specified the same value of TEKIcon of setup file.
/TIMEOUT=<connecting timeout value>
Could be specified per seconds.
/V
Start Tera Term in hidden (invisible) state.
/VTICON=<icon name>
VT window icon. Could be specified the same value of VTIcon of setup file.
/W=<window title>
Window title
/WAITCOM
When serial port is specified with with /C= option and the port does not exist, Tera Term will wait for port connection.
/X=<window position (x)>
Windows position (horizontal)
/Y=<window position (y)>
Windows position (vertical)
/PIPE
Connects to a named pipe. The host name(pipe name) is ccomplemented by these rules:
  • If the host name begins with a \, the name is not changed.
  • If the host name does not include a \, the \\.\pipe\ is added at the beginning.
  • If the host name includes a \ anywhere but first, before that is treated as server name and after that is treated as pipe name.
/AUTOWINCLOSE=<flag>
AutoWinClose
  • /AUTOWINCLOSE=on Automatically close the window on disconnection.
  • /AUTOWINCLOSE=off Do not close the window on disconnection.
;<comment>
Comment. Should be last in the command line.

Examples

TTERMPRO
TTERMPRO myhost.example.com
TTERMPRO myhost.example.com:23
TTERMPRO myhost.example.com 23
TTERMPRO 192.0.2.1
TTERMPRO myhost.example.com /T=0 /P=7
TTERMPRO \\.\pipe\vmware-serial-port
TTERMPRO /C=1
TTERMPRO /F=TELNET.INI
TTERMPRO foohost.example.org /F=FOOHOST.INI
TTERMPRO /C=2 /SPEED=9600 /F=MYSETUP.INI
TTERMPRO /K=MYKEY.CNF /W="My host"
TTERMPRO /R=README.TXT ; replay a file
TTERMPRO myhost /B /X=100 /Y=50
TTERMPRO /PIPE pipename ; same as \\.\pipe\pipename

Default values

Following default values are stored in the Tera Term setup file:

<TCP port#>
/B
<speed>
<serial port#>
<file transfer directory>
/H
<kanji code (receive)>
<kanji code (transmit)>
<language>
<macro file>
<telnet flag>
<icon name>
<window title>
<window pos (x)>
<window pos (y)>

Note

[1] Only if <telnet flag> is 1 (on) and <TCP port#> is 23, Tera Term starts spontaneously sending telnet commands to the host for the option negotiation when the TCP/IP connection is established. In any cases, Tera Term can respond to telnet commands sent by the host.

[2] If the parameter value can include the space character and semicolon, a user should put the value in quotations by using `"' character.
If the value includes the `"' character, the user should write the `"' character two times.(version 4.63 or later)

/F="C:\Document and Settings\user\My Documents\teraterm\server1.INI"
/W="Tera Term"
/W="""Tera Term"""
/W="Tera;Term"

See also

Telnet port number / Terminal setup for non-telnet connection


Command line

TTPMACRO.EXE [/I] [/V] [<macro file> [<parameters>...]]

Options

/I
Iconify the macro window.
/V
Start MACRO in hidden (invisible) state.
<macro file>
Macro filename.
If this value is not a full path, it is understood as a relative path from ttpmacro.exe.
The filename(path excluded) is stored in the system variable "param1" and "params[1]".
<parameters>
Parameter(s) is passed to macro file.
The third argument of params system variable is stored into params[2] in a sequence.
Simultaneously, from param2 to param9 variables are also stored.

System variables

System variables of command line configuration are as follow.

params
String type array that parameters are stored
Whole string of command line is stored in params[0]. A macro filename is stored in params[1].
The third argument is stored into params[2] in a sequence.
param1
This is same as params[1]. A macro filename is stored.
From param2 to param9
Same as from params[2] to params[9].
The third argument is stored into variable in a sequence.
The variable that corresponds to params[10] or later does not exist.
paramcnt
The number of params array. The params[1] that stores a macro filename counts.

Every element of params array and from param1 to param9 can store a string of up to 511 characters.


TTSSH command line

You can use the following command line parameters on TTSSH.

Options

<username>@<host>[:<#TCP port>]
A user can specify the user name in front of at-mark.
<scheme>://[<username>[:<password>]@]<host>[:<TCP port>][/]
A user can the URL format.
A user can specify ssh, ssh1, ssh2, slogin, slogin1 and slogin2 at the <scheme>.
If the port number is not specified, 22 is used as the port number and then TCPPort value in teraterm.ini file is ignored.
/f=<file>
read teraterm.ini(file)
If this value is not a full path, it is understood as a relative path from ttxssh.dll.
/ssh-f=<file>
read teraterm.ini(file)
If this value is not a full path, it is understood as a relative path from ttxssh.dll.
/ssh-consume=<file>
After teraterm.ini file is read, it is erased.
If this value is not a full path, it is understood as a relative path from ttxssh.dll.
/t=<value>
  • value=2 SSH is enabled
  • value=excluding 2 SSH is disable
/nossh
disable SSH connection
/telnet
disable SSH connection
And use Telnet protocol. It is same as /T=1 of Tera Term.
/1
connect to server with SSH1 protocol
/ssh1
connect to server with SSH1 protocol
/2
connect to server with SSH2 protocol
/ssh2
connect to server with SSH2 protocol
/ssh-autologin
try to autologin with empty password
/ssh-autologon
try to autologin with empty password
/auth=<mode>
try to autologin with the authentication method that is specified by <mode>.
  • password Password Authentication
  • publickey Public Key Authentication
  • challenge SSH1:Challenge/Response(TIS) Authentication / SSH2:Keyboard-interactive Authentication
  • keyboard-interactive Same as the challenge
  • pageant Public Key Authentication with Pageant
/user=<username>
your username is specified
/passwd=<password>
your password is specified
/keyfile=<file>
your private key file is specified
When the file name is not the absolute path, the file is identified as the relative path.
/ask4passwd
disable autologin and ask for password
'/auth=<mode>' means only authentication method
/ssh-L[<listen_addr>:]<port1>:<host>:<port2>[,[<listen_addr>:]<port1>:<host>:<port2>[,...]]
port-forwarding from local listen-address(<listen_addr>) port(<port1>) to remote side host(<host>) port(<port2>)
if <listen_addr> is omitted, it listens at localhost.
/ssh-R[<listen_addr>:]<port1>:<host>:<port2>[,[<listen_addr>:]<port1>:<host>:<port2>[,...]]
port-forwarding from remote listen-address(<listen_addr>) port(<port1>) to local side host(<host>) port(<port2>)
if <listen_addr> is omitted, it listens at localhost.
<listen_addr> is not used with SSH1 protocol.
/ssh-D[<listen_addr>:]<port>[,[<listen_addr>:]<port>[,...]]
dynamic port-forwarding from local listen-address(<listen_addr>) port(<port>) to remote side host
Tera Term (ttssh) acts as a SOCKS proxy server.
if <listen_addr> is omitted, it listens at localhost.
/ssh-X[[<hostname>]:<displaynumber>[.<screennumber>]]
enable X11 forwarding
When the destination display is specified, the X11 connection is transferred to the display.
Or when the display is not specified, the transferred display will be determined.
  1. The X11Display entry of the [TTSSH] section in the teraterm.ini file
  2. The DISPLAY environment variable
  3. localhost:0.0
/ssh-A
enable agent forwarding
/ssh-a
disable agent forwarding
/ssh-agentconfirm=<on/off>
  • on confirm agent-forwarding request.
  • off don't confirm agent-forwarding request.
/ssh-v
setup the log level to VERBOSE mode
/ssh-C
enable compression(level=6)
/ssh-C=<level>
enable compression with compression level(0-9)
/ssh-c
disable compression
/ssh-icon=<icon>
specify the icon on SSH connection
  • flat A green icon on TTSSH2.77 or later.
  • green A green icon on TTSSH2.63 or later.
  • yellow A yellow icon on TTSSH2.62 earlier.
  • default A default icon(equal to flat).
/ssh-subsystem=<subsystem>
invoke the subsystem that is specified by <subsystem> instead of shell.
/ssh-N
don't start a shell session when starting a connection.
/nosecuritywarning
suppress SSH security warning(known_hosts). THIS OPTION PROHIBITED.
NOTICE: This option was created for the purpose of realizing automatic testing of equipment
in local environment like as a factory. You must not use this option when your network
contains the security risk. Please at you own risk in every case.

If the parameter value can include the space character and semicolon, a user should put the value in quotations by using `"' character. (version 4.63(TTSSH 2.51) or later)
If the value includes the `"' character, the user should write the `"' character two times. (version 4.63(TTSSH 2.51) or later)

Old specification
If the value include the '@', the user should put write `@' character. If the value includes the `@' character, the user should write the `@' character two times. (version 4.10 to 4.62(TTSSH 1.08 to 2.50))

Example

ttermpro.exe server1:22 /ssh /ssh-L30025:smtpsrv1:25 /ssh-L30110:pop3srv1:110
ttermpro.exe server1:22 /ssh /ssh-D1080
ttermpro.exe server2:22 /ssh /ssh-X
ttermpro.exe server2:22 /ssh /ssh-Xlocalhost:3.0
ttermpro.exe server3:22 /ssh /2 /auth=password /user=guest /passwd=guest
ttermpro.exe server4:22 /ssh /2 /auth=publickey /user=admin /keyfile=pathofkeyfile /ask4passwd
ttermpro.exe ssh://user:password@server5/ /auth=password
ttermpro.exe server6:22 /ssh /2 /auth=publickey /user=guest /keyfile="C:\Users\foo\Documents\My keys\id_ed25519" /passwd="Yu/eA;G2"
ttermpro.exe server7:22 /ssh /2 /auth=password /user=guest /passwd="foo""bar"

Example: Pageant collaboration

Setup Pageant in the startup folder.

C:\usr\pageant.exe c:\usr\Identity.ppk

How to connect with the public key authentication by using Pageant is shown as follows.

ttermpro.exe shell.osdn.net:22 /ssh /auth=pageant /user=yutaka


CygTerm+ Command Line Options

cygterm.exe [-t 'terminal-emulator'] [-p port-number] [-dumb]
            [-s 'shell'] [-ls | -nols] [-cd | -nocd] [-A | -a]
            [-v 'env-var' ...] [-d 'directory'] [-o 'option']
-t 'terminal-emulator'
Specify the command line of a terminal emulator to execute. This format is the same as TERM in the configuration file. The command line should be enclosed in quotes to include spaces.
-p port-number
Instead of executing a terminal emulator, try connection to this port number of localhost. It is considered another program uses `-p' option to use Cygwin via cygterm.exe
-dumb
Suppress the TELNET options negotiation. And ignore any TELNET commands sent from terminal side. The environment variable TERM is set to `dumb' on the shell side.
-s 'shell'
Specify the command line of a shell on Cygwin to execute. This format is the same as SHELL in the configuration file. The command line should be enclosed in quotes to include spaces. Any command can be specified even if a non-shell command.
-ls
Execute a shell as a login shell.
-nols
Execute a shell as a normal (not login) shell.
-cd
The current directory is moved to the user home directory and the shell is invoked.
-nocd
The shell is invoked without changing the current directory.
-A
Enable ssh-agent proxy support.
-a
Disable ssh-agent proxy support.
-v 'env-var'
Specify the environment variable to be set when starting the shell. This format is the same as ENV_X in the configuration file. The expression should be enclosed in quotes to include spaces. One or more `-v' options are available.
-d 'directory'
The current directory is moved to the specified directory and the shell is invoked.
-o 'option'
Additional parameter for terminal-emulator.

The terminal emulator or connection port number, and the shell on Cygwin, these need to be specified at least. If these are given on the command line, cygterm.exe can be run without configuration file cygterm.cfg.

cygterm.exe is a Win32 application which uses cygwin1.dll. It can be run from Cygwin command line or a shortcut on Windows.

* It is necessary the Windows environment variable PATH includes a directory path of cygwin1.dll (normally Cygwin-root\bin) to be run from Windows.


TTProxy command line

Format

You can use the following command line parameters on TTProxy.

-proxy=protocol://<user<:password>@>proxyserver:proxyport
protocol://<user<:password>@>proxyserver:proxyport/realhost
-noproxy
protocol
Proxy type
Supported proxy types are followings:
  • http
  • telnet
  • socks4
  • socks5
  • none
proxyserver
Proxy server host
proxyport
Proxy server port
realhost
Server host that you want to connect
user
User name for proxy authentication
password
Password for proxy authentication
-noproxy
Disable proxy setting. Same as "-proxy=none://"

Example

ttermpro.exe -proxy=socks5://user:pass@proxy:1080 sshserver /ssh
ttermpro.exe -proxy=telnet://proxy:8023 telnetserver:23 /nossh
ttermpro.exe -proxy=none:// sshserver /ssh
ttermpro.exe -noproxy sshserver /ssh

Note

The following style is invalid.

protocol://<user<:password>@>proxyserver:proxyport/realhost:portnumber

The following style isn't supported. This style conflicts with Tera Term parameter style "telnet://server<:port>".

protocol://<user<:password>@>proxyserver:proxyport


TTXttyplay command line

You can use the following command line parameters on TTXttyplay.

Options

/ttyplay
Enable TTXttyplay. Replay the file that specified by /R= option as ttyrec format.
/ttyplay-nowait
no-wait mode.

Example

ttermpro.exe /ttyplay /R="C:\Documents and Settings\doda\My Documents\record.tty"
ttermpro.exe /ttyplay /ttyplay-nowait /R=example.tty


Tera Term setup file

Tera Term is initialized by information contained in the setup file when Tera Term is started, or when the [Setup] Restore setup command is executed.
The file name of the setup file can be specified as a command line parameter of Tera Term. If you omit the file name extension, the default extension ".INI" is used.
If you omit the file name, TERATERM.INI in "My Documents"[*1] is used if there is TERATERM.INI in "My Documents." TERATERM.INI in teraterm directory is used if there is not TERATERM.INI in "My Documents."

[*1] My Documents default placement

OS | Placement
Vista/7/8/10 | %UserProfile%\Documents
2000/XP | %UserProfile%\My Documents
NT4.0 | C:\Winnt\Personal\USERNAME\Personal
ME | C:\My Documents, C:\WINDOWS\Profiles\USERNAME\My Documents
95/98 | C:\My Documents

All items of Tera Term setup file

The changed setup is not saved to set up file automatically. To save the current setup into the setup file, execute the [Setup] Save setup command.

Special options in the Tera Term setup file

You need to edit the Tera Term setup file directly to change the following setup items:

Terminal emulation

  • Back wrap
  • The motion receiving BEL character
  • Disabling the C1 (ASCII $80-$9F) control characters
  • Send C1 (ASCII $80-$9F) control characters
  • Displaying all received characters
  • Disabling the status line
  • Mouse code in TEK GIN report
  • Displaying tab at end of line like VT terminal
  • Scroll down the current buffer when the screen is clear
  • Display unsupported Unicode character as wide character
  • Mapping of Unicode to DEC special character
  • Mapping of the function key
  • Sending MSB set character with Alt key
  • Disabling the alternate screen buffer
  • Configure Terminal Unique ID
  • Changing Terminal Unique ID
  • Disabling tabstop modification
  • Limited BEL Over
  • Disabling ISO/IEC 2022 shift function

Window

  • Disabling auto text copying
  • Delimiters of a word selected by double clicking
  • Disabling the pop-up menu
  • Hiding the "Show menu bar" command
  • Disabling the language mode selection
  • Maximum scroll buffer size
  • Nonblinking cursor
  • Maximum number of lines to move in a jump scrolling
  • Disabling text selection when the window is activated by mouse
  • Title format
  • Actual colors of "white" and "black" colored text
  • Space between characters (lines)
  • Hiding the [Window] menu
  • Eterm lookfeel window
  • How to scroll the screen when the window size is maximized
  • Display the cursor even if the window comes out of focus
  • Fix the initial window position
  • Save the window position
  • Change the window icon
  • Delay for starting of text selection.

Communication

  • Maximum serial port number
  • Don't clear COM buffer when serial port opening
  • Disabling the warning on TCP/IP disconnection
  • Telnet binary option
  • Telnet echo option
  • Telnet log
  • Telnet port number / Terminal setup for non-telnet connection
  • Disable Auto-Detect mode of Telnet command
  • Disabling "Line at a time" mode
  • Pause time while the break signal is sending to the serial port
  • Automatic COM port Reconnection
  • Change the terminal speed notifies to server

File transfer

  • Auto renaming of a received file to avoid overwriting
  • Auto activation of B-Plus Receive
  • Escaping all control characters in the B-Plus protocol
  • B-Plus log
  • Kermit log
  • XMODEM log
  • Receive command for XMODEM
  • Timeout settings for XMODEM
  • Timeout settings for YMODEM
  • Auto activation of ZMODEM Receive / Send
  • Parameters for ZMODEM sending
  • Escaping all control characters in the ZMODEM protocol
  • ZMODEM log
  • Receive command for ZMODEM
  • Timeout settings for ZMODEM
  • File name filter for send file dialog
  • Confirmation of File Transfer by Drag & Drop
  • File Transfer Dialog is hidden
  • High Speed File Transfer on Serial Connection

Printing

  • Delay of path-through printing
  • Path-through printing directly to a port
  • Disabling the printing by the control sequence
  • Disabling the form-feed in the path-through printing
  • Printer font
  • Page margins
  • Scaling factors for printing
  • Russian code set of the printer font (Russian mode only)

Miscellaneous

  • Beep sound on connection
  • Executing a macro on startup
  • User interface language file
  • Number for the history of broadcast command
  • Mouse wheel action in application cursor mode
  • Showing "New Connection" dialog on startup
  • Enable paste by clicking the middle button of mouse
  • Disable "New connection" menu
  • Disable "Duplicate session" menu
  • Disable "Send break" menu
  • Clear the screen when disconnected
  • Disable accelerator key of New Connection
  • Disable accelerator key of Duplicate session
  • Disable accelerator key of Cygwin connection
  • A browser by using Clickable URL
  • Exclusive-lock log file
  • Deferred log write mode
  • Specify timestamp format at the start of log file's line
  • UTC is used at timestamp format of the start of log file's line

TTSSH

  • How to display authentication banner
  • Suppressing message box
  • Minimum group size for Diffie-Hellman Group Exchange
  • log level
  • Destination display for X11 transfer


Keyboard setup file

The keyboard setup file assigns keys on PC keyboard for various functions such as VT terminal functions, sending user defined character strings, Tera Term commands and executing macro files.

The default keyboard setup stored in the file KEYBOARD.CNF is almost compatible with VT terminal keyboard. You can modify key assignments by editing the file. See KEYCODE.TXT for the format of keyboard setup file.

The file name of keyboard setup file to be loaded by Tera Term can be specified as a command line parameter of Tera Term. If you omit the file name extension, the default extension ".CNF" is assumed. If you omit the file name, the default file KEYBOARD.CNF is loaded.

The distribution package contains the following keyboard setup files:

IBMKEYB.CNF
Sample file for the IBM-PC/AT 101-key keyboard
PC98KEYB.CNF
Sample file for the NEC PC 98 keyboard (Japanese Windows 95)
NT98KEYB.CNF
Sample file for the NEC PC 98 keyboard (Japanese Windows NT)
FUNCTION.CNF
A customize sample based on IBMKEYB.CNF
  • F1-F10 are modified
  • Editor keypad(*1) and Special keys(*2) are used to send a character sequence which displays a symbol on the key top of each VT200 terminal keyboard(*3).
EDITOR.CNF
A customize sample based on IBMKEYB.CNF
  • Editor keypad(*1) are used to send a character sequence which displays a symbol on the key top of each VT200 terminal keyboard(*3).
KEYBOARD.CNF
Default keyboard setup file (copy of EDITOR.CNF at the moment just after the installation)

(*1) Editor keypad mentioned here are Ins, Del, Home, End, PageUp and PageDown.
(*2) Special keys mentioned here are *, /, +, -, Ctrl+"+" on a Ten-Key pad.
(*3) The location of these keys on VT220 is different from a generic 101(106) keyboard. With a keyboard setup file other than FUNCTION.CNF and EDITOR.CNF, a character sequence to be sent is same as one of 101(106) keyboard. This is derived from the specification of original Tera Term Pro.
On the other hand, FUNCTION.CNF and EDITOR.CNF defines a character sequence which displays a symbol of each key top "as-is". By using this, special keys will behave as each symbol of key top when an application which utilizes special keys is run.

The installer will copy EDITOR.CNF on KEYBOARD.CNF. If you want to use a different key map, copy an appropriate file on KEYBOARD.CNF to meet your need.

If you want to use PC98 NX key map, use IBMKEYB.CNF.


TTSSH known_hosts file

The synopsis of 'known_hosts' file is as follows:

  SYNOPSIS:
    hostname key-type host-public-key

    #  comment
    !  negate

   EXAMPLE:
    192.168.1.2 ssh-rsa AAAAB3NzaC1...nXIDE=
    192.168.1.2 ssh-dss AAAAB3NzaC1...nXIDE=
    192.168.1.2 1024 35 13032138...794461
    #192.168.1.3 ssh-rsa AAAAB3NzaC1...nXIDE=
    192.168.1.2 1024 35 13032138...794461
    *.example.com,!mail.example.com ssh-rsa AAAAB3NzaC1...nXIDE=


CygTerm+ setup file

cygterm.cfg is a configuration file. This includes definitions for the command lines of a terminal emulator and a shell, and several parameters.
cygterm.cfg is loaded from the same directory cygterm.exe exists in.

An example of cygterm.cfg

TERM = C:\program files\ttermpro\ttermpro.exe %s %d /KR=SJIS /KT=SJIS
TERM_TYPE = vt100
PORT_START = 20000
PORT_RANGE = 40
SHELL = /bin/bash
ENV_1 = MAKE_MODE=unix
ENV_2 = HOME=/home
  :         :
TERM
This is the command line to execute a terminal emulator. Specify the full path to the command if it isn't in Windows search path. This needs to be described `%s' and `%d' for the host and port number.
TERM_TYPE
This terminal type is adopted when the terminal emulator did not give a terminal type. (default: vt100) Then this value is set to the environment variable TERM on a shell.
PORT_START
This is the minimum TCP port number allowed for use. (default: 20000)
PORT_RANGE
This is the maximum number of TCP ports allowed for use. (default: 40)
cygterm.exe looks for an unused port number between PORT_START and PORT_START+PORT_RANGE, and therefore can be run concurrently as many as this number.
SHELL
This is the command line to execute a shell in Cygwin side (normally /bin/bash). (default: get from /etc/passwd) Specify the full path to the shell or keyword "AUTO".
ENV_X
This is the environment variable to be set when starting the shell. It should be of the form `name=value' (like putenv). It is possible to give as many environment variables as needed by beginning with "ENV_".
LOGIN_SHELL
If this parameter is set to yes, shell is invoked as a login shell. (default: no)
HOME_CHDIR
If this parameter is set to yes, current directory is changed to home directory before invoke a shell. (default: no)
SOCKET_TIMEOUT
Specify the timeout of socket for waiting telnet connection from Tera Term. (default: 5 secs)


Language file

Tera Term's menu and dialog are assigned to English message.
A user can localize the message to make the language file.
And also, the user can specify the dialog font and the font size in the file.

Tera Term installer will copy Japanese, German, French, Russian, Korean and Chinese language file into the lang directory.
And also, the installer will write the language file name into the UILanguageFile entry in the TERATERM.INI file.

Font Settings

The installer copies the Default.lng file into the lang directory.
The font settings are as follows:

; A big font
DLG_SYSTEM_FONT=System,12,0
; A small font
DLG_TAHOMA_FONT=Tahoma,8,0

Describe a font name in the first entry.

Describe a font size in the second entry.

Describe a font character set in the third entry.

0   ANSI
1   Default charset
2   Symbol
77  Mac
128 Japanese(Shift_JIS)
129 Hangul(EUC-KR)
130 Hangul(Johab)
134 Simplified Chinese(GB2312)
136 Traditional Chinese(Big5)
161 Greek
162 Turkish
163 Vietnamese
177 HEBREW
178 Arabic
186 Baltic
204 Cyrillic
222 Thai
238 Central European
255 OEM/DOS

Refer to the lfCharSet member of the LOGFONT Structure for complete information.


    KEYCODE.EXE for Tera Term
    T. Teranishi

    Copyright (C) 1994-1998 T. Teranishi
    All Rights Reserved.

KEYCODE.EXE is a utility which displays key codes used in the
Tera Term's keyboard setup file. This text describes the usage of
KEYCODE.EXE and the format of keyboard setup file.

Please read this text and Tera Term help for changing the keyboard
configuration. Please do not ask the author questions about the
keyboard configuration.

-------------------------------------------------------------------------------
1. INSTALLATION

If you are using Windows 3.1 or NT 3.X, install KEYCODE.EXE
in Program Manager with its icon. If you are using Windows 95
or Windows NT 4.0, create a shortcut for KEYCODE.EXE in a folder
of your choice, in the Start menu or on the desktop.

-------------------------------------------------------------------------------
2. USAGE

When you run KEYCODE.EXE, the message "Push any key" will be displayed
in the window.	When you press a key or a combination of keys (such as
Ctrl+key), the message "Key code is XXXX." will be displayed. XXXX is a
decimal number.

-------------------------------------------------------------------------------
3. ABOUT THE KEYBOARD SETUP FILE

The keyboard setup file assigns keys on PC keyboard for various functions
such as VT terminal functions, sending user defined character strings,
executing Tera Term commands and executing macro files.

The default keyboard setup stored in the file KEYBOARD.CNF is almost
compatible with VT terminal keyboard. You can modify key assignments
by editing the file.

The file name of keyboard setup file to be loaded by Tera Term can be
specified as a command line parameter of Tera Term (see Tera Term help).
If you omit the file name extension, the default extension ".CNF" is used.
If you omit the file name, the default file KEYBOARD.CNF is loaded.

...............................................................................
3.1 FORMAT OF THE KEYBOARD SETUP FILE

Each key or key combination has a unique key code, which is called
"PC key code".

The keyboard setup file has six sections:  [VT editor keypad],
[VT numeric keypad], [VT function keys], [X function keys], [Shortcut keys]
and [User keys].

1) [VT editor keypad] section
In this section, VT editor keys are assigned to PC keys.

    Format:
        <VT editor key name>=<PC key code>

    where:

    <VT editor key name>
        Up, Down, Right, Left, Find, Insert, Remove, Select,
        Prev, Next

      <PC key code>
        PC key code (decimal number)

    Example:
        Up=328

2) [VT numeric keypad] section
In this section, VT numeric keys are assigned to PC keys.

    Format:
        <VT numeric key name>=<PC key code>

    where:

      <VT numeric key name>
        Num0, Num1, Num2, Num3, Num4, Num5, Num6, Num7, Num8,
        Num9, NumMinus, NumComma, NumPeriod, NumEnter, PF1,
        PF2, PF3, PF4

      <PC key code>
        PC key code (decimal number)

    Example:
        Num0=82

3) [VT function keys] section
In this section, VT function keys are assigned to PC keys.

    Format:
        <VT function key name>=<PC key code>

    where:

      <VT function key name>
        (Function keys of VT terminal)
        Hold, Print, Break, F6, F7, F8, F9, F10, F11, F12,
        F13, F14, Help, Do, F17, F18, F19, F20
        ("User defined keys" of VT terminal)
        UDK6, UDK7, UDK8, UDK9, UDK10, UDK11, UDK12, UDK13,
        UDK14, UDK15, UDK16, UDK17, UDK18, UDK19, UDK20

      <PC key code>
        PC key code (decimal number)

    Example:
        F6=64

4) [X function keys] section
In this section, Xterm F1-F5 keys and BackTab key are assigned to PC keys.

    Format:
        <Xterm function key name>=<PC key code>

    where:

      <Xterm function key name>
        XF1, XF2, XF3, XF4, XF5, XBackTab

      <PC key code>
        PC key code (decimal number)

    Example:
        XF1=59

5) [Shortcut keys] section
In this section, Tera Term functions are assigned to PC keys.

    Format:
        <Shortcut key name>=<PC key code>

    where:
      <Shortcut key name>	Function
      --------------------------------------------
      EditCopy		[Edit] Copy command
      EditPaste		[Edit] Paste command
      EditPasteCR		[Edit] Paste<CR> command
      EditCLS		[Edit] Clear screen command
      EditCLB		[Edit] Clear buffer command
      ControlOpenTEK	[Control] Open TEK command
      ControlCloseTEK	[Control] Close TEK command
      LineUp		Scrolls up screen by 1 line
      LineDown		Scrolls down by 1 line
      PageUp		Scrolls up by 1 page
      PageDown		Scrolls down by 1 page
      BuffTop		Scrolls screen to buffer top
      BuffBottom		Scrolls screen to buffer bottom
      NextWin		Moves to the next Tera Term window
      PrevWin		Moves to the previous Tera Term window
      NextShownWin		Moves to the next Tera Term window (except minimized)
      PrevShownWin		Moves to the previous Tera Term window (except minimized)
      LocalEcho		Toggles the local echo status

      <PC key code>
        PC key code (decimal number)

    Example:
        LineUp=1352

6) [User keys] section
This section defines user keys for functions, sending a character
string, executing a macro file or executing a menu command.

    Format:
        <User key name>=<PC key code>,<Control flag>,
                <Character string>

    where:

      <User key name>
        User1, User2, User3,...., User99
        Maximum number of user keys is 99.
        For example, if you want to define ten user keys,
        you must use the first ten names, from "User1" to "User10".

      <PC key code>
        PC key code (decimal number)

      <Control flag>
        Control flag which specifies how <character string>
        is treated when the PC key is pressed.
            0	<Character string> is sent as it is.
            1	New-line codes in <Character string>
                are converted by Tera Term and
                the converted string is sent.
            2	A macro file which has the name of
                <Character string> is executed.
            3	A Tera Term menu command specified
                by the menu ID <Character string> is
                executed.

      <Character string>
        If <Control flag> is 0 or 1, <Character string>
        represents the character string to be sent.
        A non-printable character (control character) in
        the string can be expressed as a "$" and ASCII code
        in two-character hex number. For example, CR character
        is expressed as "$0D". "$" itself is expressed as "$24".
        See "Appendix A  ASCII CODE TABLE".

        If <Control flag> is 2, <Character string> specifies
        the macro file name to be executed.

        If <Control flag> is 3, <Character string> is the menu
        ID which specifies the menu command to be executed.
        The menu ID should be expressed as a decimal number.
        See "Appendix B  LIST OF MENU IDs".

    Example:
        User1=1083,0,telnet myhost
        User2=1084,0,$0D$0A
        User3=1085,1,$0D
        User4=1086,2,test.ttl
        User5=1087,3,50110

...............................................................................
3.2 NOTE

You can use a PC key code only once in the setup file.
If you use a PC key code for multiple key assignments,
the warning message "Key code XXX is used more than once" is
displayed when the file is loaded by Tera Term. In this case,
one of the assignments becomes effective and others are ignored.

If you don't want to assign a key item to any PC key,
use the word "off" like the following:

EditCopy=off

...............................................................................
3.3 KEY COMBINATIONS

The following key combinations are acceptable to Tera Term and KEYCODE.EXE:

    Shift+key
    Ctrl+key
    Shift+Ctrl+key
    Shift+Alt+key
    Ctrl+Alt+key
    Shift+Ctrl+Alt+key

Since some combinations (such as Alt+key) are used as shortcut keys of
Tera Term and Windows, they don't have PC key codes and can't be specified
in the keyboard setup file.

[NOTE]
You can specify `Alt+key' combination when Alt key uses meta key. Check
`Meta key' under Keyboard of Setup menu. The key code can be obtained by
KEYCODE.EXE, unfortunately the key code of `Alt+key' combination can not
be obtained. Also, you obtain the key code and add 2048 on the value.

For example, the `V' key code is 47, also `Alt+V' key code is 2095.

; Shift + Insert
EditPaste=850

If you change above entry to `EditPaste=2095', you can paste by using
`Alt+V' on condition that Meta key is pass through.

You add in the following entry to [User keys] section in KEYBOARD.CNF if
you wan to paster by using `Alt+V' remaining `Shift+Insert' function.

User1=2095,3,50230

...............................................................................
3.4 Q & A

If you are in trouble with the keyboard configuration, please
read this text and Tera Term help carefully.
Please do not ask the author questions about the keyboard configuration.

Q. Every time I run Tera Term, the warning message
   "Key code XXX is used more than once" is displayed.
A. See "3.2 NOTE".

Q. I want to use the PC "F1" key as the VT100 PF1 key. I edit the
   keyboard setup file like the following but it does not work:

   [VT function keys]
   F1=PF1		(This is wrong.)

A. The left hand side can not be the name of a **PC key** but
   the name of a **VT terminal key**. The right hand side can not be
   the name of a key but a PC key code.
   See "3.1 FORMAT OF THE KEYBOARD SETUP FILE".
   You should also be careful not to specify a PC key code more than
   once in the setup file (see "3.2 NOTE").

   Edit the keyboard setup file like the following:

   [VT function keys]
   PF1=59			(59 is the keycode for the F1 key.)
   [X function keys]
   ;XF1=59			(Avoid specifying 59 twice.)
   XF1=off			(Replace 59 by "off".)

Q. How to edit the keyboard setup file to assign the F1 key
   for sending the escape sequence "ESC [ A"?
A. You can send any character string by using a user key.
   See "3.1 FORMAT OF THE KEYBOARD SETUP FILE".
   You should also be careful not to specify a PC keycode more than
   once in the setup file (see "3.2 NOTE").

   Edit the keyboard setup file like the following:

   [X function keys]
   ;XF1=59			(59 is the keycode for the F1 key.)
                (Avoid specifying 59 twice.)
   XF1=off			(Replace 59 by "off".)
   [User keys]
   User1=59,0,$1B[A		(The ASCII code for ESC is $1B.)

-------------------------------------------------------------------------------
APPENDIX A	ASCII CODE TABLE (HEXADECIMAL REPRESENTATION)

For example, the ASCII code for "A" is $41.

------------------------------------------------------------
 Char    Code | Char    Code | Char    Code | Char    Code |
------------------------------------------------------------
 NUL (^@) $00 | DLE (^P) $10 | SPACE    $20 | 0        $30 |
 SOH (^A) $01 | DC1 (^Q) $11 | !        $21 | 1        $31 |
 STX (^B) $02 | DC2 (^R) $12 | "        $22 | 2        $32 |
 ETX (^C) $03 | DC3 (^S) $13 | #        $23 | 3        $33 |
 EOT (^D) $04 | DC4 (^T) $14 | $        $24 | 4        $34 |
 ENQ (^E) $05 | NAK (^U) $15 | %        $25 | 5        $35 |
 ACK (^F) $06 | SYN (^V) $16 | &        $26 | 6        $36 |
 BEL (^G) $07 | ETB (^W) $17 | '        $27 | 7        $37 |
 BS  (^H) $08 | CAN (^X) $18 | (        $28 | 8        $38 |
 HT  (^I) $09 | EM  (^Y) $19 | )        $29 | 9        $39 |
 LF  (^J) $0A | SUB (^Z) $1A | *        $2A | :        $3A |
 VT  (^K) $0B | ESC (^[) $1B | +        $2B | ;        $3B |
 FF  (^L) $0C | FS  (^\) $1C | ,        $2C | <        $3C |
 CR  (^M) $0D | GS  (^]) $1D | -        $2D | =        $3D |
 SO  (^N) $0E | RS  (^^) $1E | .        $2E | >        $3E |
 SI  (^O) $0F | US  (^_) $1F | /        $2F | ?        $3F |
------------------------------------------------------------
 Char    Code | Char    Code | Char    Code | Char    Code |
------------------------------------------------------------
 @        $40 | P        $50 | `        $60 | p        $70 |
 A        $41 | Q        $51 | a        $61 | q        $71 |
 B        $42 | R        $52 | b        $62 | r        $72 |
 C        $43 | S        $53 | c        $63 | s        $73 |
 D        $44 | T        $54 | d        $64 | t        $74 |
 E        $45 | U        $55 | e        $65 | u        $75 |
 F        $46 | V        $56 | f        $66 | v        $76 |
 G        $47 | W        $57 | g        $67 | w        $77 |
 H        $48 | X        $58 | h        $68 | x        $78 |
 I        $49 | Y        $59 | I        $69 | y        $79 |
 J        $4A | Z        $5A | j        $6A | z        $7A |
 K        $4B | [        $5B | k        $6B | {        $7B |
 L        $4C | \        $5C | l        $6C | |        $7C |
 M        $4D | ]        $5D | m        $6D | }        $7D |
 N        $4E | ^        $5E | n        $6E | ~        $7E |
 O        $4F | _        $5F | o        $6F | DEL      $7F |
------------------------------------------------------------

...............................................................................
APPENDIX B	LIST OF MENU IDs

See "3.1 FORMAT OF THE KEYBOARD SETUP FILE" for specifying a menu ID.
Menu IDs may be changed in future.

1) VT window

Menu command                        ID
-----------------------------------------
[File] New connection               50110
[File] Duplicate session            50111
[File] Cygwin connection            50112
[File] Log                          50120
[File] Comment to Log               50121
[File] View Log                     50122
[File] Show Log dialog              50123
[File] Send file                    50130
[File] Transfer/Kermit/Receive      50141
[File] Transfer/Kermit/Get          50142
[File] Transfer/Kermit/Send         50143
[File] Transfer/Kermit/Finish       50144
[File] Transfer/XMODEM/Receive      50145
[File] Transfer/XMODEM/Send         50146
[File] Transfer/YMODEM/Receive      50157
[File] Transfer/YMODEM/Send         50158
[File] Transfer/ZMODEM/Receive      50151
[File] Transfer/ZMODEM/Send         50152
[File] Transfer/B-Plus/Receive      50153
[File] Transfer/B-Plus/Send         50154
[File] Transfer/Quick-VAN/Receive   50155
[File] Transfer/Quick-VAN/Send      50156
[File] Change dir                   50170
[File] Replay Log                   50171
[File] LogMeTT                      50172
[File] Print                        50180
[File] Disconnect                   50190
[File] Exit                         50199
[File] Exit All                     50200
[Edit] Copy                         50210
[Edit] Copy table                   50220
[Edit] Paste                        50230
[Edit] PasteCR                      50240
[Edit] Clear screen                 50250
[Edit] Clear buffer                 50260
[Edit] Cancel selection             50270
[Edit] Select screen                50280
[Edit] Select all                   50290
[Setup] Terminal                    50310
[Setup] Window                      50320
[Setup] Font                        50330
[Setup] Keyboard                    50340
[Setup] Serial port                 50350
[Setup] TCPIP                       50360
[Setup] General                     50370
[Setup] Additional settings         50375
[Setup] Save setup                  50380
[Setup] Restore setup               50390
[Setup] Setup directory             50391
[Setup] Load key map                50395
[Control] Reset terminal            50410
[Control] Are you there             50420
[Control] Send break                50430
[Control] Reset port                50440
[Control] Broadcast command         50445
[Control] Open TEK                  50450
[Control] Close TEK                 50460
[Control] Macro                     50470
[Control] Show Macro Window         50480
[Window] Window                     50810
[Window] Minimize All               50811
[Window] Restore All                50812
[Window] Cascade                    50813
[Window] Stacked                    50814
[Window] Side by Side               50815
[Window] Undo - XXX                 50816
[Help] Index                        50910
[Help] About Tera Term              50990

TTSSH Menu command                  ID
-----------------------------------------
[Setup] SSH                         52310
[Setup] SSH Authentication          52320
[Setup] SSH Forwarding              52330
[Setup] SSH KeyGenerator            52340
[Help] About TTSSH                  52910

TTProxy Menu command                ID
-----------------------------------------
[Setup] Proxy                       53310
[Help] About TTProxy                53910

TTXKanjiMenu Menu command           ID
-----------------------------------------
[KanjiCode] Recv: Shift_JIS         54010
[KanjiCode] Recv: EUC-JP            54011
[KanjiCode] Recv: JIS               54012
[KanjiCode] Recv: UTF-8             54013
[KanjiCode] Recv: UTF-8m            54014
[KanjiCode] Send: Shift_JIS         54110
[KanjiCode] Send: EUC-JP            54111
[KanjiCode] Send: JIS               54112
[KanjiCode] Send: UTF-8             54113
[KanjiCode] Use one setting         54200

TTXAlwaysOnTop Menu command         ID
-----------------------------------------
[Control] Always on top             55000
-- SetWindowPos(HWND_TOP)           55001 (not in menu)
-- SetWindowPos(HWND_BOTTOM)        55002 (not in menu)
-- SetWindowPos(HWND_TOPMOST)       55003 (not in menu)
-- SetWindowPos(HWND_NOTOPMOST)     55004 (not in menu)

TTXResizeMenu Menu command          ID
-----------------------------------------
[Resize] Menu(1) - Menu(20)         55101 - 55120
-- Increase window width            55151 (not in menu)
-- Decrease window width            55152 (not in menu)
-- Increase window height           55153 (not in menu)
-- Decrease window height           55154 (not in menu)

TTXViewMode Menu command            ID
-----------------------------------------
[Setup] ViewMode password           55200
[Control] View mode                 55210

TTXttyrec Menu command              ID
-----------------------------------------
[File] TTY Record                   55301

TTXttyplay Menu command             ID
-----------------------------------------
[File] TTY Replay                   55302

TTXRecurringCommand Menu command    ID
-----------------------------------------
[Setup] Recurring Command           55500
[Control] Recurring Command         55501
-- Enable Recurring Command         55502 (not in menu)
-- Disable Recurring Command        55503 (not in menu)

2) TEK window

Menu command                        ID
-----------------------------------------
[File] Print                        51110
[File] Exit                         51190
[Edit] Copy                         51210
[Edit] Copy screen                  51220
[Edit] Paste                        51230
[Edit] PasteCR                      51240
[Edit] Clear screen                 51250
[Setup] Window                      51310
[Setup] Font                        51320
[VTWin]                             51410
[Window] Window                     51810
[HELP] Index                        51910
[HELP] About Tera Term              51990


Oniguruma Regular Expressions Version 6.9.6    2020/07/31

syntax: ONIG_SYNTAX_ONIGURUMA (default syntax)

1. Syntax elements

  \       escape (enable or disable meta character)
  |       alternation
  (...)   group
  [...]   character class

2. Characters

  \t           horizontal tab         (0x09)
  \v           vertical tab           (0x0B)
  \n           newline (line feed)    (0x0A)
  \r           carriage return        (0x0D)
  \b           backspace              (0x08)
  \f           form feed              (0x0C)
  \a           bell                   (0x07)
  \e           escape                 (0x1B)
  \nnn         octal char                    (encoded byte value)
  \xHH         hexadecimal char              (encoded byte value)
  \x{7HHHHHHH} (1-8 digits) hexadecimal char (code point value)
  \o{17777777777} (1-11 digits) octal char   (code point value)
  \uHHHH       hexadecimal char              (code point value)
  \cx          control char                  (code point value)
  \C-x         control char                  (code point value)
  \M-x         meta  (x|0x80)                (code point value)
  \M-\C-x      meta control char             (code point value)

 (* \b as backspace is effective in character class only)

2.1 Code point sequences

  Hexadecimal code point  (1-8 digits)
  \x{7HHHHHHH 7HHHHHHH ... 7HHHHHHH}

  Octal code point  (1-11 digits)
  \o{17777777777 17777777777 ... 17777777777}

3. Character types

  .        any character (except newline)

  \w       word character

           Not Unicode:
             alphanumeric, "_" and multibyte char.

           Unicode:
             General_Category -- (Letter|Mark|Number|Connector_Punctuation)

  \W       non-word char

  \s       whitespace char

           Not Unicode:
             \t, \n, \v, \f, \r, \x20

           Unicode case:
             U+0009, U+000A, U+000B, U+000C, U+000D, U+0085(NEL),
             General_Category -- Line_Separator
                              -- Paragraph_Separator
                              -- Space_Separator

  \S       non-whitespace char

  \d       decimal digit char

           Unicode: General_Category -- Decimal_Number

  \D       non-decimal-digit char

  \h       hexadecimal digit char   [0-9a-fA-F]

  \H       non-hexdigit char

  \R       general newline  (* can't be used in character-class)
           "\r\n" or \n,\v,\f,\r  (* but doesn't backtrack from \r\n to \r)

           Unicode case:
             "\r\n" or \n,\v,\f,\r or U+0085, U+2028, U+2029

  \N       negative newline  (?-m:.)

  \O       true anychar      (?m:.)    (* original function)

  \X       Text Segment    \X === (?>\O(?:\Y\O)*)

           The meaning of this operator changes depending on the setting of
           the option (?y{..}).

           \X doesn't check whether matching start position is boundary or not.
           Please write as \y\X if you want to ensure it.

           [Extended Grapheme Cluster mode] (default)
             Unicode case:
               See [Unicode Standard Annex #29: http://unicode.org/reports/tr29/]

             Not Unicode case:  \X === (?>\r\n|\O)

           [Word mode]
             Currently, this mode is supported in Unicode only.
             See [Unicode Standard Annex #29: http://unicode.org/reports/tr29/]

  Character Property

    * \p{property-name}
    * \p{^property-name}    (negative)
    * \P{property-name}     (negative)

    property-name:

     + works on all encodings
       Alnum, Alpha, Blank, Cntrl, Digit, Graph, Lower,
       Print, Punct, Space, Upper, XDigit, Word, ASCII

     + works on EUC_JP, Shift_JIS
       Hiragana, Katakana

     + works on UTF8, UTF16, UTF32
       See doc/UNICODE_PROPERTIES.

4. Quantifier

  greedy

    ?       1 or 0 times
    *       0 or more times
    +       1 or more times
    {n,m}   (n <= m)  at least n but no more than m times
    {n,}    at least n times
    {,n}    at least 0 but no more than n times ({0,n})
    {n}     n times

  reluctant

    ??      0 or 1 times
    *?      0 or more times
    +?      1 or more times
    {n,m}?  (n <= m)  at least n but not more than m times
    {n,}?   at least n times
    {,n}?   at least 0 but not more than n times (== {0,n}?)

      {n}? is reluctant operator in ONIG_SYNTAX_JAVA and ONIG_SYNTAX_PERL only.
      (In that case, it doesn't make sense to write so.)
      In default syntax, /a{n}?/ === /(?:a{n})?/

  possessive (greedy and does not backtrack once match)

    ?+      1 or 0 times
    *+      0 or more times
    ++      1 or more times
    {n,m}   (n > m)  at least m but not more than n times

      {n,m}+, {n,}+, {n}+ are possessive operators in ONIG_SYNTAX_JAVA and
      ONIG_SYNTAX_PERL only.

    ex. /a*+/ === /(?>a*)/

5. Anchors

  ^       beginning of the line
  $       end of the line
  \b      word boundary
  \B      non-word boundary

  \A      beginning of string
  \Z      end of string, or before newline at the end
  \z      end of string
  \G      where the current search attempt begins
  \K      keep (keep start position of the result string)

  \y      Text Segment boundary
  \Y      Text Segment non-boundary

          The meaning of these operators(\y, \Y) changes depending on the setting
          of the option (?y{..}).

          [Extended Grapheme Cluster mode] (default)
            Unicode case:
              See [Unicode Standard Annex #29: http://unicode.org/reports/tr29/]

            Not Unicode:
              All positions except between \r and \n.

          [Word mode]
            Currently, this mode is supported in Unicode only.
            See [Unicode Standard Annex #29: http://unicode.org/reports/tr29/]

6. Character class

  ^...    negative class (lowest precedence)
  x-y     range from x to y
  [...]   set (character class in character class)
  ..&&..  intersection (low precedence, only higher than ^)

    ex. [a-w&&[^c-g]z] ==> ([a-w] AND ([^c-g] OR z)) ==> [abh-w]

  * If you want to use '[', '-', or ']' as a normal character
    in character class, you should escape them with '\'.

  POSIX bracket ([:xxxxx:], negate [:^xxxxx:])

    Not Unicode Case:

      alnum    alphabet or digit char
      alpha    alphabet
      ascii    code value: [0 - 127]
      blank    \t, \x20
      cntrl
      digit    0-9
      graph    include all of multibyte encoded characters
      lower
      print    include all of multibyte encoded characters
      punct
      space    \t, \n, \v, \f, \r, \x20
      upper
      xdigit   0-9, a-f, A-F
      word     alphanumeric, "_" and multibyte characters

    Unicode Case:

      alnum    Letter | Mark | Decimal_Number
      alpha    Letter | Mark
      ascii    0000 - 007F
      blank    Space_Separator | 0009
      cntrl    Control | Format | Unassigned | Private_Use | Surrogate
      digit    Decimal_Number
      graph    [[:^space:]] && ^Control && ^Unassigned && ^Surrogate
      lower    Lowercase_Letter
      print    [[:graph:]] | [[:space:]]
      punct    Connector_Punctuation | Dash_Punctuation | Close_Punctuation |
               Final_Punctuation | Initial_Punctuation | Other_Punctuation |
               Open_Punctuation
      space    Space_Separator | Line_Separator | Paragraph_Separator |
               U+0009 | U+000A | U+000B | U+000C | U+000D | U+0085
      upper    Uppercase_Letter
      xdigit   U+0030 - U+0039 | U+0041 - U+0046 | U+0061 - U+0066
               (0-9, a-f, A-F)
      word     Letter | Mark | Decimal_Number | Connector_Punctuation

7. Extended groups

  (?#...)            comment

  (?imxWDSPy-imxWDSP:subexp)  option on/off for subexp

                           i: ignore case
                           m: multi-line (dot (.) also matches newline)
                           x: extended form
                           W: ASCII only word (\w, \p{Word}, [[:word:]])
                              ASCII only word bound (\b)
                           D: ASCII only digit (\d, \p{Digit}, [[:digit:]])
                           S: ASCII only space (\s, \p{Space}, [[:space:]])
                           P: ASCII only POSIX properties (includes W,D,S)
                              (alnum, alpha, blank, cntrl, digit, graph,
                               lower, print, punct, space, upper, xdigit, word)

                           y{?}: Text Segment mode
                              This option changes the meaning of \X, \y, \Y.
                              Currently, this option is supported in Unicode only.

                              y{g}: Extended Grapheme Cluster mode (default)
                              y{w}: Word mode
                              See [Unicode Standard Annex #29]

  (?imxWDSPy-imxWDSP)  isolated option

                      * It makes a group to the next ')' or end of the pattern.
                        /ab(?i)c|def|gh/ == /ab(?i:c|def|gh)/

  (?:subexp)         non-capturing group
  (subexp)           capturing group

  (?=subexp)         look-ahead
  (?!subexp)         negative look-ahead

  (?<=subexp)        look-behind
  (?<!subexp)        negative look-behind

                     * Cannot use Absent stopper (?~|expr) and Range clear
                       (?~|) operators in look-behind and negative look-behind.

                     * In look-behind and negative look-behind, support for
                       ignore-case option is limited. Only supports conversion
                       between single characters. (Does not support conversion
                       of multiple characters in Unicode)

  (?>subexp)         atomic group
                     no backtracks in subexp.

  (?<name>subexp), (?'name'subexp)
                     define named group
                     (Each character of the name must be a word character.)

                     Not only a name but a number is assigned like a capturing
                     group.

                     Assigning the same name to two or more subexps is allowed.

  <Callouts>

  * Callouts of contents
  (?{...contents...})         callout in progress
  (?{...contents...}D)        D is a direction flag char
                              D = 'X': in progress and retraction
                                  '<': in retraction only
                                  '>': in progress only
  (?{...contents...}[tag])    tag assigned
  (?{...contents...}[tag]D)

                              * Escape characters have no effects in contents.
                              * contents is not allowed to start with '{'.

  (?{{{...contents...}}})     n times continuations '}' in contents is allowed in
                              (n+1) times continuations {{{...}}}.

    Allowed tag string characters: _ A-Z a-z 0-9 (* first character: _ A-Z a-z)

  * Callouts of name
  (*name)
  (*name{args...})            with args
  (*name[tag])                tag assigned
  (*name[tag]{args...})

    Allowed name string characters: _ A-Z a-z 0-9 (* first character: _ A-Z a-z)
    Allowed tag  string characters: _ A-Z a-z 0-9 (* first character: _ A-Z a-z)

  <Absent functions>

  (?~absent)         Absent repeater    (* proposed by Tanaka Akira)
                     This works like .* (more precisely \O*), but it is
                     limited by the range that does not include the string
                     match with <absent>.
                     This is a written abbreviation of (?~|(?:absent)|\O*).
                     \O* is used as a repeater.

  (?~|absent|exp)    Absent expression  (* original)
                     This works like "exp", but it is limited by the range
                     that does not include the string match with <absent>.

                     ex. (?~|345|\d*)  "12345678"  ==> "12", "1", ""

  (?~|absent)        Absent stopper (* original)
                     After passed this operator, string right range is limited
                     at the point that does not include the string match with
                     <absent>.

  (?~|)              Range clear
                     Clear the effects caused by Absent stoppers.

     * Nested Absent functions are not supported and the behavior
       is undefined.

  <if-then-else>

  (?(condition_exp)then_exp|else_exp)    if-then-else
  (?(condition_exp)then_exp)             if-then

               condition_exp can be a backreference number/name or a normal
               regular expression.
               When condition_exp is a backreference number/name, both then_exp and
               else_exp can be omitted.
               Then it works as a backreference validity checker.

  [ Backreference validity checker ]   (* original)

    (?(n)), (?(-n)), (?(+n)), (?(n+level)) ...
    (?(<n>)), (?('-n')), (?(<+n>)) ...
    (?(<name>)), (?('name')), (?(<name+level>)) ...

8. Backreferences

  When we say "backreference a group," it actually means, "re-match the same
  text matched by the subexp in that group."

  \n  \k<n>     \k'n'     (n >= 1) backreference the nth group in the regexp
      \k<-n>    \k'-n'    (n >= 1) backreference the nth group counting
                          backwards from the referring position
      \k<+n>    \k'+n'    (n >= 1) backreference the nth group counting
                          forwards from the referring position
      \k<name>  \k'name'  backreference a group with the specified name

  When backreferencing with a name that is assigned to more than one groups,
  the last group with the name is checked first, if not matched then the
  previous one with the name, and so on, until there is a match.

  * Backreference by number is forbidden if any named group is defined and
    ONIG_OPTION_CAPTURE_GROUP is not set.

  backreference with recursion level

    (n >= 1, level >= 0)

    \k<n+level> \k'n+level'
    \k<n-level> \k'n-level'

    \k<name+level> \k'name+level'
    \k<name-level> \k'name-level'

    Destine a group on the recursion level relative to the referring position.

    ex 1.

      /\A(?<a>|.|(?:(?<b>.)\g<a>\k<b>))\z/.match("reee")
      /\A(?<a>|.|(?:(?<b>.)\g<a>\k<b+0>))\z/.match("reer")

      \k<b+0> refers to the (?<b>.) on the same recursion level with it.

    ex 2.

      r = Regexp.compile(<<'__REGEXP__'.strip, Regexp::EXTENDED)
      (?<element> \g<stag> \g<content>* \g<etag> ){0}
      (?<stag> < \g<name> \s* > ){0}
      (?<name> [a-zA-Z_:]+ ){0}
      (?<content> [^<&]+ (\g<element> | [^<&]+)* ){0}
      (?<etag> </ \k<name+1> >){0}
      \g<element>
      __REGEXP__

      p r.match("<foo>f<bar>bbb</bar>f</foo>").captures

9. Subexp calls ("Tanaka Akira special")   (* original function)

  When we say "call a group," it actually means, "re-execute the subexp in
  that group."

  \g<n>     \g'n'     (n >= 1) call the nth group
  \g<0>     \g'0'     call zero (call the total regexp)
  \g<-n>    \g'-n'    (n >= 1) call the nth group counting backwards from
                      the calling position
  \g<+n>    \g'+n'    (n >= 1) call the nth group counting forwards from
                      the calling position
  \g<name>  \g'name'  call the group with the specified name

  * Left-most recursive calls are not allowed.

    ex. (?<name>a|\g<name>b)    => error
        (?<name>a|b\g<name>c)   => OK

  * Calls with a name that is assigned to more than one groups are not
    allowed.

  * Call by number is forbidden if any named group is defined and
    ONIG_OPTION_CAPTURE_GROUP is not set.

  * The option status of the called group is always effective.

    ex. /(?-i:\g<name>)(?i:(?<name>a)){0}/.match("A")

10. Captured group

  Behavior of an unnamed group (...) changes with the following conditions.
  (But named group is not changed.)

  case 1. /.../     (named group is not used, no option)

     (...) is treated as a capturing group.

  case 2. /.../g    (named group is not used, 'g' option)

     (...) is treated as a non-capturing group (?:...).

  case 3. /..(?<name>..)../   (named group is used, no option)

     (...) is treated as a non-capturing group.
     numbered-backref/call is not allowed.

  case 4. /..(?<name>..)../G  (named group is used, 'G' option)

     (...) is treated as a capturing group.
     numbered-backref/call is allowed.

  where
    g: ONIG_OPTION_DONT_CAPTURE_GROUP
    G: ONIG_OPTION_CAPTURE_GROUP

  ('g' and 'G' options are argued in ruby-dev ML)

-----------------------------
A-1. Syntax-dependent options

   + ONIG_SYNTAX_ONIGURUMA
     (?m): dot (.) also matches newline

   + ONIG_SYNTAX_PERL and ONIG_SYNTAX_JAVA
     (?s): dot (.) also matches newline
     (?m): ^ matches after newline, $ matches before newline

A-2. Original extensions

   + hexadecimal digit char type     \h, \H
   + true anychar                    \O
   + text segment boundary           \y, \Y
   + backreference validity checker  (?(...))
   + named group                     (?<name>...), (?'name'...)
   + named backref                   \k<name>
   + subexp call                     \g<name>, \g<group-num>
   + absent expression               (?~|...|...)
   + absent stopper                  (?|...)

A-3. Missing features compared with perl 5.8.0

   + \N{name}
   + \l,\u,\L,\U,\C
   + (??{code})

   * \Q...\E
     This is effective on ONIG_SYNTAX_PERL and ONIG_SYNTAX_JAVA.

A-4. Differences with Japanized GNU regex(version 0.12) of Ruby 1.8

   + add character property (\p{property}, \P{property})
   + add hexadecimal digit char type (\h, \H)
   + add look-behind
     (?<=fixed-width-pattern), (?<!fixed-width-pattern)
   + add possessive quantifier. ?+, *+, ++
   + add operations in character class. [], &&
     ('[' must be escaped as an usual char in character class.)
   + add named group and subexp call.
   + octal or hexadecimal number sequence can be treated as
     a multibyte code char in character class if multibyte encoding
     is specified.
     (ex. [\xa1\xa2], [\xa1\xa7-\xa4\xa1])
   + allow the range of single byte char and multibyte char in character
     class.
     ex. /[a-<<any EUC-JP character>>]/ in EUC-JP encoding.
   + effect range of isolated option is to next ')'.
     ex. (?:(?i)a|b) is interpreted as (?:(?i:a|b)), not (?:(?i:a)|b).
   + isolated option is not transparent to previous pattern.
     ex. a(?i)* is a syntax error pattern.
   + allowed unpaired left brace as a normal character.
     ex. /{/, /({)/, /a{2,3/ etc...
   + negative POSIX bracket [:^xxxx:] is supported.
   + POSIX bracket [:ascii:] is added.
   + repeat of look-ahead is not allowed.
     ex. /(?=a)*/, /(?!b){5}/
   + Ignore case option is effective to escape sequence.
     ex. /\x61/i =~ "A"
   + In the range quantifier, the number of the minimum is optional.
     /a{,n}/ == /a{0,n}/
     The omission of both minimum and maximum values is not allowed.
     /a{,}/
   + /{n}?/ is not a reluctant quantifier.
     /a{n}?/ == /(?:a{n})?/
   + invalid back reference is checked and raises error.
     /\1/, /(a)\2/
   + Zero-width match in an infinite loop stops the repeat,
     then changes of the capture group status are checked as stop condition.
     /(?:()|())*\1\2/ =~ ""
     /(?:\1a|())*/ =~ "a"

// END


  LICENSE ISSUES
  ==============

  The OpenSSL toolkit stays under a double license, i.e. both the conditions of
  the OpenSSL License and the original SSLeay license apply to the toolkit.
  See below for the actual license texts.

  OpenSSL License
  ---------------

/* ====================================================================
 * Copyright (c) 1998-2019 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 3. All advertising materials mentioning features or use of this
 *    software must display the following acknowledgment:
 *    "This product includes software developed by the OpenSSL Project
 *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
 *
 * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
 *    endorse or promote products derived from this software without
 *    prior written permission. For written permission, please contact
 *    openssl-core@openssl.org.
 *
 * 5. Products derived from this software may not be called "OpenSSL"
 *    nor may "OpenSSL" appear in their names without prior written
 *    permission of the OpenSSL Project.
 *
 * 6. Redistributions of any form whatsoever must retain the following
 *    acknowledgment:
 *    "This product includes software developed by the OpenSSL Project
 *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
 *
 * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
 * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
 * OF THE POSSIBILITY OF SUCH DAMAGE.
 * ====================================================================
 *
 * This product includes cryptographic software written by Eric Young
 * (eay@cryptsoft.com).  This product includes software written by Tim
 * Hudson (tjh@cryptsoft.com).
 *
 */

 Original SSLeay License
 -----------------------

/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
 * This library is free for commercial and non-commercial use as long as
 * the following conditions are aheared to.  The following conditions
 * apply to all code found in this distribution, be it the RC4, RSA,
 * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
 * included with this distribution is covered by the same copyright terms
 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
 *
 * Copyright remains Eric Young's, and as such any Copyright notices in
 * the code are not to be removed.
 * If this package is used in a product, Eric Young should be given attribution
 * as the author of the parts of the library used.
 * This can be in the form of a textual message at program startup or
 * in documentation (online or textual) provided with the package.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. All advertising materials mentioning features or use of this software
 *    must display the following acknowledgement:
 *    "This product includes cryptographic software written by
 *     Eric Young (eay@cryptsoft.com)"
 *    The word 'cryptographic' can be left out if the rouines from the library
 *    being used are not cryptographic related :-).
 * 4. If you include any Windows specific code (or a derivative thereof) from
 *    the apps directory (application code) you must include an acknowledgement:
 *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
 *
 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 *
 * The licence and distribution terms for any publically available version or
 * derivative of this code cannot be changed.  i.e. this code cannot simply be
 * copied and put under another distribution licence
 * [including the GNU Public Licence.]
 */


This file is part of the OpenSSH software.

The licences which components of this software fall under are as
follows.  First, we will summarize and say that all components
are under a BSD licence, or a licence more free than that.

OpenSSH contains no GPL code.

1)
     * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
     *                    All rights reserved
     *
     * As far as I am concerned, the code I have written for this software
     * can be used freely for any purpose.  Any derived versions of this
     * software must be clearly marked as such, and if the derived work is
     * incompatible with the protocol description in the RFC file, it must be
     * called by a name other than "ssh" or "Secure Shell".

    [Tatu continues]
     *  However, I am not implying to give any licenses to any patents or
     * copyrights held by third parties, and the software includes parts that
     * are not under my direct control.  As far as I know, all included
     * source code is used in accordance with the relevant license agreements
     * and can be used freely for any purpose (the GNU license being the most
     * restrictive); see below for details.

    [However, none of that term is relevant at this point in time.  All of
    these restrictively licenced software components which he talks about
    have been removed from OpenSSH, i.e.,

     - RSA is no longer included, found in the OpenSSL library
     - IDEA is no longer included, its use is deprecated
     - DES is now external, in the OpenSSL library
     - GMP is no longer used, and instead we call BN code from OpenSSL
     - Zlib is now external, in a library
     - The make-ssh-known-hosts script is no longer included
     - TSS has been removed
     - MD5 is now external, in the OpenSSL library
     - RC4 support has been replaced with ARC4 support from OpenSSL
     - Blowfish is now external, in the OpenSSL library

    [The licence continues]

    Note that any information and cryptographic algorithms used in this
    software are publicly available on the Internet and at any major
    bookstore, scientific library, and patent office worldwide.  More
    information can be found e.g. at "http://www.cs.hut.fi/crypto".

    The legal status of this program is some combination of all these
    permissions and restrictions.  Use only at your own responsibility.
    You will be responsible for any legal consequences yourself; I am not
    making any claims whether possessing or using this is legal or not in
    your country, and I am not taking any responsibility on your behalf.

                NO WARRANTY

    BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
    FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
    OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
    PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
    OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
    TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
    PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
    REPAIR OR CORRECTION.

    IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
    WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
    REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
    INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
    OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
    TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
    YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
    PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
    POSSIBILITY OF SUCH DAMAGES.

2)
    The 32-bit CRC compensation attack detector in deattack.c was
    contributed by CORE SDI S.A. under a BSD-style license.

     * Cryptographic attack detector for ssh - source code
     *
     * Copyright (c) 1998 CORE SDI S.A., Buenos Aires, Argentina.
     *
     * All rights reserved. Redistribution and use in source and binary
     * forms, with or without modification, are permitted provided that
     * this copyright notice is retained.
     *
     * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
     * WARRANTIES ARE DISCLAIMED. IN NO EVENT SHALL CORE SDI S.A. BE
     * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY OR
     * CONSEQUENTIAL DAMAGES RESULTING FROM THE USE OR MISUSE OF THIS
     * SOFTWARE.
     *
     * Ariel Futoransky <futo@core-sdi.com>
     * <http://www.core-sdi.com>

3)
    ssh-keyscan was contributed by David Mazieres under a BSD-style
    license.

     * Copyright 1995, 1996 by David Mazieres <dm@lcs.mit.edu>.
     *
     * Modification and redistribution in source and binary forms is
     * permitted provided that due credit is given to the author and the
     * OpenBSD project by leaving this copyright notice intact.

4)
    The Rijndael implementation by Vincent Rijmen, Antoon Bosselaers
    and Paulo Barreto is in the public domain and distributed
    with the following license:

     * @version 3.0 (December 2000)
     *
     * Optimised ANSI C code for the Rijndael cipher (now AES)
     *
     * @author Vincent Rijmen <vincent.rijmen@esat.kuleuven.ac.be>
     * @author Antoon Bosselaers <antoon.bosselaers@esat.kuleuven.ac.be>
     * @author Paulo Barreto <paulo.barreto@terra.com.br>
     *
     * This code is hereby placed in the public domain.
     *
     * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS
     * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
     * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE
     * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
     * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
     * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
     * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
     * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

5)
    One component of the ssh source code is under a 3-clause BSD license,
    held by the University of California, since we pulled these parts from
    original Berkeley code.

     * Copyright (c) 1983, 1990, 1992, 1993, 1995
     *      The Regents of the University of California.  All rights reserved.
     *
     * Redistribution and use in source and binary forms, with or without
     * modification, are permitted provided that the following conditions
     * are met:
     * 1. Redistributions of source code must retain the above copyright
     *    notice, this list of conditions and the following disclaimer.
     * 2. Redistributions in binary form must reproduce the above copyright
     *    notice, this list of conditions and the following disclaimer in the
     *    documentation and/or other materials provided with the distribution.
     * 3. Neither the name of the University nor the names of its contributors
     *    may be used to endorse or promote products derived from this software
     *    without specific prior written permission.
     *
     * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     * SUCH DAMAGE.

6)
    Remaining components of the software are provided under a standard
    2-term BSD licence with the following names as copyright holders:

    Markus Friedl
    Theo de Raadt
    Niels Provos
    Dug Song
    Aaron Campbell
    Damien Miller
    Kevin Steves
    Daniel Kouril
    Wesley Griffin
    Per Allansson
    Nils Nordman
    Simon Wilkinson

    Portable OpenSSH additionally includes code from the following copyright
    holders, also under the 2-term BSD license:

    Ben Lindstrom
    Tim Rice
    Andre Lucas
    Chris Adams
    Corinna Vinschen
    Cray Inc.
    Denis Parker
    Gert Doering
    Jakob Schlyter
    Jason Downs
    Juha Yrjölä
    Michael Stone
    Networks Associates Technology, Inc.
    Solar Designer
    Todd C. Miller
    Wayne Schroeder
    William Jones
    Darren Tucker
    Sun Microsystems
    The SCO Group

     * Redistribution and use in source and binary forms, with or without
     * modification, are permitted provided that the following conditions
     * are met:
     * 1. Redistributions of source code must retain the above copyright
     *    notice, this list of conditions and the following disclaimer.
     * 2. Redistributions in binary form must reproduce the above copyright
     *    notice, this list of conditions and the following disclaimer in the
     *    documentation and/or other materials provided with the distribution.
     *
     * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
     * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

8) Portable OpenSSH contains the following additional licenses:

    a) md5crypt.c, md5crypt.h

     * "THE BEER-WARE LICENSE" (Revision 42):
     * <phk@login.dknet.dk> wrote this file.  As long as you retain this
     * notice you can do whatever you want with this stuff. If we meet
     * some day, and you think this stuff is worth it, you can buy me a
     * beer in return.   Poul-Henning Kamp

    b) snprintf replacement

    * Copyright Patrick Powell 1995
    * This code is based on code written by Patrick Powell
    * (papowell@astart.com) It may be used for any purpose as long as this
    * notice remains intact on all source code distributions

    c) Compatibility code (openbsd-compat)

       Apart from the previously mentioned licenses, various pieces of code
       in the openbsd-compat/ subdirectory are licensed as follows:

       Some code is licensed under a 3-term BSD license, to the following
       copyright holders:

    Todd C. Miller
    Theo de Raadt
    Damien Miller
    Eric P. Allman
    The Regents of the University of California
    Constantin S. Svintsoff

    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
    * are met:
    * 1. Redistributions of source code must retain the above copyright
    *    notice, this list of conditions and the following disclaimer.
    * 2. Redistributions in binary form must reproduce the above copyright
    *    notice, this list of conditions and the following disclaimer in the
    *    documentation and/or other materials provided with the distribution.
    * 3. Neither the name of the University nor the names of its contributors
    *    may be used to endorse or promote products derived from this software
    *    without specific prior written permission.
    *
    * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
    * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
    * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    * SUCH DAMAGE.

       Some code is licensed under an ISC-style license, to the following
       copyright holders:

    Internet Software Consortium.
    Todd C. Miller
    Reyk Floeter
    Chad Mynhier

    * Permission to use, copy, modify, and distribute this software for any
    * purpose with or without fee is hereby granted, provided that the above
    * copyright notice and this permission notice appear in all copies.
    *
    * THE SOFTWARE IS PROVIDED "AS IS" AND TODD C. MILLER DISCLAIMS ALL
    * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
    * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL TODD C. MILLER BE LIABLE
    * FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
    * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
    * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
    * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

       Some code is licensed under a MIT-style license to the following
       copyright holders:

    Free Software Foundation, Inc.

    * Permission is hereby granted, free of charge, to any person obtaining a  *
    * copy of this software and associated documentation files (the            *
    * "Software"), to deal in the Software without restriction, including      *
    * without limitation the rights to use, copy, modify, merge, publish,      *
    * distribute, distribute with modifications, sublicense, and/or sell       *
    * copies of the Software, and to permit persons to whom the Software is    *
    * furnished to do so, subject to the following conditions:                 *
    *                                                                          *
    * The above copyright notice and this permission notice shall be included  *
    * in all copies or substantial portions of the Software.                   *
    *                                                                          *
    * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
    * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
    * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
    * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
    * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
    * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
    * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
    *                                                                          *
    * Except as contained in this notice, the name(s) of the above copyright   *
    * holders shall not be used in advertising or otherwise to promote the     *
    * sale, use or other dealings in this Software without prior written       *
    * authorization.                                                           *
    ****************************************************************************/

------
$OpenBSD: LICENCE,v 1.19 2004/08/30 09:18:08 markus Exp $


Copyright notice:

 (C) 1995-2017 Jean-loup Gailly and Mark Adler

  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
  arising from the use of this software.

  Permission is granted to anyone to use this software for any purpose,
  including commercial applications, and to alter it and redistribute it
  freely, subject to the following restrictions:

  1. The origin of this software must not be misrepresented; you must not
     claim that you wrote the original software. If you use this software
     in a product, an acknowledgment in the product documentation would be
     appreciated but is not required.
  2. Altered source versions must be plainly marked as such, and must not be
     misrepresented as being the original software.
  3. This notice may not be removed or altered from any source distribution.

  Jean-loup Gailly        Mark Adler
  jloup@gzip.org          madler@alumni.caltech.edu

If you use the zlib library in a product, we would appreciate *not* receiving
lengthy legal documents to sign.  The sources are provided for free but without
warranty of any kind.  The library has been entirely written by Jean-loup
Gailly and Mark Adler; it does not include third-party code.

If you redistribute modified sources, we would appreciate that you include in
the file ChangeLog history information documenting your changes.  Please read
the FAQ for more information on the distribution of modified source versions.


PuTTY is copyright 1997-2017 Simon Tatham.

Portions copyright Robert de Bath, Joris van Rantwijk, Delian
Delchev, Andreas Schultz, Jeroen Massar, Wez Furlong, Nicolas Barry,
Justin Bradford, Ben Harris, Malcolm Smith, Ahmad Khalifa, Markus
Kuhn, Colin Watson, Christopher Staite, and CORE SDI S.A.

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
(the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT.  IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


Oniguruma LICENSE
-----------------

Copyright (c) 2002-2021  K.Kosako  <kkosako0@gmail.com>
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
   notice, this list of conditions and the following disclaimer in the
   documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.


Copyright (c) 2006,2007 Mutsuo Saito, Makoto Matsumoto and Hiroshima
University.
Copyright (c) 2012 Mutsuo Saito, Makoto Matsumoto, Hiroshima University
and The University of Tokyo.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

    * Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above
      copyright notice, this list of conditions and the following
      disclaimer in the documentation and/or other materials provided
      with the distribution.
    * Neither the names of Hiroshima University, The University of
      Tokyo nor the names of its contributors may be used to endorse
      or promote products derived from this software without specific
      prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


                    GNU GENERAL PUBLIC LICENSE
                       Version 2, June 1991

 Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

                            Preamble

  The licenses for most software are designed to take away your
freedom to share and change it.  By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users.  This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it.  (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.)  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.

  To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have.  You must make sure that they, too, receive or can get the
source code.  And you must show them these terms so they know their
rights.

  We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.

  Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software.  If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.

  Finally, any free program is threatened constantly by software
patents.  We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary.  To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.

  The precise terms and conditions for copying, distribution and
modification follow.

                    GNU GENERAL PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License.  The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language.  (Hereinafter, translation is included without limitation in
the term "modification".)  Each licensee is addressed as "you".

Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope.  The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.

  1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.

You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.

  2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:

    a) You must cause the modified files to carry prominent notices
    stating that you changed the files and the date of any change.

    b) You must cause any work that you distribute or publish, that in
    whole or in part contains or is derived from the Program or any
    part thereof, to be licensed as a whole at no charge to all third
    parties under the terms of this License.

    c) If the modified program normally reads commands interactively
    when run, you must cause it, when started running for such
    interactive use in the most ordinary way, to print or display an
    announcement including an appropriate copyright notice and a
    notice that there is no warranty (or else, saying that you provide
    a warranty) and that users may redistribute the program under
    these conditions, and telling the user how to view a copy of this
    License.  (Exception: if the Program itself is interactive but
    does not normally print such an announcement, your work based on
    the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole.  If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works.  But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.

In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

  3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:

    a) Accompany it with the complete corresponding machine-readable
    source code, which must be distributed under the terms of Sections
    1 and 2 above on a medium customarily used for software interchange; or,

    b) Accompany it with a written offer, valid for at least three
    years, to give any third party, for a charge no more than your
    cost of physically performing source distribution, a complete
    machine-readable copy of the corresponding source code, to be
    distributed under the terms of Sections 1 and 2 above on a medium
    customarily used for software interchange; or,

    c) Accompany it with the information you received as to the offer
    to distribute corresponding source code.  (This alternative is
    allowed only for noncommercial distribution and only if you
    received the program in object code or executable form with such
    an offer, in accord with Subsection b above.)

The source code for a work means the preferred form of the work for
making modifications to it.  For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable.  However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.

If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.

  4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License.  Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.

  5. You are not required to accept this License, since you have not
signed it.  However, nothing else grants you permission to modify or
distribute the Program or its derivative works.  These actions are
prohibited by law if you do not accept this License.  Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.

  6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions.  You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.

  7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all.  For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices.  Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.

  8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded.  In such case, this License incorporates
the limitation as if written in the body of this License.

  9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

Each version is given a distinguishing version number.  If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation.  If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.

  10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission.  For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this.  Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.

                            NO WARRANTY

  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.

  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

                     END OF TERMS AND CONDITIONS

            How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation, Inc.,
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:

    Gnomovision version 69, Copyright (C) year name of author
    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary.  Here is a sample; alter the names:

  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  `Gnomovision' (which makes passes at compilers) written by James Hacker.

  <signature of Ty Coon>, 1 April 1989
  Ty Coon, President of Vice

This General Public License does not permit incorporating your program into
proprietary programs.  If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library.  If this is what you want to do, use the GNU Lesser General
Public License instead of this License.


* Development Environment
- OS
  Windows XP Professional / Windows 8 Pro / Windows 8.1 Pro / Windows 10 Pro
- Compiler used for release in Tera Term Project
-- Visual Studio 2005 SP1 Standard Edition (or higher edition)
   Service Pack 1 (VS80sp1-KB926601-X86-ENU.exe)
   Microsoft Visual Studio 2005 Service Pack 1 MFC Security Update (VS80sp1-KB2538218-v2-X86-INTL.exe)
   When Windows Vista or higher, Visual Studio 2005 Service Pack 1 Update for Windows Vista (VS80sp1-KB932232-X86-ENU.exe)
   Windows Server 2003 R2 Platform SDK(Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1)
   Note: The OpenSSL will not able to build by using the Visual Studio 2005 Standard Edition. So, install the Windows Server 2003 R2 Platform SDK to link the "Crypt32.Lib" library.
         Append to the beginning of INCLUDE and LIB of C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\vsvars32.bat, to be given priority for the INCLUDE and LIB directory of SDK installation directory.
         e.g. INCLUDE "C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include"
              LIB     "C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib"
- Supported Compiler
-- Visual Studio 2005 (Express Edition was supported from Tera Term 4.103)
   - SDK 7.0
     - Windows Server 2003 R2 Platform SDK
       (= Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1)
       (5.2.3790.2075.51.PlatformSDK_Svr2003R2_rtm.img)
     - unavailable on Microsoft website (at Apr 07, 2019).
   - SDK 7.1
     - Microsoft Windows SDK for Windows 7 and .NET Framework 4
       (GRMSDK_EN_DVD.iso)
     - built binary is able to run on Windows 95.
     - To use with Visual Studio 2005, KB949009(VS80sp1-KB949009-X86-INTL.exe) or KB980422(VS80sp1-KB980422-x86-INTL.exe) is necessary.
       - KB949009 and KB980422 are unavailable on Microsoft website.
-- Visual Studio 2008 SP1 Standard Edition (or higher edition)
   Note: The executable program which was compiled by this version does not work on Windows NT 4.0, 95, 98 and Me.
-- Visual Studio 2010 SP1 Professional Edition (or higher edition)
   Note: The executable program which was compiled by this version does not work on Windows 2000, NT 4.0, 95, 98 and Me.
-- Visual Studio 2012 Update 4 Professional Edition (or higher edition)
   Note: The executable program which was compiled by this version does not work on Windows Vista, XP, 2000, NT 4.0, 95, 98 and Me.
-- Visual Studio Community 2013 Update 5
   MFC MBCS DLL Add-on (vc_mbcsmfc.exe)
   Note: The executable program which was compiled by this version does not work on Windows Vista, XP, 2000, NT 4.0, 95, 98 and Me.
-- Visual Studio Community 2015 Update 3
   Note: The executable program which was compiled by this version does not work on Windows Vista, XP, 2000, NT 4.0, 95, 98 and Me.
-- Visual Studio Community 2017
   Note: The executable program which was compiled by this version does not work on Windows Vista, XP, 2000, NT 4.0, 95, 98 and Me.
-- Visual Studio Community 2019
   Note: The executable program which was compiled by this version does not work on Windows Vista, XP, 2000, NT 4.0, 95, 98 and Me.
- Installer
  Inno Setup 5.6.1 ANSI (http://www.jrsoftware.org/isinfo.php)
  Inno Setup Preprocessor
  ISTool 5.3.0.1 (https://sourceforge.net/projects/istool/)
- others
  Cygwin the latest version(because CygTerm+ supports Vista or later from v4.105)
  ActivePerl 5.10 or later version
    converts character-code and return-code of documents for building OpenSSL.
  Subversion for Windows (http://sourceforge.net/projects/win32svn/)
    Use the compatible version for check-outed svn version.
    Extract into libs\svn. ("svnversion.exe" is located in libs\svn\bin directory.)
  Patch
    When the patch command is not found in the path, please put the "patch.exe" into the libs\openssl_patch directory.
    Please download the Git-x.xx.x-32-bit.tar.bz2 from
    https://gitforwindows.org/ (https://github.com/git-for-windows/git/releases/latest). Next, extract the file and copy the  patch.exe, msys-gcc_s-1.dll, msys-2.0.dll of usr\bin directory.

* Libraries
- Oniguruma 6.9.7.1 (https://github.com/kkos/oniguruma)
- OpenSSL 1.1.1k (http://www.openssl.org/)
- zlib 1.2.11 (http://www.zlib.net/)
- PuTTY 0.70 (http://www.chiark.greenend.org.uk/~sgtatham/putty/)
- SFMT 1.5.1 (http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/index.html)
- The reference C implementation of Argon2 20190702 (https://github.com/P-H-C/phc-winner-argon2)

* Notice for SVN committer
- SVN repository for committer is the following:
  svn+ssh://svn.osdn.net/svnroot/ttssh2/branches/4-stable

- Should not edit checkout file in copying directory.
  The other modification code may be deleted in SVN server when you commit checkout file. Also, fix it carefully when the conflicting occurs.

- Should not have opened checkout file.
  SVN commit procedure may be failure while checkout file will have been opened.

- Edit language files
  Use the text editor supporting multi languages(vim, EmEditor, Notepad++, etc) to edit the language files(installer\release\lang\*.lng).

* Add entry to TERATERM.INI
- Entry name
Unfortunately, the confusing entries such as EnableFoo... and DisableBar... are included. It recommends that the new name like as Baz....

* Naming rule to add menu ID

The first digit is 5.

The second digit is:
  Tera Term VT window         0
  Tera Term TEK window        1
  TTSSH                       2
  TTProxy                     3
  TTXKanjiMenu                4

The third digit is:
  [File] menu                 1
  [Edit] menu                 2
  [Setup] menu                3
  [Control] menu              4
  [Window] menu               8
  [Help] menu                 9

Example: adding a TTSSH menu under File menu

#define ID_SSHSCPMENU       52110

* What to do when new macro command is added?

- Coding
-- get a new number of command internal ID.
   ... teraterm/ttmacro/ttmparse.h
-- add a if statement to below function.
   ... CheckReservedWord@teraterm/ttmacro/ttmparse.c
-- add a caller doing the macro command.
   ... ExecCmnd@teraterm/ttmacro/ttl.c
-- make a function code for the macro command.

- Help topic
-- make the command help file.
   ... doc/LANG/html/macro/command/hogefunc.html
-- add the file to help topic.
   ... doc/LANG/teraterm.hhc
-- get a new number of context ID in help page.
   The value is internal ID + 92000.
   ... teraterm/common/helpid.h
-- make the alias between context ID and calling file.
   Open the .hhp file by using Text Editor, added a html line in [ALIAS] tag.
   ... doc/LANG/teraterm.hhp

* How to build Libraries
  1. PuTTY (used by TTSSH)
     (1) Extract PuTTY source into libs/putty directory.

  2. Oniguruma (used by Tera Term Macro)
     (1) Extract oniguruma source into libs/oniguruma directory.
     (2) Launch 'Visual Studio 2005 Command Prompt' batch file from start menu.
     (3) Move 'libs' directory on the command prompt. And run buildoniguruma6.bat.

  3. OpenSSL (used by TTSSH)
     (1) Extract openssl source into libs/openssl directory.
     (2) When the libs/openssl/Makefile.bak file exists on the OpenSSL 1.0.0e or later, delete the file only once
     (3) Launch 'Visual Studio 2005 Command Prompt' batch file from start menu.
     (4) Move 'libs' directory on the command prompt. And run buildopenssl11.bat.

  4. Zlib (used by TTSSH)
     (1) Extract zlib source into libs/zlib directory.
     (2) Launch 'Visual Studio 2005 Command Prompt' batch file from start menu.
     (3) Move 'libs' directory on the command prompt. And run buildzlib.bat.

  5. SFMT (used by Tera Term Macro)
     (1) Extract SFMT source into libs/SFMT directory.
     (2) Launch 'Visual Studio 2005 Command Prompt' batch file from start menu.
     (3) Move 'libs' directory on the command prompt. And run buildSFMT.bat.
     (4) Modify version information in libs/SFMT/SFMT_version_for_teraterm.h if necessary.

  6. The reference C implementation of Argon2 (used by TTSSH)
     (1) Extract argon2 source into libs/argon2 directory.

* How to build Tera Term
  To build Tera Term source code is shown in the following step:
  And you should use Visual Studio 2005 Standard Edition later version to build Tera Term because Tera Term program links MFC library (Visual Studio 2005 Express Edition can't be used).

  1. Checkout Tera Term source code from OSDN(https://osdn.net/projects/ttssh2/).
  2. Open teraterm\visualc\ttermpro.sln with Visual Studio.
     The linefeed code of .sln file must be "CR+LF".
  3. Build Tera Term solution.
  4. Tera Term execution program will be generated in teraterm\visualc\bin directory if the building is successful.

* How to build TeraTerm Menu
  1. Checkout TeraTerm Menu source code from OSDN(https://osdn.net/projects/ttssh2/).
  2. Open ttpmenu\ttpmenu.sln with Visual Studio.
  3. Build ttpmenu solution.
  4. ttpmenu.exe will be generated in Release directory if the building is successful.

* How to build TTXKanjiMenu
  1. Checkout TTXKanjiMenu source code from OSDN(https://osdn.net/projects/ttssh2/).
  2. Open TTXKanjiMenu\ttxkanjimenu.sln with Visual Studio.
  3. Build ttpmenu solution.
  4. ttxkanjimenu.dll will be generated in TTXKanjiMenu directory if the building is successful.

* How to build TTProxy
  To build TTProxy source code is shown in the following step:
  And you need Visual Studio 2005(VC++8.0) to build.

  1. Checkout TTProxy source code from OSDN(https://osdn.net/projects/ttssh2/).
  2. Open TTProxy\TTProxy.sln with Visual Studio.
  3. Build TTProxy solution.
  4. TTProxy DLL module will be generated in TTProxy directory if the building is successful.

* How to build TTSSH
  To build TTSSH source code is shown in the following step:
  And you need Visual Studio 2005(VC++8.0) and ActivePerl to build.

  * VS2005 Express Edition is able to build TTSSH. TTSSH links to ttpcmn.lib and it must be created beforehand. VS2005 Express Edition cannot build Tera Term, but it can create ttpcmn.lib

  * On VS2008 Express Edition, following error occurs:
      .\ttxssh.rc(10) : fatal error RC1015: cannot open include file 'afxres.h'.

    To avoid this error, edit ttxssh.rc file. Delete the line of "afxres.h", and add 2 lines.

      - #include "afxres.h"
      + #include <windows.h>
      + #define IDC_STATIC -1

  1. Checkout TTSSH source code from OSDN(https://osdn.net/projects/ttssh2/).
  2. Open ttssh2\ttssh.sln with Visual Studio.
  3. Build TTSSH solution.
  4. TTSSH DLL will be generated in ttssh2\ttxssh directory if the building is successful.

* How to build CygTerm
  To build CygTerm source code is shown in the following step:

   1. Install Cygwin(https://www.cygwin.com/) to your PC.
   2. Launch Cygwin shell and go to cygterm directory.
      # cd cygterm
   3. Compile Cygterm.
      # make

* How to build TTXSamples
  To build TTXSamples source code is shown in the following step:
  And you need Visual Studio 2005(VC++8.0) to build.
  VS2005 Express Edition is able to build TTXSamples.

  1. Checkout TTXSamples source code from OSDN(https://osdn.net/projects/ttssh2/).
  2. Open TTXSamples\TTXSamples.sln with Visual Studio.
  3. Build TTXSamples solution.
  4. TTXSamples DLL module will be generated in TTXSamples directory if the building is successful.

* How to build HTML help file
  To build  HTML help file is shown in the following step:

  1. Install HTML Help Workshop from below site:
     http://www.microsoft.com/en-us/download/details.aspx?id=21138

  2. Copy document files with batch file on command prompt.
     > cd teraterm\insatller
     > convtext.bat

  3. Select Open of File menu and open doc\en\teraterm.hhp file or doc\jp\teratermj.hhp.

  4. Select Compile of File menu and HTML help file will be created.

* How to release Tera Term installation package
  To release Tera Term installation package is shown in the following step:

  0. Increment the version while RC release process.
     The binary is released for test in this timing. Prevent that old and new binary have same version number.
     - teraterm\common\tt-version.h
     - ttssh2\ttxssh\ttxssh-version.h
     - ttpmenu\ttpmenu.rc // only modifying
     - TTProxy\TTProxy.rc // only modifying
     - TTXKanjiMenu\ttxkanjimenu.rc // only modifying
     - installer\teraterm.iss
       version up AppVer and add "RC"
       comment out snapshot
       change called batch files
     Increment the year of last publication of copyright notice if it is first release in this year.
     - teraterm\keycode\keycode-version.rc // VERSIONINFO
     - teraterm\teraterm\tt-version.rc // VERSIONINFO
     - teraterm\ttpcmn\ttpcmn-version.rc // VERSIONINFO
     - teraterm\ttpdlg\ttpdlg.rc // dialog
     - teraterm\ttpfile\ttpfile-version.rc // VERSIONINFO
     - teraterm\ttpmacro\ttm-version.rc // VERSIONINFO
     - teraterm\ttpset\ttpset-version.rc // VERSIONINFO
     - teraterm\ttptek\ttptek-version.rc // VERSIONINFO
     - ttssh2\ttxssh\ttxssh.rc // dialog
     - ttssh2\ttxssh\ttxssh-version.rc // VERSIONINFO
     - ttpmenu\ttpmenu.rc // dialog, VERSIONINFO
     - TTProxy\TTProxy.rc // dialog, VERSIONINFO(en), VERSIONINFO(ja)
     - TTXKanjiMenu\ttxkanjimenu.rc // VERSIONINFO
     - installer\teraterm.iss
     - installer\release\license.txt // Tera Term, TTSSH, Cygterm+, TTProxy, TeraTerm Menu, TTX KanjiMenu
     - doc\en\html\index.html
     - doc\en\html\about\copyright.html // Tera Term, TTSSH, Cygterm+, TTProxy, TeraTerm Menu, TTX KanjiMenu
     - doc\en\html\macro\index.html
     - doc\ja\html\index.html
     - doc\ja\html\about\copyright.html // Tera Term, TTSSH, Cygterm+, TTProxy, TeraTerm Menu, TTX KanjiMenu
     - doc\ja\html\macro\index.html

  1. Check latest libraries and tools.
     Visual Studio
       http://www.microsoft.com/japan/msdn/vstudio/downloads/default.aspx
     Inno Setup
       http://www.jrsoftware.org/isdl.php
     Oniguruma
       https://github.com/kkos/oniguruma
     OpenSSL
       http://www.openssl.org/
     zlib
       http://www.zlib.net/
     PuTTY
       http://www.chiark.greenend.org.uk/~sgtatham/putty/
     SFMT
       http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/index.html
     CygTerm
       https://googledrive.com/host/0B1s-dM6d6yC4fmhEZ3c0VTNFWEFtV3daUlRGQmFHVnBmVHRybUNnUVliNWktNDRlZ2NnZTQ/index-e.html

  2. Check the document files.

  3. Increase the software version and modify date.
     - teraterm.iss
       remove "RC" from AppVer
     - html/about/hisotry.html

     Note: Don't update the version number until the release, because the installer does not overwrite file when versions are same.

     Note: By way of exception, CygTerm+ always upgrades not regarding Tera Term release process when the patch is committed. The release date is the day committed by a developer. The suffix of CygTerm+ version is patchlevel, and then a user can get gcc compiler for free.

  4. When CygTerm+ is changed from previous version, please build the software with 64bit Cygwin and replace cygterm\cygterm+-x86_64\cygterm.exe.

  5. Evaluate executable program file.
     - Make installer package
       Open "teraterm\installer\teraterm.iss" with ISTool and call [Project]-[Compile Setup] with InnoSetup.
     - Test Tera Term installation and evaluate it.

  6. Create SVN tag.
     The naming rule is `teraterm-version'(ex. teraterm-4_106).
     svn copy -m "Release 4.106" svn+ssh://svn.osdn.net/svnroot/ttssh2/branches/4-stable svn+ssh://svn.osdn.net/svnroot/ttssh2/tags/teraterm-4_106

  7. Re-checkout from svn tag.

  8. Make installer package
     - Edit "teraterm\installer\teraterm.iss"
       #define AppVer "4.???"
       ;#define snapshot GetDateTimeString('yyyymmdd_hhnnss', '', '');

       [InnoIDE_PreCompile]
       Name: makechm.bat
       ;Name: build.bat
       Name: build.bat; Parameters: rebuild

       [InnoIDE_PostCompile]
       Name: makearchive.bat; Parameters: release

       [PreCompile]
       Name: makechm.bat
       ;Name: build.bat
       Name: build.bat; Parameters: rebuild

       [PostCompile]
       Name: makearchive.bat; Parameters: release

       [_ISToolPreCompile]
       Name: makechm.bat
       ;Name: build.bat
       Name: build.bat; Parameters: rebuild

       [_ISToolPostCompile]
       Name: makearchive.bat; Parameters: release

     - Open "teraterm\installer\teraterm.iss" with ISTool and call [Project]-[Compile Setup] with InnoSetup.

  9. Update OSDN project site.
     - Add new release.
     - Submit news.

  10. Announce release to mailing list(in Japan).

  11. Update OSDN project home page.

  12. Delete snapshots.

  13. Announce release to Twitter.
      https://twitter.com/Tera_Term
      Post release announcement and pin.

  14. Update Chocolatey


libs directory

  • This directory for storing external libraries to build Tera Term.
  • Source, library and executable file are stored for each compiler.
  • Library is generated only once in advance.

Preparing

Visual Studio

  • cmake
    • It is OK if PATH is passed.
    • Do not use Cygwin's cmake(Not supporting for Visual Studio).
    • Use cmake 3.11.4 when Visual Studio 2005 is used.
  • perl
    • It is necessary for compiling OpenSSL, and converting character code of document and code of carriage return.
    • ActivePerl 5.8 or later, also cygwin perl.
    • It will be searched automatically if PATH is not passed.

MinGW common (experimental)

  • Can be built with MinGW on Cygwin,MSYS2,linux(wsl).
  • The cmake,make,(MinGW)gcc,(clang) and perl that work in each environment are required.

How to build

You need to use Internet service because some archives are automatically downloaded.

Case of Visual Studio

By using batch file

Execute buildall_cmake.bat, and select Visual Studio.

1. Visual Studio 16 2019
2. Visual Studio 15 2017
3. Visual Studio 14 2015
4. Visual Studio 12 2013
5. Visual Studio 11 2012
6. Visual Studio 10 2010
7. Visual Studio 9 2008
8. Visual Studio 8 2005
select no

When VS2005 is selected, you can download cmake 3.11.4 and install into libs\cmake-3.11.4-win32-x86.

By using cmake

Case of Visual Studio 2019 x86

cmake -DCMAKE_GENERATOR="Visual Studio 16 2019" -DARCHITECTURE=Win32 -P buildall.cmake

Case of Visual Studio 2017 x86

cmake -DCMAKE_GENERATOR="Visual Studio 15 2017" -P buildall.cmake

Case of Visual Studio 2017 x64

cmake -DCMAKE_GENERATOR="Visual Studio 15 2017 Win64" -P buildall.cmake`

When Visual Studio 2005 is used, cmake 3.11.4 or earlier(if cmake is installed in libs\cmake-3.11.4-win32-x86).

libs\cmake-3.11.4-win32-x86\bin\cmake.exe" -DCMAKE_GENERATOR="Visual Studio 8 2005" -P buildall.cmake

MinGW common

Using cmake in each environment.

cmake -DCMAKE_GENERATOR="Unix Makefiles" -P buildall.cmake

Regarding each directory

Library directory generated

  • Library *.h and *.lib are created in the following:
    • oniguruma_{compiler}
    • openssl_{compiler}
    • putty
    • SFMT_{compiler}
    • zlib_{compiler}

Downloaded archive directory

  • Downloaded archives are stored.
  • Downloading automatically.
  • Re-use these archives downloaded already.
  • Can be removed if these archives do not need after building.

Build directory

  • Building under build/oniguruma/{compiler}/.
  • Remove it in advance if rebuliding.
  • Can be removed if this do not need after building.


How to build by using cmake

  • You can build Tera Term by using cmake(EXPERIMENTAL).

cmake version

  • The final version of cmake supporting for Visual Studio 2005 is 3.11.4.
  • The ttpmacro.exe can not be built with Visual Studio 2005 Express.
  • This no restriction by using Visual Studio any version other than 2005(including Express).
  • When the cmake option is selected on Visual Studio 2017 installer, the cmake can be installed.

MinGW (very experimental)

  • You can create the binary file by using MinGW.
  • EXPERIMENTAL
  • The ttpmacro.exe can not be built with MinGW.

How to build library

  • You can prepare libraries used by Tera Term.
  • Refer to lib/build_library_with_cmake.md.
  • Refet to develop.txt.

How to build Tera Term

Please execute below commands on the top of source tree.

mkdir build_vs2005
cd build_vs2005
..\libs\cmake-3.11.4-win32-x86\bin\cmake.exe .. -G "Visual Studio 8 2005"
..\libs\cmake-3.11.4-win32-x86\bin\cmake.exe --build . --config release
  • Change a string after -G option according to Visual Studio version.
  • The sln file is created, so the file can be opened with Visual Studio.
  • If the cmake is included in path, you need not write the full path of cmake.
  • When Visual Studio is launched by sln file and is building, the Visual Studio can re-generate the project file after detecting changes to CMakeLists.txt. So, the sln file is manually created only once.

How to build Tera Term(MinGW)

Please execute below commands on the top of source tree by using the cmake available on MinGW.

mkdir build_mingw_test
cd build_mingw_test
cmake .. -G "Unix Makefiles"
make -j4


Tera Term Source Code Overview

  1. Foreword
  2. Required Skill Sets
  3. Tera Term Package Content
  4. Third Party Libraries
  5. Plug-in Support
  6. Reading and Writing Configuration File
  7. Secure Programming
  8. Compatibility with Obsolete Windows Versions
  9. Debugging Methods
  10. Multithreading
  11. DDE Communication
  12. SSH Design and Implementation in TTSSH
  13. Macro Language Design and Implementation
  14. Caret Control
  15. Serial Port
  16. Binary Transfer Protocols
This article was written by TeraTerm Project in February 2008. The original is in Japanese language and is available from ttssh2.osdn.jp. Yutaka Hirata and Boris Maisuradze translated the article to English in December 2015.

Foreword

This article describes the source code of Tera Term version 4.58 released in February 2008. The general architecture of Tera Term did not change since then, so this description can be considered as up-to-date.

Required Skill Sets

Most programs included in Tera Term package are written in programming language C. Part of the code is written in C++ and uses Microsoft Foundation Classes (MFC). Knowledge of Win32 API is also required because the source code contains lots of calls to Windows platform specific functions from Win32 API.
Microsoft Visual Studio 2005 Standard Edition or later is required to build the source code. Unfortunately, Express Edition cannot be used as it does not support MFC. Other compilers like C++ Builder, Turbo C++ Explorer and gcc cannot be used either.
The main source of information about programming for Windows is MSDN Library provided by Microsoft. Tera Term developers often use MSDN Library as a reference.
  • MSDN library
  • MSDN library(Japanese)

The core of Tera Term is written on C++. This should not cause a problem for those who only knows C language because the syntax of both languages is very close. Microsoft Visual C++ (VC++) supports the original ANSI C standard (C89) and does not support newer standard C99. VC++ has its own implementation of C99-like functions. The names of these functions start with underscore (_), which makes it easy to identify them. For example, the _snprintf() of VC++ is different from the snprintf() of ANSI C(C99).

CygTerm is written in C language and should be compiled using gcc compiler included in Cygwin package.

Tera Term Package Content

Tera Term installation package contains several binary files (.exe and .dll) and their relationship is shown on the drawing below. Executable files have extension ".exe". Dynamically linked libraries (DLL) that are called only when needed, have extension ".dll". All binary files are 32-bit programs (x86) and Tera Term developers currently do not test them in 64-bit OS environments like x86-64, or IA-64.
When a user launches Tera Term from desktop shortcut or from Start Menu, "ttermpro.exe" file is executed. Then "ttermpro.exe" calls five DLL files. Tera Term was not designed as all-in-one application intentionally to reduce memory consumption. In the initial design of the program is was assumed that when a number of Tera Term instances start they will share the same DLL files, i.e. only one instance of each DDL file will be loaded into the system memory.

Launching a macro script starts "ttpmacro.exe" program. Macro scripts can be executed by themselves because the Tera Term contains 2 separate programs: "ttermpro.exe" and "ttpmacro.exe". These two programs need to communicate with each other and they use Dynamic Data Exchange (DDE) as their communication mechanism. DDE is considered legacy in current Windows operating systems. If Microsoft decides to stop supporting DDE mechanism in future Windows releases, macro script execution will be impossible.

Plug-in DLL-s, like TTSSH, TTProxy and TTXKanjiMenu, are dynamically loaded by LoadLibrary() API call at Tera Term startup. DLL filename should follow the pattern "TTX*.DLL" defined in TTXInit()#ttplug.c function.

The "keycode.exe", "ttpmenu.exe", "LogMeTT.exe" and "TTLEdit.exe" are separate applications that are not in direct communication with Tera Term.

Third Party Libraries

It is inefficient to build advanced software from scratch, that's why Tera Term actively uses open source libraries. This, however, requires from developers to be careful and avoid license violations, especially GPL.
Several Tera Term modules are linked to open source libraries as shown on the drawing below.

The macro program is linked to regular expression library "Oniguruma", which allows to handle regular expressions in "waitregex", "strmatch" and "strreplace" macro commands.
Tera Term also calls this library to display Oniguruma version information in "About Tera Term" dialog box.

The macro program is linked to pseudorandom number generator "SFMT", which allows to generate random number in "random" macro command.

"TTSSH" module is linkd to "OpenSSL" library to perform cryptography related operations. One may think that OpenSSL library contains only Secure Socket Layer (SSL) protocol related functions used for secure web access, however that is wrong assumption. OpenSSL library also supports basic cipher algorithms, which are utilized by "TTSSH" module. Since Secure Layer related functions of the library are not used, it is very unlikely that "TTSSH" module will be compromised if a SSL related security hole is found in OpenSSL library.

"TTSSH" module is linkd to compression Library "zlib" to compress SSH packets. Packet compression is effective on low speed networks like for example with dial-up connections, however in high speed networks it may slow down communication. That's why packet compression function is disabled by default.

"TTSSH" module is linkd to terminal emulator "PuTTY." PuTTY package contains SSH authentication agent called "Pageant". TTSSH uses part of PuTTY source code to support Pageant based authentication method. Communication part and terminal emulation part of PuTTY source code is not used.

Note that these libraries are called statically (not via dynamic link). When compiling the source code with these libraries use "/MT" option. Tera Term doesn't use dynamic calls to the libraries because not all user environments can support such calls, which may cause Tera Term to crash.

Plug-in Support

Tera Term supports external plug-in functionality. Plug-ins should be written and compiled as dynamically linked libraries (DLL files). This allows developers to add new features to Tera Term without modifying its source code. Presence of a plug-in (.dll file) in Tera Term installation directory is enough for it to work.
TTSSH is typical example of Tera Term plug-in module. TTXSamples\ttxtest\ttxtest.c file contains a sample plug-in code. It is recommended to develop plug-ins based on this sample. "TTX KanjiMenu" source code (TTXKanjiMenu\ directory) is another example of practical and simple plug-in module.

Plug-in modules are loaded at Tera Term (ttermpro.exe) startup by TTXInit()#ttplug.c function. All DLL files matching "TTX*.DLL" naming pattern will be loaded. When multiple DLL modules are found, export function of each DLL module is loaded by Tera Term core in the order defined by "loadOrder" member of TTXExports structure as follows:

Module | Order
TTProxy | 0
TTSSH | 2500
TTX Kanji Menu | 5000

The lower is order number value - the higher is corresponding module's priority, i.e. the module with the lowest order number will be contacted by Tera Term core the first. For example, TTXModifyMenu() is called in the following order:
  • TTXModifyMenu()#ttplug.c -> TTProxy@TTXModifyMenu() -> TTSSH@TTXModifyMenu() -> TTX Kanji Menu@TTXModifyMenu()

Above function of the DLL module are called in order.
Export function of a plug-in should be defined as TTXExports structure, which is sent to Tera Term core by TTXBind() function. For example, TTXExports structure of TTX Kanji Menu plug-in looks like shown below. All unused functions are replaced with NULL pointers.
static TTXExports Exports = {
/* This must contain the size of the structure. See below for its usage. */
    sizeof(TTXExports),

/* This is the load order number of this DLL. */
    ORDER,

/* Now we just list the functions that we've implemented. */
    TTXInit,
    NULL, /* TTXGetUIHooks */
    NULL, /* TTXGetSetupHooks */
    NULL, /* TTXOpenTCP */
    NULL, /* TTXCloseTCP */
    NULL, /* TTXSetWinSize */
    TTXModifyMenu,
    TTXModifyPopupMenu,
    TTXProcessCommand,
    NULL, /* TTXEnd */
    NULL  /* TTXSetCommandLine */
};
The export function of the plug-in module should be designed in such a way that it does not interfere with other plug-ins. Also, when the plug-in module is called by Tera Term core, the module needs to check whether the request was sent to it, or to another module.
The table below contains the complete list of plug-in export functions.

Function | Description
TTXBind | This function is called at first. The function sends export function structure to Tera Term core.
TTXInit | This function is called right after TTXBind(). The function receives global variables (ts and cv) from Tera Term core and initialized plug-in module.
TTXGetUIHooks | This function can hook a dialog handle. The function is used to change the dialog interface of Tera Term. The hook targets are: &SetupTerminal, &SetupWin, &SetupKeyboard, &SetupSerialPort, &SetupTCPIP, &GetHostName, &ChangeDirectory, &AboutDialog, &ChooseFontDlg, &SetupGeneral, &WindowWindow
TTXGetSetupHooks | This function can hook to setup routine. The hooked function should call the original function. When several plug-in modules exist, each function is called in accordance with order number. The hook targets are: &ReadIniFile, &WriteIniFile, &ReadKeyboardCnf, &CopyHostList, &AddHostToList, &ParseParam
TTXOpenTCP | This function is called only for TCP connections; it should not be used for Serial connections. The function can hook to the socket interfaces: &Pclosesocket, &Pconnect, &Phtonl, &Phtons, &Pinet_addr, &Pioctlsocket, &Precv, &Pselect, &Psend, &Psetsockopt, &Psocket, &PWSAAsyncSelect, &PWSAAsyncGetHostByName, &PWSACancelAsyncRequest, &PWSAGetLastError
TTXCloseTCP | This function is called only for TCP connections; it should not be used for Serial connections. If there is a hook to one of the following socket interfaces, the function must restore the original interface prior to exit: &Pclosesocket, &Pconnect, &Phtonl, &Phtons, &Pinet_addr, &Pioctlsocket, &Precv, &Pselect, &Psend, &Psetsockopt, &Psocket, &PWSAAsyncSelect, &PWSAAsyncGetHostByName, &PWSACancelAsyncRequest, &PWSAGetLastError
TTXSetWinSize | This function is called when the terminal screen is resized.
TTXModifyMenu | This function is called when Tera Term menu is initialized. The function allows to insert new menu item into original Tera Term menu.
TTXModifyPopupMenu | This function is called when Tera Term pop-up menu is initialized. The function can add new pop-up menu item to the original pop-up menu.
TTXProcessCommand | This function is called when Tera Term menu is executed. The function can process the plug-in module menu.
TTXEnd | This function is called when Tera Term exits.
TTXSetCommandLine | This function is called when the command line parameter is processed during set up of new connection and also while duplicating existing connection. The original parameter of plug-in module is processed.

Reading and Writing Configuration File

Modern Windows applications use system Registry to store their settings. Tera Term, however, stores its configuration in .ini file because that was the common practice back in the days when Tera Term was created.
LogMeTT and TTLEdit programs included in Tera Term package store their configurations in system Registry.
Collector and CygTerm programs included in Tera Term package store their configurations in the local file.
Unlike other applications, Tera Term Menu stores its configuration in Registry, but if current directory contains "ttpmenu.ini" file, it will try to read configuration from this file even if the file is empty (0 bytes in size). Note that the tool does not migrate settings from Registry to .ini file, so you may need to re-create them if you decide to use .ini file.

When new entry is added to TERATERM.INI file it can be read with ReadIniFile()#ttset.c
    ts->ConfirmChangePaste =
        GetOnOff(Section, "ConfirmChangePaste", FName, TRUE);
Use WriteIniFile()#ttset.c to write into .ini file.
    WriteOnOff(Section, "ConfirmChangePaste", FName,
        ts->ConfirmChangePaste);
To read or write string entries use GetPrivateProfileString() and WritePrivateProfileString() Win32 API functions. For integer values use GetPrivateProfileInt() and WriteInt() from Win32 API.

Secure Programming

String Operation

Prior to Windows Vista default user account in Microsoft Windows had Administrator privileges. When an application run by administrator contains a bug causing buffer overflow error, a third-party can illegally obtain Administrator level privileges.
Traditionally string operations were causing majority of buffer overflow errors in C language. To address this Microsoft developed enhanced, more secure string operation functions and made them available in Visual Studio 2005.

  • Security Enhancements in the CRT(MSDN Library)

In order to increase Tera Term security every string operation related function was replaced in the source code with it's secure equivalent. Few examples of such replacements are shown in the table below.

Old | New
sprintf(), _snprintf() | _snprintf_s()
strcat(), strncat() | strncat_s()
strcpy(), strncpy() | strncpy_s()

Since these functions do not work well when default locale changes, Tera Term uses _snprintf_s_l() and similar functions instead.
Each of these functions have suffix "_s" (secure) in their names, which makes it easy to recognize them. Obviously, these functions are not compatible with ANSI C specification.

It should be noted that in these functions "count" argument (the maximum number of characters to store) is enforced by "_TRUNCATE" macro. If the buffer overflow can occurs, the string will be truncated to avoid this to happen.

An example of strncpy_s() function use is shown below. The second argument (numberOfElements) specifies the buffer size including terminating null (\0). Since the write buffer size is only three bytes, five bytes of data specified in the third argument (strSource) are truncates down to two bytes and null is added to the end. After executing these commands buf[] will contain the string "he\0".

char buf[3];
strncpy_s(buf, sizeof(buf), "hello", _TRUNCATE);
Below is an example of using strncat_s() function. The first argument (strDest) of strncat_s() function must have terminating null to concatenate strings. The second argument (numberOfElements) is specified with the buffer size that includes terminating null. In this example, when the first strncat_s() function is executed, five bytes (four chars + null) will be stored in str[]. When the second strncat_s() is executed, only two chars will be copied into the buffer, because there are only two free bytes remaining. After executing below code the buffer will contain "TeraTe\0" (4 chars + 2 chars + null).
char str[7];
str[0] = '\0';
strncat_s(str, sizeof(str), "Tera", _TRUNCATE);
strncat_s(str, sizeof(str), "Term", _TRUNCATE);
The final example demonstartes the use of _snprintf_s() function. Don't confuse this function with _snprintf() that doesn't add terminating null to the buffer. After execution of the code shown below buf[] will contain "ab\0".
char buf[3];
_snprintf_s(buf, sizeof(buf), _TRUNCATE, "abcdef");

Compatibility with Obsolete Windows Versions

Dynamic Loading

The same Microsoft Windows application executable file can work fine under different Windows versions if certain programming techniques are applied. For example, if we call API function SetLayeredWindowAttributes() that was introduced in Windows 2000, our application will fail under older Windows versions such as Windows NT4.0, or Windows 98. To be able to use newer API-s we need to dynamically load them with LoadLibrary() function.
static BOOL MySetLayeredWindowAttributes(HWND hwnd, COLORREF crKey, BYTE bAlpha, DWORD dwFlags)
{
    typedef BOOL (WINAPI *func)(HWND,COLORREF,BYTE,DWORD);
    static HMODULE g_hmodUser32 = NULL;
    static func g_pSetLayeredWindowAttributes = NULL;

    if (g_hmodUser32 == NULL) {
        g_hmodUser32 = LoadLibrary("user32.dll");
        if (g_hmodUser32 == NULL)
            return FALSE;

        g_pSetLayeredWindowAttributes =
            (func)GetProcAddress(g_hmodUser32, "SetLayeredWindowAttributes");
    }

    if (g_pSetLayeredWindowAttributes == NULL)
        return FALSE;

    return g_pSetLayeredWindowAttributes(hwnd, crKey,
                                         bAlpha, dwFlags);
}
The downside of this approach is - too much work creating prototypes for every function that will be used. The easier way to achieve the same result is to use a mechanism called "lazy loading DLL". If the function you want to use is not supported by older Windows version, you can specify it in Visual Studio project settings; mark the function as lazy loaded DLL.

Windows 95

Visual Studio 2005 and later versions no longer support Microsoft Windows 95. Binary executable files built by Visual Studio 2005 won't run on Windows 95. Visual Studio 2008 and 2010 no longer support Windows 98, NT4.0 and 2000. Windows XP support will also end in near future.

Currently Tera Term can run on Windows 95 despite the fact that it is compiled using Visual Studio 2005. The binary program built by Visual Studio 2005 by default contains link to IsDebuggerPresent function. This causes program to fail under Windows 95 because this function was first introduced in Windows 98. To resolve this issue dummy symbol replacing IsDebuggerPresent function was defined. This is certainly "unofficial" method not supported by Microsoft. For more details please check the header file comapt_w95.h.

  • comapt_w95.h

Debugging Methods

Debug printf

In general, Windows applications cannot use printf() function for debugging, because in these applications standard output is not defined. However, application can use printf() together with AllocConsole() and freopen().
Applications can also display messages in debug console of Visual Studio by using OutputDebugString() API calls. When debugger starts, such debug message can be shown regardless of "Debug build" or "Release build" setting. Furthermore, if external debugger is used, like for example DBCon, debug messages generated by OutputDebugString() will still be displayed.
Tera Term contains wrapper function allowing to send variable length arguments to OutputDebugString().
void OutputDebugPrintf(char *fmt, ...) {
    char tmp[1024];
    va_list arg;
    va_start(arg, fmt);
    _vsnprintf_s(tmp, sizeof(tmp), _TRUNCATE, fmt, arg);
    OutputDebugString(tmp);
}

Memory leak

Memory leaks occur when developer uses malloc() or similar function to allocate heap memory and then forgets to free it. Visual Studio has mechanism to automatically detect memory leaks. You just need to add below code to the beginning of your program. If any part of heap memory remains unreleased when the program terminates, Visual Studio will show it in the output window.
#ifdef _DEBUG
  _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
#endif
It should be noted that Windows allocates separate virtual memory region for each running process. If program ends and leaves unreleased memory, operating system will still release it.

Multithreading

Vast majority of modern Windows application use multithreading, however back in the days of Windows 3.1 and Windows 95 when Tera Term was born, this technique was considered a gimmick. Generally speaking Tera Term is singlethreaded application. As it can be seen from the source code, Tera Term uses lots of global variables and most of the procedures are not thread-safe.
However, there are few procedures that utilize _beginthreadex() API function to implement multithreading. The cases where multithreading is used are listed in the tables below.

Tera Term
Generating point | Source file
Serial connection | CommStart()#commlib.c
TELNET keep-alive | TelStartKeepAliveThread()#telnet.c
IPv4/v6 socket creation | WSAAsyncGetAddrInfo()#WSAAsyncGetAddrInfo.c

TTSSH
Generating point | Source file
SSH keep-alive | start_ssh_heartbeat_thread()#ssh.c
SCP sending | SSH2_scp_tolocal()#ssh.c
SCP receiving | SSH2_scp_fromremote()#ssh.c

As mentioned above, Tera Term and TTSSH are not thread-safe and problems may occur when new thread is created, or when send and receive procedures are interacting with the thread. However, there are cases when multithreading cannot be avoided. For example, a packet needs to be transmitted periodically in order to implement keep-alive (heartbeat) mechanism for TELNET and SSH protocols. Another example - while a file is being sent or received via SCP, user should be able to continue working in terminal window.
When Tera Term uses multithread model, hidden modeless window is created and a thread is generated by using the _beginthreadex() API function. Then the actual procedure works with this modeless window. While this method uses multithreading, it allows to keep the thread safe. The sample code is shown below.
#define WM_SEND_HEARTBEAT (WM_USER + 1)

static INT_PTR CALLBACK telnet_heartbeat_dlg_proc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp)
{

    switch (msg) {
        case WM_INITDIALOG:
            return FALSE;

        case WM_SEND_HEARTBEAT:
            TelSendNOP();
            return TRUE;
            break;

        case WM_COMMAND:
            break;

        case WM_CLOSE:
            return TRUE;

        case WM_DESTROY:
            return TRUE;

        default:
            return FALSE;
    }
    return TRUE;
}

static unsigned _stdcall TelKeepAliveThread(void *dummy) {
  static int instance = 0;

  if (instance > 0)
    return 0;
  instance++;

  while (cv.Open && nop_interval > 0) {
    if (time(NULL) >= cv.LastSendTime + nop_interval) {
        SendMessage(keepalive_dialog, WM_SEND_HEARTBEAT, 0, 0);
    }

    Sleep(100);
  }
  instance--;
  return 0;
}

void TelStartKeepAliveThread() {
  unsigned tid;

  if (ts.TelKeepAliveInterval > 0) {
    nop_interval = ts.TelKeepAliveInterval;

    keepalive_dialog = CreateDialog(hInst, MAKEINTRESOURCE(IDD_BROADCAST_DIALOG),
               HVTWin, telnet_heartbeat_dlg_proc);

    keepalive_thread = (HANDLE)_beginthreadex(NULL, 0, TelKeepAliveThread, NULL, 0, &tid);
    if (keepalive_thread == 0) {
      keepalive_thread = INVALID_HANDLE_VALUE;
      nop_interval = 0;
    }
  }
}

DDE Communication

Overview

Dynamic Data Exchange (DDE) mechanism was introduced in 1987 in Windows 2.0. While DDE allows to establish communication between processes, it is currently considered as legacy technique and is rarely used. Modern methods of inter-process communication are mailslot, named pipes and OLE.
Earlier versions of Microsoft Visual Studio contained DDE spy tool (DDESPY.EXE) that could capture DDE traffic, however this tool is not part of VS anymore.
More information about DDE is available from MSDN Library on Microsoft web site:

  • Dynamic Data Exchange(MSDN library)
  • Dynamic Data Exchange Management Library(MSDN library)

DDE communication is similar to TCP - both protocols allow to open peer-to-peer, client-server connection. Applications can establish DDE connectivity by calling functions from Dynamic Data Exchange Management Library (DDEML). Calls to DDEML functions are done the same way as the calls to Win32 API functions.
During DDE communication one process acts as a server and another acts as a client. Each DDE connection must have system-wide unique session identifier. TCP uses IP address and port number combination for this purpose, while DDE uses service name and topic name. DDE service name for Tera Term is constant string "TERATERM". Topic name is generated dynamically by translating the handle (HVTWin) of Tera Term core process into hexadecimal string.
Due to the nature of DDE, macro application can only communicate with one instance of Tera Term.
Tera Term core (ttermpro.exe) acts as DDE server and macro program (ttpmacro.exe) acts as DDE client as shown on the drawing above. DDE payload is called "transaction". Transactions can be of several different types that are listed in the following table. They are defined as macros in file "ddeml.h".

Type | Description
XTYP_ADVREQ | Informs the server that an advise transaction is outstanding for the specific topic name. The system sends this transaction to DDE callback function DdeCallback, then the server calls the DdePostAdvise function.
XTYP_POKE | DDE client uses XTYP_POKE transaction to send unsolicited data to the server.
XTYP_ADVSTART | Advise loop starts on the DDE server.
XTYP_ADVDATA | Informs periodically the client that the value of the data item has changed.
XTYP_EXECUTE | DDE client uses XTYP_EXECUTE transaction to send a command string to the server.

DDE has a feature called "advise loop". When DDE server enters advise loop, client will start receiving data periodically. Tera Term uses advise loop to repeatedly send data from remote host to macro application.

DDEML Library

DDEML Library functions used by Tera Term are listed below.

Function | Description
DdeInitialize | Initializes DDE and registers callback function. If the function succeeds, it returns DMLERR_NO_ERROR.
DdeCreateStringHandle | Creates a handle for a string. The handle is used for communication between the server and the client.
DdeNameService | Registers or unregisters the service name "TERATERM" in DDE server. If the registration succeeds, the XTYP_REGISTER transaction is send to the DDE client.
DdeCmpStringHandles | Compares two string handles.
DdeClientTransaction | Sends a transaction from the client to the server. Type of transactions can be specified. Examples of transaction types are: XTYP_REQUEST, XTYP_EXECUTE, XTYP_ADVSTART, XTYP_POKE. Timeout value can be set to define the maximum amount of time in milliseconds that the client will wait for a response (ACK) from the server. Tera Term uses timeout value of 5000 milliseconds (5 seconds).
DdeAccessData | Provides access to the data in the specified DDE object. An application must call the DdeUnaccessData function when it has finished accessing the data in the object.
DdeCreateDataHandle | Creates the DDE object and returns the handle. The handle is used for the DDE server's advise loop, also to send data to DDE client when XTYP_REQUEST transaction is received.
DdeGetData | Copies data from the specified DDE object to the specified local buffer.
DdeDisconnect | Terminates DDE communication.
DdePostAdvise | Causes the system to send XTYP_ADVREQ transaction to the calling (server) application's DDE callback function for each client with an active advise loop on the specified topic and item. A server application should call this function whenever the data associated with the topic name or item name pair changes.

DDE Server Implementation

During DDE communication Tera Term core (ttermpro.exe) acts as DDE server that's why it needs to be launched the first.
When macro program (ttpmacro.exe), which is DDE client, processes a macro script, it will start DDE communication with DDE server only when it reaches "connect" macro command.
If a macro is executed from Tera Term's menu "Control" - "Macro", RunMacro()#ttdde.c function will be called. Then topic name (8 bytes) is created from window handle (HVTWin), DDE is initialized and the server is registered. At the same time DDE buffer (1KB) is created. Finally, topic name is passed to "ttpmacro.exe" in /D argument and "ttpmacro.exe" is launched.
    SetTopic();
    if (! InitDDE()) return;
    strncpy_s(Cmnd, sizeof(Cmnd),"TTPMACRO /D=", _TRUNCATE);
    strncat_s(Cmnd,sizeof(Cmnd),TopicName,_TRUNCATE);
Every time a transaction is sent from DDE client to DDE sever DdeCallbackProc callback function is being executed. The callback function is registered during DDE initialization with DdeInitialize().

DDE Client Implementation

Function InitDDE()#ttmdde.c called on macro program (ttpmacro.exe) startup initializes DDE client. DdeInitialize() function initializes DDE and registers DdeCallbackProc callback function. The transactions received from DDE server are processed by callback function.
When DDE communication starts, DdeConnect() must be called to connect to DDE server. Then XTYP_EXECUTE transaction is sent to "ttermpro.exe" window handle (HWin) as notification. Finally, XTYP_ADVSTART transaction is sent to the server that starts the advise loop.
  ConvH = DdeConnect(Inst, Service, Topic, NULL);
  if (ConvH == 0) return FALSE;
  Linked = TRUE;

  Cmd[0] = CmdSetHWnd;
  w = HIWORD(HWin);
  Word2HexStr(w,&(Cmd[1]));
  w = LOWORD(HWin);
  Word2HexStr(w,&(Cmd[5]));

  DdeClientTransaction(Cmd,strlen(Cmd)+1,ConvH,0,
    CF_OEMTEXT,XTYP_EXECUTE,1000,NULL);

  DdeClientTransaction(NULL,0,ConvH,Item,
    CF_OEMTEXT,XTYP_ADVSTART,1000,NULL);

Buffer Management

Certain macro commands (like "wait" and few others) need to analyze the data received from the remote host to make the decision on how to proceed. To implement this functionality both Tera Term core and the macro program need to have buffers.
Tera Term core sends the data from the remote host to macro program via DDE communication (DDE transaction). Initially TCP packet received from a remote host will be detected by OnIdle()#teraterm.cpp loop. OnIdle() then calls CommReceive()#commlib.c which places TCP packet into the buffer (cv->InBuff[]). The size of this buffer is 1KB. It is not a ring buffer and once it fills up, it won't be able to store more packets. If this happens Windows kernel will start accumulating received TCP packets, but if the buffer remains full for a long time, eventually we will start loosing packets from the remote host.
Log collection, escape sequence analysis and macro execution related operations require data buffering. In all these cases Tera Term uses LogPut1() function to place data into DDE buffer cv.LogBuf[]. In other words, the logging and macro executing functions share the same buffer. The size of this buffer is 1KB and this is ring buffer, i.e the oldest data will be overwritten if the buffer is full.
Additionally, when logging mode is binary, the data is stored in another buffer cv.BinBuf[], which is not related to DDE. So, the binary data cannot be passed to DDE client. This means "wait" and similar macro commands cannot be used to wait for a binary data or escape sequences.
When the escape sequence analysis is complete, DDEAdv()#ttdde.c function is called and XTYP_ADVREQ type transaction is sent by DDE server to itself. When server receives XTYP_ADVREQ, it will call DdeCallbackProc() function to pass the data to macro program. Advise loop is being used during this process.
DDE server's advise loop sends the data in XTYP_ADVDATA transaction type. DDE client (ttpmacro.exe) receives this data and processed it in DdeCallbackProc()#ttmdde.c function.
As it has been mentioned earlier DDE communication buffer and log buffer in Tera Term core are the same (cv.LogBuf[]). For DDE communication the buffer start index is stored in "DStart" and buffer length is "Dcount". For logging corresponding variables are "LStart" and "Lcount". Since the buffer is shared, to avoid data loss, these variables must always be synchronized, i.e. DStart=LStart and Dcount=Lcount.

SSH Design and Implementation in TTSSH

Overview

Original TTSSH plugin for Tera Term was developed by Robert O'Callahan (currently works as Former Mozilla hacker). It was supporting SSH1, packet compression and port forwarding. However, it did not support SSH2, SCP or SFTP. Development of the original Tera Term stopped in 1998 and its maintenance ended in 2001.
In 2004 newly formed Tera Term Project team resumed development of TTSSH and added SSH2 support to TTSSH. Over the next 3 year period the team implemented full support of SSH2 and SCP. Tera Term Project team is planning to eventually add SFTP support.
Initial TTTSH design was based on OpenSSH code. However, the main differences were that OpenSSH was written for UNIX command line interface, while TTSSH should work under Microsoft Windows and also communicate with Tera Term. As TTSSH developed, the amount of the differences with OpenSSH was increasing and currently the code of these two programs has very significant differences.

SSH Protocol

SSH (Secure Shell) protocols version 1 (version 1.5 to be exact) and version 2 are often referred by short names "SSH1" and "SSH2". These two protocol versions are incompatible with each other. Because of higher security risks associated with SSH1, it is currently barely used.
SSH2 protocol specification is defined in the following Requests for Comment (RFC).

  • RFC4250: The Secure Shell (SSH) Protocol Assigned Numbers
  • RFC4251: The Secure Shell (SSH) Protocol Architecture
  • RFC4252: The Secure Shell (SSH) Authentication Protocol
  • RFC4253: The Secure Shell (SSH) Transport Layer Protocol
  • RFC4254: The Secure Shell (SSH) Connection Protocol
  • RFC4255: Using DNS to Securely Publish Secure Shell (SSH) Key Fingerprints
  • RFC4256: Generic Message Exchange Authentication for the Secure Shell Protocol (SSH)
  • RFC4344: The Secure Shell (SSH) Transport Layer Encryption Modes

Establishing Connection

Since TTSSH is add-on to Tera Term, it needs to exchange information with Tera Term during establishing, maintaining and closing network connection. For those who are not familiar with SSH communication protocol, this may further complicate understanding of the flow. The drawing below demonstrates the flow that takes place while establishing connection to a remote host.

Transmitting Packets

The following code is used when packet is sent to the remote server via SSH2 protocol. Function begin_send_packet() has the return value "pvar->ssh_state.outbuf + 12", which represents the payload. Payload is pure data; it does not contain packet size, padding, or any other information.
    buffer_t *msg;
    int len;
    char *s;
    unsigned char *outmsg;

    msg = buffer_init();
    if (msg != NULL) {
        buffer_put_int(msg, SSH2_DISCONNECT_PROTOCOL_ERROR);
        s = "disconnected by server request";
        buffer_put_string(msg, s, strlen(s));
        s = "";
        buffer_put_string(msg, s, strlen(s));

        len = buffer_len(msg);
        outmsg = begin_send_packet(pvar, SSH2_MSG_DISCONNECT, len);
        memcpy(outmsg, buffer_ptr(msg), len);
        finish_send_packet(pvar);
        buffer_free(msg);
    }
Once ready, SSH packet is sent by finish_send_packet_special() function, which is called from finish_send_packet(). Format of transmitted packet is shows below. Before encrypting the packet using symmetric key, we must create header and footer.
Packet size is the length of Payload and optional Padding data. It does not include optional 20-byte-long HMAC (keyed-Hashing for Message Authentication) field. Packet size is stored in 4 bytes in big-endian format. These 4 bytes are not included in the size value.
While using symmetric key based encryption, payload size must be equal to "block size", otherwise encryption algorithm will not work. Block size depends on encryption algorithm. For example, for 3DES-CBC block size is 24 bytes (192 bits), for AES128 it is 16 bytes (128 bits). If payload size is less than the block size, the end of payload has to be padded to reach the block size.
HMAC creates a hash value for encrypted data. Often used hash algorithm examples are "MD5" and "SHA-1". Adding HMAC to the packet allows to detect "falsification of data by a third party." HMAC generates encrypted text by using cryptographic hash function in combination with a secret cryptographic key and a sequence number. Adding a secret key and a sequence number makes it theoretically impossible for a third party to generate HMAC even if the actual payload was altered.
Format of the packet compressed with zlib library is shown below. Payload portion of the packet is the only part that is being compressed; other parts remain unchanged. In some cases compressed payload may not reduce the size of the original since compression involves buffering.
When it comes to packet compression, the timing becomes critical. As soon as a client starts SSH connection to a remote server, both hosts begin negotiation process during which will be determined when, or if the packets can be compressed. If mistake is made during this process communication with remote server will not be established.
If normal packet compression is used, compression starts after receiving "SSH2_MSG_KEXINIT". In case of delayed compression, it starts after successful user authentication, i.e. after receiving "SSH2_MSG_USERAUTH_SUCCESS". So, the later method delays data compression after not receiving "SSH2_MSG_KEXINIT" until user authentication is completed. Delayed packet compression is more secure because it doesn't expose vulnerability of zlib library. If connection was rerouted to an illegal server delayed compression mechanism may protect the client side.

Receiving Packets

The function recv() responsible for receiving packets is part of Tera Term core and is unaware whether the packet was sent via TELNET or SSH protocol. Additionally, buffer size is not always specified, which further complicates the implementation.
Tera Term core contains idle loop OnIdle()#teraterm.cpp that constantly checks if new packets have arrived and need to be processed. CommReceive() function calls recv(). TTSSH adds the hook and replaces socket function recv() with its own function TTXrecv()#ttxssh.c.
When CommReceive() calls recv() and passes free pointer and the size of the buffer (cv->InBuff[]) as the arguments. Buffer size is 1KB, which means buffer size value received by TTXrecv() will be in the range 1-1024 bytes.
Then, when PKT_recv() is called by TTXrecv (), the processing becomes a bit more complicated. Below sequence shows handling of the packets when SSH connection is being established.
  1. Call the original recv() in recv_data() to get the packet received from the server by kernel. Update the value of par->pkt_state.datalen.
  2. Perform SSH server version check by using SSH_handle_server_ID(). Update the values of pvar->pkt_state.datastart and pvar->pkt_state.datalen.
  3. Call recv_data() again and since there was no data received from the server, exit the while loop and set connection_closed = TRUE.
  4. Function recv() will return 0 (zero) as no data was received.
The sequence below shows the next steps up-to a symmetric key generation for SSH connectivity.
  1. Call the original recv() in recv_data() to get the packet received from the server by kernel. Update the value of par->pkt_state.datalen.
  2. In SSH_predecrpyt_packet() we want to decrypt only the first block of the received packet. Get the size of the SSH packet.
  3. If packet size is valid, call SSH_handle_packet() to handle the packet according to its type. If will set pvar->ssh_state.payload and pvar->ssh_state.payloadlen.
  4. Update pvar->pkt_state.datastart and pvar->pkt_state.datalen.
  5. Keep calling SSH_predecrpyt_packet() until pvar->pkt_state.datalen reaches 0 (zero).
  6. Call recv_data() again and since there was no data received from the server, exit the while loop and set connection_closed = TRUE.
  7. Function recv() will return 0 (zero) as no new data was received.
The sequence below shows data exchange with the terminal.
  1. Call the original recv() in recv_data() to get the packet received from the server by kernel. Update the value of par->pkt_state.datalen.
  2. In SSH_predecrpyt_packet() we want to decrypt only the first block of the received packet. Get the size of the SSH packet.
  3. If packet size is valid, call SSH_handle_packet() to handle the packet according to its type. If will set pvar->ssh_state.payload and pvar->ssh_state.payloadlen.
  4. The message type is SSH2_MSG_CHANNEL_DATA, so call the function handle_SSH2_channel_data(). It will sets the pvar->ssh_state.payload_datalen and pvar->ssh_state.payload_datastart.
  5. Update pvar->pkt_state.datastart and pvar->pkt_state.datalen.
  6. If SSH_is_any_payload() returns TRUE, copy the data to the buffer that was passed to PKT_recv().
  7. If TeraTerm side buffer becomes full, even if there is more SSH terminal data, return PKT_recv().
  8. If TeraTerm side buffer is not full, call recv_data() and get more data from the server.
  9. Tera Term core recv() function returns "received data size".

Sequence Control

SSH protocol allows to encrypt client-server communication by using encryption key. Public-key based encryption (asymmetric) provides higher level of security, however it is more resource intensive and not used with SSH. SSH2 utilizes symmetric encryption algorithms with shared key - AES (Advanced Encryption Standard: Rijndael algorithm) and 3DES (Triple Data Encryption Standard).
The key is securely shared between two parties establishing connection and is unknown to a third party. As per SSH2 protocol, when client opens TCP connection to a remote host (SSH server), unique DH key is generated based on "Diffie-Hellman" algorithm. This key is only known to the client and to the server.
Prior to creation of DH key, network packets are transmitted unencrypted (as a clear text) and can be captured by a third party, however DH algorithm allows to establish a shared secret between two parties in such a way that it cannot be compromised.
Once shared key has been generated, it can be used to encrypt and decrypt the packets. SSH2 protocol assigns each packet the Message Number in the range 1 to 255. Message number describes the payload of the packet. RFC4250 contains the list of all supported message numbers. SSH messages also have names that start with "SSH2_MSG_". They are defined as macros in TTSSH source code.
The drawing below shows the packet flow for TCP connection from a client to a server on the default SSH port 22 with password based user authentication.
The next drawing shows the flow of the packets when client explicitly closes the connection, i.e. enters "exit" or "logout" command in the remote shell.
In addition to password based SSH authentication, TTSSH also supports keyboard-interactive, public key based and public key with Pageant authentication methods. Packet flows for each of these methods are shown below.

Pseudo-Terminal

SSH2 contains "flow control" mechanism. It is similar to TCP windowing and is implemented by introducing "windows size" concept. Flow control allows to avoid buffer overflows during communication between the client (Tera Term) and the server (SSH daemon).
Despite the flow control, pasting large amounts of data from Clipboard into Tera Term window may cause server to drop part of the data. Knowledge of UNIX Pseudo-Terminal (PTY) in required to understand this behavior.
The mechanism of pseudo-terminal allowing to connected sshd with shell is shown below.
SSH daemon on the server (sshd) needs to show to the client that it is directly connected to the shell. From another side shell program does not care if the request to print a character, or read a character came from legacy serial console, VGA terminal, or SSH connection; shell just calls corresponding functions printf(3), or scanf(3) from C library.
When sshd receives connection request from a client, it calls openpty(3) function to initialize pseudo-terminal. In order to connect a client with a server, pseudo-terminal provides "master device" and "slave device" kernel drivers. Device file representing master device is "/dev/pty[p-za-e][0-9a-f] ". Device file representing the slave device is "/dev/tty[p-za-e][0-9a-f] ". In other words to reach the shell, sshd needs to access master device. Shell process in being forked by sshd and becomes its child process. Shell then communicates with already initialized slave device driver.
Terminal line discipline is the module allowing to perform "inline editing" during command input, i.e. the program receives data via getchar() function, however the processing won't start until user hits Enter key. Linux systems support 16 different line disciplines that can be found in the file /proc/tty/ldiscs. N_TTY is used as the default discipline.

SCP(Secure Copy)

SCP is one of the programs included in OpenSSH package. It allows to transmit and receive files within SSH session. In order to use the secure copy, in addition to "sshd" the server should support "scp" command. In OpenSSH implementation "scp" is started by sshd daemon as a child process. It should be noted that SCP and SFTP (Secure File Transfer Protocol) are completely different protocols incompatible with each other. SCP can perform only file "receive" or "send" operations.
To transfer files within SSH session, after establishing successful connection between the client and the server, the function responsible for executing external commands (exec) must call "scp".

SCP via SSH2

When you send SSH2_MSG_CHANNEL_REQUEST message to the server, you can run an external command by specifying the service name "exec" instead of "pty-req".
    After successful user authentication
         ----> SSH2_MSG_CHANNEL_OPEN(90)
         <---- SSH2_MSG_CHANNEL_OPEN_CONFIRMATION(91)
         ----> SSH2_MSG_CHANNEL_REQUEST(98)  external command sent in the service name "exec" ("scp -f")
         <---- SSH2_MSG_CHANNEL_WINDOW_ADJUST  (remote_window+=131072 bytes)
         <---- SSH2_MSG_CHANNEL_EXTENDED_DATA  (local_window-=36 bytes)
         <---- SSH2_MSG_CHANNEL_DATA(94)

SCP via SSH1

Sending SSH_CMSG_EXEC_CMD to the server allows to run an external command during SSH1 session.

External command has the following format:

  * "scp [-v] [-r] [-p] [-d] -t file name"  ;copy Local-to-Remote
  * "scp [-v] [-r] [-p] [-d] -f file name"  ;copy Remote-to-Local
     -v verbose
     -r recursive
     -p keep time stamp
     -d directory
     -t copy Local-to-Remote
     -f copy Remote-to-Local

Data Transfer

As soon as transmission of external command has been completed, we can start sending or receiving the file content.
    1. File Sending Flow
      <---- Send timestamp (optional)
      <---- Send "C0664 file_size filename" ; 664 in this example is file permission at destination
      <---- Send content of the file
      <---> Close session

    2. File Receiving Flow
      ----> Receive timestamp (optional)
      <---- Send 0
      ----> Receive "C0664 file_size filename"
      <---- Send 0
      ----> Receive content of the file
      ----- Set file timestamp (optional)
      <---- Send 0
      <---> Close session

Note

When file name contains full path, forward slash ("/") must be used as directory separator. Backslashes ("\") are not supported and should be replaced with forward slashes.

X11 Forwarding

X11 forwarding (X11 port forwarding) allows to launch X Window applications on SSH server and bring application GUI to the local PC, where Tera Term is running. By using this mechanism user can run remote applications such as "xeyes", "firefox" or "xemacs" through SSH session. Note, that X server application, such as Xming, must be running on local PC before SSH session with X11 forwarding is established.
The drawing below shows the packet flow during X11 forwarding. As it can be seen, Tera Term (TTSSH) acts as a bridge between X application and X server. Tera Term's "redirector" or "port forwarder" is called "TCP Proxy".
In order to use X11 forwarding, certain configuration changes have to be done on both - Tera Term and SSH server.
On Tera Term side the following value needs to be set in teraterm.ini file.
[TTSSH]
DefaultForwarding=X
On the server side, in case of using OpenSSH, X11Forwarding value needs to be set to "yes" in "sshd_config" file. Default value is "no", which disables support of X11 forwarding.
X11Forwarding=yes
When X11 forwarding is enabled, Tera Term sets request type to "FWD_REMOTE_X11_TO_LOCAL". This means the forwarding will be performed from SSH server towards Tera Term. After opening the session, Tera Term sends "SSH2_MSG_CHANNEL_OPEN_CONFIRMATION" message to the remote host to initialize X11 transfer.
    if (c->type == TYPE_SHELL) {
        // Preparing port forwarding (2005.2.26, 2005.6.21 yutaka)
        // X11 request must be issued after opening the shell (2005.7.3 yutaka)
        FWD_prep_forwarding(pvar);
        FWD_enter_interactive_mode(pvar);
    }
FWD_prep_forwarding() function sends "x11-req" service name and "MIT-MAGIC-COOKIE-1" to SSH server. This initializes X11 forwarding on the server. After completing initialization of X11 server will automatically set environment variable "DISPLAY".
# echo $DISPLAY
DISPLAY=localhost:10.0
When local PC is ready, user can activate X application on SSH server. The server sends X application data to Tera Term in SSH2_MSG_CHANNEL_DATA message format. This data is processed by FWD_received_data() function, which then forwards it to X server (TCP/6000). X server will receive the data in channel->local_socket and will treat it in non-blocking mode. Furthermore, since not all packets may be sent at once, prior to being processed further, the data must be accumulated in an internal buffer. Once channel->local_socket receives the data it sends out FD_WRITE message and calls write_local_connection_buffer() function. If there is a data in the buffer that has not been sent the last time, it will be read from the buffer and another attempt will be made to send it.
When user performs an operation in X11 screen, X server needs to send data via Tera Term to SSH server. In this case FD_READ message is generated by Tera Term and read_local_connection() function is called. Then Tera Term puts the data received form X server into SSH2_MSG_CHANNEL_DATA message format and forwards it to SSH server.

Macro Language Design and Implementation

Overview

Tera Term macro script is BASIC-style language. It does not use Bison or Flex like lexical analyzer and is written entirely from the scratch using recursive descent parsing method. Therefore, from this point of view Tera Term macro can not be called a full-fledged scripting language.

Loading Macro File

As soon as ttpmacro.exe starts, it reads entire macro file (.ttl) into the buffer.

  • OnInitDialog()#ttmmain.cpp -> InitTTL() -> InitBuff() -> LoadMacroFile()

When ttpmacro.exe reads the content of macro file, it places it into buffer Buff[0]#ttmbuff.c. At this point, since entire content of macro has been read, even accidental deletion of macro file during macro execution will not cause a problem. However, if macro contains "include" statements, included files should exist at the time when "include" macro command is being executed.
#define MAXNESTLEVEL 10     /* defines the maximum number of nested files (up to nine includes) */

static int INest;     /* current nested number */
static HANDLE BuffHandle[MAXNESTLEVEL];   /* buffer handle received from GlobalAlloc () */
static PCHAR Buff[MAXNESTLEVEL];          /* buffer area */
static BINT BuffLen[MAXNESTLEVEL];        /* file size (buffer size) */
static BINT BuffPtr[MAXNESTLEVEL];        /* offset of buffer (read position) */

Macro Engine

Macro script processing is done within idle loop OnIdle()#ttmmain.cpp. Behavior of macro engine changes depending on the value of idle loop variable TTLStatus. Normal execution state is set IdTTLRun. The list of available operations is shown below.

Condition | Handling
TTLStatus==IdTTLEnd | Ends the macro program
Unhandled Data (OutLine>0) | Sends data to Tera Term core
TTLStatus==IdTTLRun | Run the macro line by line
TTLStatus==IdTTLWait | Waits ('wait' command)
TTLStatus==IdTTLWaitLn | Waits ('waitln' command)
TTLStatus==IdTTLWaitNL | Receives line ('recvln' command)
TTLStatus==IdTTLWait2 | Waits for string ('waitrecv' command)

Command Interpretation

Every time function Exec()#ttl.c is called from the idle loop, the next line of the loaded macro will be processed. GetNewLine() takes one row out of the buffer and saves it in LineBuff[]#ttmparse.c. Any code with ASCII value below 0x20 (whitespace) except 0x09 (tabulation) is considered as the end of line. Leading space and tabulation are ignored. Semicolon (;) is considered as the beginning of a comment and is discarded together with the remaining part of the string.
char LineBuff[MaxLineLen];      /* one row can store up to 500 bytes */
WORD LinePtr;       /* buffer offset */
WORD LineLen;       /* buffer size */
ExecCmnd() function called from Exec() performs lexical analysis of the commands. Lexical analysis is done by simple string search within LineBuff[], one byte at a time. High level description of the analysis algorithm is shown below.

  1. Find 'endwhile'
  2. Find 'break'
  3. Find 'endif'
  4. Find 'else'
  5. Execute macro command
  6. Determine identifier
  7. Show error if none of above steps were executed

GetReservedWord() function is responsible for detecting whether the input string contains a macro command, or not. Comparison is done by using _stricmp() function, thus the commands are not case sensitive. If supported macro command is detected then corresponding TTLxxx() function is being called.
GetIdentifier() function is responsible for finding identificators. All tokens containing alphanumeric (a-z, A-Z, 0-9) characters, or underscore (_) and not exceeding 32 characters in length will be treated as variables. Statements where a value is assigned to a variable may contain variable name at the left immediately followed by equal sign (=). This complicates variable name detection process. Determination in done in the following order:

  1. Find a string
  2. Find a formula

GetString() function is responsible for finding string values. Since string are surrounded by singe or double quotas ('or "), it is easy to retrieve them.
GetExpression() function detects the formulas that require calculations. It uses recursive descent method for parsing.
CheckVar() function can tell whether the variable exists and if it has numeric or string type. If variable not found, NewStrVar() function will register a new variable.

Caret Control

Overview

Usually user moves the cursor by pressing corresponding keys on the keyboard, but if server needs to move the cursor, it sends out escape sequences (sets of characters that start with ESC code). Furthermore, terminal window may be in inactive mode, for example while running in broadcast mode, but it still should be able to move the cursor to simultaneously update multiple terminal windows.

System Caret

Tera Term uses system caret to draw the cursor. For this purpose Tera Term utilizes API functions listed below.

  • CreateCaret
  • DestroyCaret
  • GetCaretBlinkTime
  • HideCaret
  • SetCaretBlinkTime
  • SetCaretPos
  • ShowCaret

According to MSDN Library description of CreateCaret function,
The system provides one caret per queue. A window should create
a caret only when it has the keyboard focus or is active.
The window should destroy the caret before losing the keyboard
focus or becoming inactive.
Above requirement means that CreateCaret() can be called only when the window is active and DestroyCaret() should be called before the window becomes inactive.
Caret is displayed by CaretOn()#vtdisp.c function and erased by CaretOff()#vtdisp.c function. These functions are usually called as the result of processing escape sequences parsed by VTParse() function, or when user resizes terminal window with own mouse.

Displaying Caret in Inactive Mode

In inactive windows system caret is invisible. The top window on Windows desktop is the only window that shows the caret. In most cases such behavior is acceptable and doesn't cause problems.
However, when Tera Term is in broadcast mode, active Tera Term window can receive and show commands simultaneously with other inactive Tera Term windows and it will look awkward if during this process the caret in inactive windows is hidden.
Therefore, even if the window is inactive, we have to find a way to draw the caret in it. Since system caret cannot be used, we need to draw our own caret. In this case inactive Tera Term window will be able to show and move cursor in response to escape sequences received from remote host, or following user's input from the keyboard.

Current cursor position is stored in CursorX and CursorY. CaretKillFocus() function is called for inactive window. Then custom "polygon cursor" is displayed. Variable ts.VTColor[0] contains the color of the cursor. When cursor position needs to be updated, it is necessary to erase the cursor drawn previously and restore the background color that was previously backed up in ts.VTColor[1].
While drawing polygon cursor in a position that already contains a character, this character will be overwritten. Therefore, it is necessary to re-drawing the character. This can be done by using UpdateCaretKillFocus() function. This function sends WM_PAINT message and triggers InvalidateRect(), which then redraws the character.
void CaretKillFocus(BOOL show)
{
  int CaretX, CaretY;
  POINT p[5];
  HPEN oldpen;
  HDC hdc;

  DispInitDC();
  hdc = VTDC;

  CaretX = (CursorX-WinOrgX)*FontWidth;
  CaretY = (CursorY-WinOrgY)*FontHeight;

  p[0].x = CaretX;
  p[0].y = CaretY;
  p[1].x = CaretX;
  p[1].y = CaretY + FontHeight - 1;
  if (CursorOnDBCS)
    p[2].x = CaretX + FontWidth*2 - 1;
  else
    p[2].x = CaretX + FontWidth - 1;
  p[2].y = CaretY + FontHeight - 1;
  if (CursorOnDBCS)
    p[3].x = CaretX + FontWidth*2 - 1;
  else
    p[3].x = CaretX + FontWidth - 1;
  p[3].y = CaretY;
  p[4].x = CaretX;
  p[4].y = CaretY;

  if (show) {  // Show polygon cursor (non-focused)
      oldpen = SelectObject(hdc, CreatePen(PS_SOLID, 0, ts.VTColor[0]));
  } else {
      oldpen = SelectObject(hdc, CreatePen(PS_SOLID, 0, ts.VTColor[1]));
  }
  Polyline(VTDC, p, 5);
  oldpen = SelectObject(hdc, oldpen);
  DeleteObject(oldpen);

  DispReleaseDC();
}

Handling Inactive Window Cursor States

Since inactive window cursor may be in different states, we need to properly handle cursor state changes. Below is the list of possible cases.

  • Window is active (Active == TRUE), so there is no need to draw polygon caret (CaretKillFocus).
  • When CaretOn() is called for non-active (Active == FALSE) window, ShowCaret() has to launch polygon caret drawing function and pass it argument TRUE.
  • When CaretOff() is called for non-active (Active == FALSE) window, ShowCaret() has to launch polygon caret drawing function and pass it argument FALSE.
  • While retrieving caret state with IsCaretOn() function, additional condition needs to be added: OR (! Active && (CaretStatus == 0)).
  • Call to ChangeCaret() does nothing and can be ignored.
  • When WM_KILLFOCUS message is received while IsCaretOn() is TRUE, polygon caret drawing function has to be launched with argument TRUE.
  • When WM_ACTIVE message is received while IsCaretOn() is TRUE, polygon caret drawing function has to be launched with argument FALSE.

Serial Port

Overview

Tera Term supports UART (16550A) compatible serial ports. Serial ports are also known as Communication Ports, or COM ports. When operating system detects COM port, it assigns it sequential number starting 1 and uses this number in port name like "COM1", "COM2", etc. Microsoft Windows XP supports up-to 256 COM ports (COM1 - COM256).
In the past most personal computers had one or two COM ports. Modern computers do not have COM ports and if such port is needed, USB to Serial converter is being utilized instead. These converters allow user to choose port number. For example, instead of having ports "COM1" and "COM2", there might be 2 ports "COM1" and "COM7". Tera Term can handle such setup and properly detect port numbers (i.e. "COM1" and "COM7").

List of COM Ports

Older versions of Tera Term would present in connection dialog all possible COM ports from "COM1" to "COM256" and then user had to choose the right port from this huge list. This was not easy. Currently, when connection dialog is called, Tera Term first looks for the COM ports recognized by the operating system and then shows in the list only those ports that are currently available. The detection of available ports is done in DetectComPorts()#ttcmn.c file. API function QueryDosDevice() searches for string "COM" among all MS-DOS device names.
    if (((h = GetModuleHandle("kernel32.dll")) != NULL) &&
        (GetProcAddress(h, "QueryDosDeviceA") != NULL) &&
        (QueryDosDevice(NULL, devicesBuff, 65535) != 0)) {
        p = devicesBuff;
        while (*p != '\0') {
            if (strncmp(p, "COM", 3) == 0 && p[3] != '\0') {
                ComPortTable[comports++] = atoi(p+3);
                if (comports >= ComPortMax)
                    break;
            }
            p += (strlen(p)+1);
        }

Retrieve COM Port's Full Name

Additionally, ListupSerialPort()#ttcmn.c can retrieve the full name of each COM port.
static void ListupSerialPort(LPWORD ComPortTable, int comports, char **ComPortDesc, int ComPortMax)
{
    GUID ClassGuid[1];
    DWORD dwRequiredSize;
    BOOL bRet;
    HDEVINFO DeviceInfoSet = NULL;
    SP_DEVINFO_DATA DeviceInfoData;
    DWORD dwMemberIndex = 0;
    int i;

    DeviceInfoData.cbSize = sizeof(SP_DEVINFO_DATA);

    bRet =
        SetupDiClassGuidsFromName(_T("PORTS"), (LPGUID) & ClassGuid, 1,
                                  &dwRequiredSize);
    if (!bRet) {
        goto cleanup;
    }

    DeviceInfoSet =
        SetupDiGetClassDevs(&ClassGuid[0], NULL, NULL, DIGCF_PRESENT | DIGCF_PROFILE);

    if (DeviceInfoSet) {
        dwMemberIndex = 0;
        while (SetupDiEnumDeviceInfo
               (DeviceInfoSet, dwMemberIndex++, &DeviceInfoData)) {
            TCHAR szFriendlyName[MAX_PATH];
            TCHAR szPortName[MAX_PATH];
            DWORD dwReqSize = 0;
            DWORD dwPropType;
            DWORD dwType = REG_SZ;
            HKEY hKey = NULL;

            bRet = SetupDiGetDeviceRegistryProperty(DeviceInfoSet,
                                                    &DeviceInfoData,
                                                    SPDRP_FRIENDLYNAME,
                                                    &dwPropType,
                                                    (LPBYTE)
                                                    szFriendlyName,
                                                    sizeof(szFriendlyName),
                                                    &dwReqSize);

            hKey = SetupDiOpenDevRegKey(DeviceInfoSet,
                                        &DeviceInfoData,
                                        DICS_FLAG_GLOBAL,
                                        0, DIREG_DEV, KEY_READ);
            if (hKey) {
                long lRet;
                dwReqSize = sizeof(szPortName);
                lRet = RegQueryValueEx(hKey,
                                       _T("PortName"),
                                       0,
                                       &dwType,
                                       (LPBYTE) & szPortName,
                                       &dwReqSize);
                RegCloseKey(hKey);
            }

            if (_strnicmp(szPortName, "COM", 3) == 0) {  // Found COM port driver
                int port = atoi(&szPortName[3]);
                int i;

                for (i = 0 ; i < comports ; i++) {
                    if (ComPortTable[i] == port) {  // Confirm COM connection
                        ComPortDesc[i] = _strdup(szFriendlyName);
                        break;
                    }
                }
            }
        }
    }

cleanup:
    SetupDiDestroyDeviceInfoList(DeviceInfoSet);
}

Binary Transfer Protocols

Overview

Creation of personal computers triggered development of communication protocols that would allow to send binary files from one computer to another. Many different protocols were born at that time and most of them have become legacy by now. One of the areas where such protocols are still in demand is communication with embedded devices for uploading or retrieving firmware. Tera Term supports 3 such protocols XMODEM, YMODEM and ZMODEM, which are described in this section.

Specification

XMODEM protocol is rather old, it is in use since 1977. XMODEM was developed by Ward Christensen, had simple specifications and was easy to implement. Numerous improvements made to XMODEM protocol during the first years of its existence were consolidated by Chuck Forsberg and the result of this work was called YMODEM protocol. Chuck Forsberg did not stop there and kept improving YMODEM protocol that eventually brought to life ZMODEM protocol. This was happened in 1986.
XMODEM, YMODEM and ZMODEM protocols were so popular that their support was added to almost every communication program developed at that time. Tera Term supports basic XMODEM / YMODEM / ZMODEM functionality. Depending on peer node implementation certain functions may not work correctly, or fine tuning of configuration may be required.

Hierarchical Structure

In order to simplify binary transfer protocol implementation, hierarchical structure of modules is created.
      +-------------------------------------------------------+
      |ttermpro.exe (filesys.cpp)                             |
      +-------------------------------------------------------+
      |ttpfile.dll (ttfile.c)                                 |
      +-------+--------+--------+--------+--------+-----------+
      |Kermit | XMODEM | YMODEM | ZMODEM | B-Plus | Quick-VAN |
      +-------+--------+--------+--------+--------+-----------+
For example, if you select to send a file via XMODEM, the process flow will be as follows.
filesys.cpp: OnFileXSend() -> XMODEMStart() -> OpenProtoDlg() ->
ttfile.c: ProtoInit() ->
xmodem.c: XInit()
The processing of received file using ZMODEM is as follows.
filesys.cpp: OnFileZRcv() -> ZMODEMStart() -> OpenProtoDlg() ->
ttfile.c: ProtoInit() ->
zmodem.c: ZInit()

Entry Points

To simplify new protocol implementation all interface functions (entry points) are placed into ttpfile.dll file. Entry points are called ProtoInit(), ProtoParse(), ProtoTimeOutProc() and ProtoCancel().
Entry points of XMODEM are shown below.
Function | Meaning
XInit | Initialization
XSendPacket | File transmission
XReadPacket | File reception
XTimeOutProc | Timeout handling
XCancel | Cancellation

Entry points of ZMODEM are shown below.
Function | Meaning
ZInit | Initialization
ZParse | File transmission
ZParse | File reception
ZTimeOutProc | Timeout handling
ZCancel | Cancellation

Testing Connectivity

Binary transfer protocols are usually used with serial connections. Modern PC-s are rarely equipped with serial ports, which makes testing of these protocols more challenging. One on the options is to use Null-modem emulator like com0com. It will generate two virtual COM ports on a single PC. Then we can use 2 instances of Tera Term to connect these virtual serial ports, or use Tera Term and another software terminal emulator for this purpose.

Characters

Binary transfer protocol uses character notation such as ACK or CAN, which originates from 7-bit ASCII table. You can refer ASCII table by using man 7 ascii. Most frequently used characters are listed below.
Oct   Dec   Hex   Char                        Oct   Dec   Hex   Char
------------------------------------------------------------------------
001   1     01    SOH (start of heading)      101   65    41    A
002   2     02    STX (start of text)         102   66    42    B
004   4     04    EOT (end of transmission)   104   68    44    D
006   6     06    ACK (acknowledge)           106   70    46    F
025   21    15    NAK (negative ack.)         125   85    55    U
030   24    18    CAN (cancel)                130   88    58    X

XMODEM

XMODEM divides the data files into blocks with predetermined size (128 bytes or 1,024 bytes) and expects ACK after sending each block. At low transmission speeds implementing a mechanism of sending/receiving ACK-s after every single block is not difficult.
If the data is shorter than predetermined block size, it will be padded with CPMEOF (0x1A). In other words, when you send a file, the size of transmitted data is always equal to a multiple of predetermined block size. Therefore, if integrity of transmitted file has to be determined, XMOMDEM won't be able to do that. It should be noted that term CPMEOF is related to MS-DOS operating system. Its predecessor - CP/M called this character EOF which meant end of text file.
More information about XMODEM protocol can be found on Wikipedia.
  • XMODEM - Wikipedia

If "XmodemLog" entry of teraterm.ini file is set to "On", Tera Term will log communication data in "XMODEM.LOG" file. This file will be created in Tera Term installation directory.
; XMODEM log
XmodemLog=on
Sample log file where Tera Term (COM10) sends to RLogin (COM11) 67-byte long file using XMODEM protocol is shown below.
"<<<" indicates the data Tera Term received from the host, ">>>" shows the data Tera Term sent to the host.
<<<
15                                                  .

>>>
01 01 FE 23 0D 0A 23 20 6B 6E 6F 77 6E 5F 68 6F     ...#..# known_ho
73 74 73 20 66 69 6C 65 20 66 6F 72 20 54 54 53     sts file for TTS
53 48 28 41 6E 20 53 53 48 20 45 78 74 65 6E 73     SH(An SSH Extens
69 6F 6E 20 74 6F 20 54 65 72 61 20 54 65 72 6D     ion to Tera Term
29 0D 0A 23 0D 0A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     )..#............
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A EC                                         ....

<<<
06                                                  .

>>>
04                                                  .

<<<
06
Step by step explanation of the above log:
  1. NAK is received (15)
  2. Data block is sent
  3. ACK is received (06)
  4. EOT is sent (04)
  5. ACK is received (06)
Transmitted block contains the header (3byte) + data (128byte) + CRC (1byte). In above example data size was less than 128 bytes and the end of block was filled with CPMEOF (0x1A).

Now lets try to send a bigger file (1772 bytes). It will be divided in (1772 + 127) / 128 = 14 blocks. Communication log for such file transmission is shown below.
The second byte of the header is a block number (starting form 1). Block number increments from 1 (0x01) to 14 (0x0E). Since the last block is shorter than 128 bytes it is padded with CPMEOF.
All this is done in accordance with XMODEM protocol, however it is easy to see that padding at the end of transmitted file actually can corrupt binary file.
<<<
15                                                  .

>>>
01 01 FE 3B 20 73 61 6D 70 6C 65 20 6D 61 63 72     ...; sample macr
6F 20 6F 66 20 54 65 72 61 20 54 65 72 6D 0D 0A     o of Tera Term..
3B 0D 0A 3B 20 46 69 6C 65 3A 20 73 63 72 65 65     ;..; File: scree
6E 63 61 70 74 75 72 65 2E 74 74 6C 0D 0A 3B 20     ncapture.ttl..;
44 65 73 63 72 69 70 74 69 6F 6E 3A 20 63 61 70     Description: cap
74 75 72 65 20 73 63 72 65 65 6E 20 63 6F 6E 74     ture screen cont
65 6E 74 73 20 61 6E 64 20 77 72 69 74 65 20 74     ents and write t
6F 20 66 69 6C 65 0D 0A 3B 20 45 6E 76 69 72 6F     o file..; Enviro
6E 6D 65 F4                                         nme.

<<<
06                                                  .

>>>
01 02 FD 6E 74 3A 20 67 65 6E 65 72 69 63 0D 0A     ...nt: generic..
3B 20 55 70 64 61 74 65 3A 20 32 30 30 37 2F 31     ; Update: 2007/1
31 2F 32 35 2C 20 31 32 2F 35 2C 20 32 30 30 38     1/25, 12/5, 2008
2F 30 31 2F 33 30 0D 0A 3B 20 41 75 74 68 6F 72     /01/30..; Author
3A 20 49 57 41 4D 4F 54 4F 20 4B 6F 75 69 63 68     : IWAMOTO Kouich
69 20 28 64 6F 64 61 29 2C 20 59 75 74 61 6B 61     i (doda), Yutaka
20 48 69 72 61 74 61 0D 0A 3B 20 54 69 70 73 3A      Hirata..; Tips:
0D 0A 3B 20 20 20 49 74 20 69 73 20 72 65 63 6F     ..;   It is reco
6D 6D 65 CA                                         mme.

<<<
06                                                  .

>>>
01 03 FC 6E 64 65 64 20 74 68 61 74 20 79 6F 75     ...nded that you
20 77 69 6C 6C 20 61 64 64 20 69 6E 20 74 68 65      will add in the
20 66 6F 6C 6C 6F 77 69 6E 67 20 65 6E 74 72 79      following entry
0D 0A 3B 20 20 20 69 6E 20 60 4B 45 59 42 4F 41     ..;   in `KEYBOA
52 44 2E 43 4E 46 27 20 66 69 6C 65 20 62 65 63     RD.CNF' file bec
61 75 73 65 20 79 6F 75 20 63 61 6E 20 63 61 70     ause you can cap
74 75 72 65 20 79 6F 75 72 20 73 63 72 65 65 6E     ture your screen
0D 0A 3B 20 20 20 61 74 20 6F 6E 65 27 73 20 66     ..;   at one's f
69 6E 67 9C                                         ing.

                    :
                    :
                    :

<<<
06                                                  .

>>>
01 0E F1 73 70 72 69 6E 74 66 20 22 73 63 72 65     ...sprintf "scre
65 6E 63 61 70 74 75 72 65 5F 25 73 25 73 25 73     encapture_%s%s%s
2D 25 73 25 73 25 73 2E 74 78 74 22 20 44 61 74     -%s%s%s.txt" Dat
65 59 20 44 61 74 65 4D 20 44 61 74 65 44 20 54     eY DateM DateD T
69 6D 65 48 20 54 69 6D 65 4D 20 54 69 6D 65 53     imeH TimeM TimeS
0D 0A 66 69 6C 65 6E 61 6D 65 20 3D 20 69 6E 70     ..filename = inp
75 74 73 74 72 0D 0A 72 65 74 75 72 6E 0D 0A 1A     utstr..return...
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 75                                         ...u

<<<
06                                                  .

>>>
04                                                  .

<<<
06

YMODEM

YMODEM is more advanced version of XMODEM protocol. Unlike XMODEM, YMODEM can send file name and file size to the host. Knowing file size allows the host to remove CPMEOF characters from the end of transmitted file and avoid possible file corruption.
More information about YMODEM protocol can be found on Wikipedia.
  • YMODEM - Wikipedia

If "YmodemLog" entry of teraterm.ini file is set to "On", Tera Term will log communication data in "YMODEM.LOG" file. This file will be created in Tera Term installation directory.
; YMODEM log
YmodemLog=on
Sample log file where Tera Term (COM10) sends to RLogin (COM11) 67-byte long file using YMODEM protocol is shown below.
"<<<" indicates the data Tera Term received from the host, ">>>" shows the data Tera Term sent to the host.
<<<
43                                                  C

>>>
02 00 FF 73 73 68 5F 6B 6E 6F 77 6E 5F 68 6F 73     ...ssh_known_hos
74 73 00 36 37 20 31 31 31 36 32 32 30 30 31 30     ts.67 1116220010
30 20 31 30 30 36 34 34 00 00 00 00 00 00 00 00     0 100644........
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 1B 08                                      .....

<<<
06 43                                               .C

>>>
02 01 FE 23 0D 0A 23 20 6B 6E 6F 77 6E 5F 68 6F     ...#..# known_ho
73 74 73 20 66 69 6C 65 20 66 6F 72 20 54 54 53     sts file for TTS
53 48 28 41 6E 20 53 53 48 20 45 78 74 65 6E 73     SH(An SSH Extens
69 6F 6E 20 74 6F 20 54 65 72 61 20 54 65 72 6D     ion to Tera Term
29 0D 0A 23 0D 0A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     )..#............
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A     ................
1A 1A 1A 6D 7A                                      ...mz

<<<
06                                                  .

>>>
04                                                  .

<<<
06 43                                               .C

>>>
02 00 FF 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
00 00 00 00 00                                      .....

<<<
06
Step by step explanation of the above log:
  1. 'C' request to send (43)
  2. Block 0 is sent (file information)
  3. ACK is received (06)
  4. 'C' request to send (43)
  5. Block 1 is sent (file information)
  6. ACK is received (06)
  7. EOT is sent (04)
  8. ACK is received (06)
  9. 'C' request to send (43)
  10. Block 0 is sent (all zeros)
  11. ACK is received (06)

ZMODEM

TBD

KERMIT

KERMIT (Kermit: Frog Muppet from Sesame Street) is a file transfer protocol developed in Columbia University in 1981. It is currently maintained by Kermit project. Specification is available from the following site.
More information about KERMIT project can be found on KERMIT project website.
  • The Kermit Project

This site distributes KERMIT source code variations for different platforms. They are called C-Kermit, E-Kermit and Kermit95.
If "KmtLog" entry of teraterm.ini file is set to "On", Tera Term will log communication data in "KERMIT.LOG" file. This file will be created in Tera Term installation directory.
; Kermit log
KmtLog=on
KERMIT was initially designed for low speed connections that's why it could not send more than 94 bytes of data at a time. However, it now has extended option allowing to transmit several kilobytes of data if both - server and client can support this functionality.
KERMIT has 2 packet formats - basic and extended. They are described in "Appendix 1. Packet Format and Types" of KERMIT specification. Below are the extracts from KERMIT specification.
Basic KERMIT packet format supporting 94 byte blocks is shown below.
Basic Kermit Packet Layout
       |<------Included in CHECK------>|
       |                               |
+------+-----+-----+------+------ - - -+-------+
| MARK | LEN | SEQ | TYPE | DATA       | CHECK |<terminator>
+------+-----+-----+------+------ - - -+-------+
             |                                 |
             |<--------LEN-32 characters------>|

  MARK   A real control character, usually Ctrl-A (0x01).
  LEN    One character, length of remainder of packet + 32, max 95. "LEN+2" is whole size.
  SEQ    One character, packet sequence number + 32, modulo 64. The number is from 0 to 63.
  TYPE   One character, an uppercase letter.
  DATA   Transmitted data
  CHECK  One, two or three bytes as negotiated.
  <terminator>  Any control character required for reading the packet.
Extended packet format is shown below.
Kermit Extended Packet Layout
       |<-------------------------Included in CHECK------------->|
       |                                                         |
       |<-------Included in HCHECK------->|                      |
       |                                  |                      |
+------+-----+-----+------+-------+-------+--------+----- - - - -+-------+
| MARK |     | SEQ | TYPE | LENX1 | LENX2 | HCHECK | DATA        | CHECK |
+------+-----+-----+------+-------+-------+--------+----- - - - -+-------+
        blank                                      |                     |
                                                   |<------------------->|
                    LX1=LENX1-32, LX2=LX2-32 95 x LX1 + LX2 chars
HCHECK is a single-character type 1 checksum
In order to send more than 94 bytes of data, extended format's field containing data size is increased to two bytes. "LEN" is always zero of basic format (after adding 32 it is equal to ASCII code of whitespace character). Additionally, the size of the header increased by 3 bytes and header checksum was added.

Initialization String
Initialization String
1         2      3       4       5       6       7       8       9       10
+-------+-------+-------+-------+-------+-------+-------+-------+-------+- -
| MAXL  | TIME  | NPAD  | PADC  | EOL   | QCTL  | QBIN  | CHKT  | REPT  |
+-------+-------+-------+-------+-------+-------+-------+-------+-------+- -
     10           CAPAS+1  CAPAS+2  CAPAS+3
- --+-------+ - -+--------+--------+--------+- -
    | CAPAS ... 0| WINDO  | MAXLX1 | MAXLX1 |
- --+-------+-  -+--------+--------+--------+- -

MAXL  Maximum length (0-94) +32
TIME  Timeout, seconds (0-94) +32
NPAD  Number of pad characters (0-94) +32
EOL   Packet terminator (0-63) +32
QCTL  Control prefix, literal
QBIN  8th bit prefix, literal
CHKT  Block check type {1,2,3}, literal
REPT  Repeat count prefix, literal
CAPAS Extendable capabilities mask, ends when value-32 is even
WINDO Window size (0-31) +32
MAXLX1
      High part of extended packet maximum length (int(max/95)+32)
MAXLX2
      Low part of extended packet maximum length (mod(max,95)+32)
Below is the list of packet types.
Packet Types
Y   Acknowledgment (ACK). Data according to what kind of packet is being acknowledged.
N   Negative Acknowledgment (NAK). Data field always empty.
S   Send Initiation. Data field contains unencoded initialization string. Tells receiver to expect files. ACK to this packet also contains unencoded initialization string.
I   Initialize. Data field contains unencoded initialization string. Sent to server to set parameters prior to a command. ACK to this packet also contains unencoded initialization string.
F   File Header. Indicates file data about to arrive for named file. Data field contains encoded file name. ACK to this packet may contain encoded name receiver will store file under.
X   Text Header. Indicates screen data about to arrive. Data field contains encoded heading for display.
A   File Attributes. Data field contains unencoded attributes. ACK may contain unencoded corresponding
agreement or refusal, per attribute.
D   Data Packet. Data field contains encoded file or screen data. ACK may contain X to interrupt sending this file, Z to interrupt entire transaction.
Z   End of file. Data field may contain D for Discard.
B   Break transmission.
E   Error. Data field contains encoded error message.
R   Receive Initiate. Data field contains encoded file name.
C   Host Command. Data field contains encoded command for host's command processor.
K   Kermit Command. Data field contains encoded command for Kermit command processor.
T   Timeout psuedopacket, for internal use.
Q   Block check error psuedopacket, for internal use.
G   Generic Kermit Command. Data field contains a single character subcommand, followed by zero or more
    length-encoded operands, encoded after formation:
    I Login [<%user[%password[%account]]>]
    C CWD, Change Working Directory [<%directory[%password]>]
    L Logout, Bye
    F Finish (Shut down the server, but don't logout).
    D Directory [<%filespec>]
    U Disk Usage Query [<%area>]
    E Erase (delete) <%filespec>
    T Type <%filespec>
    R Rename <%oldname%newname>
    K Copy <%source%destination>
    W Who's logged in? [<%user ID or network host[%options]>]
    M Send a short Message <%destination%text>
    H Help [<%topic>]
    Q Server Status Query
    P Program <%[program-filespec][%program-commands]>
    J Journal <%command[%argument]>
    V Variable <%command[%argument[%argument]]>


MACRO Help Index

MACRO for Tera Term

Copyright (C) 1994-1998 T. Teranishi
(C) 2004-2021 TeraTerm Project
All Rights Reserved.

MACRO (TTPMACRO.EXE) is an interpreter of the macro language "Tera Term Language (TTL)", which controls Tera Term and provides various functions like auto dialing, auto login and so on.

Usage
  • How to run a macro file
  • Command line
  • How to associate "TTL" files with MACRO
Tera Term Language (TTL)
TTL command reference
Appendixes


How to run a macro file

The executable file TTPMACRO.EXE should be placed in the directory in which TTERMPRO.EXE exists.
There are two ways to run a macro file.

1) From Tera Term.

To start MACRO, select the [Control] Macro command and then the macro file in the Open Macro dialog box.

2) From MACRO.

The macro file can be specified as a parameter of the command line (shortcut link) of TTPMACRO.EXE. For example, if you want to run the macro file "DIALUP.TTL", specify the command line (shortcut link) like:

TTPMACRO DIALUP.TTL

You can omit the file name extension ".TTL". If you omit the file name, the Open Macro dialog box appears. It's convenient to install icons (shortcuts) for the macro files you use frequently.

If you choose method 2), you can run Tera Term, after starting the MACRO, by using the "connect" command in the macro file.

While the macro is running, you can pause it, restart it, and stop it by pressing the appropriate buttons in the MACRO dialog box.

Note: Running without displaying a window

To run without displaying a window, activate TTERMPRO.EXE or TTPMACRO.EXE with a command line option of "/V".
When TTERMPRO.EXE is run by using "connect" macro command, "/V" must be specified as an argument for it.
This option is required to run without logging in such as using a task.

Note: Loading a macro file

A macro file is loaded into memory all at once, and the macro is interpreted. However, the macro command include always reads a specified macro file. When a macro file on the network file server is executed, the macro command include may fail if the network is down.


How to associate "TTL" files with MACRO

Since Tera Term 4.59, you can associate ".TTL" files with MACRO with installer.

To associate the file extension ".TTL" with MACRO, do the following steps.

  1. Execute the [View] Options command of Explorer.
  2. Select the "File Types" tab.
  3. Click the "New Type" button and specify items like the following.
    Description of type:	Tera Term macro files
Associated extension:	TTL
  4. Click the "New" button and specify items like the following.
    Action:	Execute
Application used to perform action:
    "C:\Program Files\teraterm\ttpmacro.exe" "%1"
    (If Tera Term Pro is installed in C:\Program Files\teraterm.)
  5. Close all the dialog boxes by clicking "OK" buttons.


Tera Term Language (TTL)

TTL is a simple interpreted language like BASIC. To learn TTL quickly, study the sample macro files in the distribution package and the command reference.

  • TTL file
  • Types
  • Formats of constants
  • Identifiers and reserved words
  • Variables
  • Expressions and operators
  • Line formats


TTL file

Encoding

The Unicode (UTF-8, UTF-16BE, UTF-16LE) can be supported from Tera Term 4.102.

The TTL file was processed as ANSI CodePage in previous version.

Supporting encoding

encoding | support
Usually (ANSI CodePage) | Support
UTF-8 (with BOM) | Support
UTF-8 (without BOM) | Support
UTF-16BE (without BOM) | Not support
UTF-16LE (without BOM) | Not support
UTF-16 (with BE BOM) | Support
UTF-16 (with LE BOM) | Support
UTF-16 (without BOM = UTF-16BE) | Not support

Encoding determination

Tera Term determines the encoding as follows.

When BOM exists
Tera Term determines one of UTF-8, UTF-16BE and UTF-16LE from BOM type, next reading the file.
When BOM does not exist
  • Reading the file as UTF-8.
  • Reading the file as CP_ACP (same as before 4.102) when the file can not be decoded as UTF-8.


Types

TTL have four kinds of data types:

Integer

Signed 32 bit, from -2147483648 to 2147483647.
Floating point operation is not supported.

Character string

A sequence containing any character except NUL. The maximum length of a string is 511.

Integer Array

The integer array can be used by using the intdim macro command. The maximum index is 65536.
The element of the array equals to the integer.
The maximum number of the array is 256.

String Array

The string array can be used by using the strdim macro command. The maximum index is 65536.
The element of the array equals to the string.
The maximum number of the array is 256.


Formats of constants

1) Integer-type constants

A integer-type constant is expressed as a decimal number or a hexadecimal number which begins with a "$" character. Floating point operation is not supported.

Example:
    123
    -11
    $3a
    $10F

Note on negative integer constants

2) String-type constants

There are two ways of expressing a string-type constant.

a) A character string quoted by ' or " (both sides must be same).

Example:
    'Hello, world'
    "I can't do that"

b) A single character expressed as a "#" followed by an ASCII code (decimal or hexadecimal number). Note: Strings can not contain NUL (ASCII code 0) characters.

Example:
    #65     The character "A".
    #$41    The character "A".
    #13     The CR character.

ASCII code table

Format a) and b) can be combined in one expression.

Example:
    'cat readme.txt'#13#10
    'abc'#$0d#$0a'def'#$0d#$0a'ghi'


Identifiers and reserved words

Variable identifiers

The first character must be an alphabetic (A-Z, a-z) or an underscore character "_". Subsequent characters can be alphabetic, underscore or numeric (0-9). Variable identifiers are not case-sensitive. The maximum length is 32.

Example:
    VARIABLE
    _flag

Label identifiers

Label identifiers consist of alphabetic, underscore or numeric characters, and are not case-sensitive. The maximum length is 32.

Example:
    label1
    100

Reserved words

The following words are reserved:

Command
bplusrecv, bplussend, changedir... (see the command list)
Operator
and, not, or, xor
System variable
groupmatchstr1, groupmatchstr2, groupmatchstr3, groupmatchstr4, groupmatchstr5, groupmatchstr6, groupmatchstr7, groupmatchstr8, groupmatchstr9,
param1, param2, param3, param4, param5, param6, param7, param8, param9, params, paramcnt,
inputstr, matchstr, result, timeout, mtimeout


Variables

1) User variables

Defined by user. The type of a variable is determined when a value (integer or string) is assigned to it for the first time. Once the type of the variable is determined, values of a different type cannot be assigned to it.

2) System variables

Each system variable has a predefined type and value. Used with particular commands.

Variables | Type | Initial value | Related commands
groupmatchstr1 ... groupmatchstr9 | string | "" | waitregex, strjoin, strsplit, strmatch strreplace
inputstr | string | "" | recvln, waitln, waitn, waitrecv, waitregex, sprintf, passwordbox, filenamebox, inputbox
matchstr | string | "" | waitregex, strmatch
param1, param2 ... param9 | string, integer | *1 | *1
params | string array | *1 | *1
paramcnt | integer | *1 | *1
result | integer | 0 | bplusrecv, bplussend, checksum8file, checksum16file, checksum32file, clipb2var, connect, crc16file, crc32file, cygconnect, dirnamebox, exec, fileconcat, filecopy, filecreate, filedelete, filelock, filenamebox, fileread, filereadln, filerename, filesearch, filestat, filestrseek, filestrseek2, filetruncate, fileunlock, findfirst, findnext, getdate, getfileattr, getipv4addr, getipv6addr, getmodemstatus, getpassword, getspecialfolder, gettime, getttdir, getver, ifdefined, ispassword, kmtfinish, kmtget, kmtrecv, kmtsend, listbox, loginfo, logopen, quickvanrecv, quickvansend, recvln, foldercreate, folderdelete, foldersearch, setfileattr, setpassword, sprintf, sprintf2, str2int, strcompare, strlen, strmatch, strreplace, strscan, strsplit, testlink, var2clipb, wait, wait4all, waitevent, waitln, waitn, waitrecv, waitregex, xmodemrecv, xmodemsend, yesnobox, ymodemrecv, ymodemsend, zmodemrecv, zmodemsend
timeout | integer | 0 | recvln, wait, wait4all, waitevent, waitn, waitln, waitrecv, waitregex
mtimeout *2 | integer | 0 | recvln, wait, wait4all, waitevent, waitn, waitln, waitrecv, waitregex
  • *1 When MACRO program is started, the first parameter(macro filename) is stored into param1 and params[1]. From the second to the ninth parameters are stored into from param2 to param9, and from params[2] to params[9]. The tenth or later parameter is stored into params[10] or later. Please refer to Command line.
  • *2 Precision is about 50 msec.


Expressions and operators

Expressions consist of constants, variables, operators, and parentheses. Constants and variables must be of the integer type. The value of an expression is also an integer.
The value of a relational expression (formed using relational operators) is 1, if it is true, or 0 if false.

The following are operators:

Precedence | Operators | Category | Note
1, high | not ~ | bitwise negation | "~" is available in version 4.53 or later
 | ! | logical negation | available in version 4.53 or later
 | + | plus unary |
 | - | minus unary |
2 | * | multiplication |
 | / | division |
 | % | remainder | the value of expression A % B is the remainder of A / B.
3 | + | addition |
 | - | subtraction |
4 | >> << | arithmetic shift | available in version 4.54 or later
 | >>> | logical shift | available in version 4.54 or later
5 | and & | bitwise conjunction | "&" is available in version 4.53 or later
6 | xor ^ | bitwise exclusive disjunction | "^" is available in version 4.53 or later.
7 | or | | bitwise disjunction | "|" is available in version 4.53 or later.
8 | < > <= >= | relational |
9 | = == <> != | relational | "==" and "!=" are available in version 4.54 or later.
10 | && | logical conjunction | version 4.53 or later.
11, low | || | logical disjunction | version 4.53 or later.

"and", "or", "xor" and "not" are bitwise operator, not logical operator.

Example:
    1 + 1
    4 - 2 * 3      The value is -2.
    15 % 10        The value is 5.
    3 * (A + 2)    A is an integer variable.
    A and not B
    A <= B         A and B are integer variables. The value is 1,
                   if the expression is true, or 0 if false.


Line formats

There are four kinds of line formats for macro files. Any line can contain a comment which begins with a ";" character. Also, a user can use the C language style comment(/* - */).
Comments give no effect on the execution of MACRO.
One line can contain up to 1023 characters. The part that exceeded 1023 characters is ignored.

1) Empty lines

Lines which have no character or contain only space or tab characters or a comment. They give no effect on the execution of the macro.

Example:
    ; Tera Term Language

Example:
    showtt 0
    MessageBox 'message 1' 'title 1'
    /* This is 'comment' "string"
    */ MessageBox 'message 2' 'title 2'
    closett

2) Command lines

Lines containing a single command with parameters.

Format:
    <command> <parameter> ...

Example:
    connect 'myhost'
    wait 'OK' 'ERROR'
    if result=2 goto error
    sendln 'cat'
    pause A*10
    end

3) Assignment lines

Lines which contain an assignment statement.

Format:
    <Variable> = <Value (constant, variable, expression)>

Example:
    A = 33
    B = C            C must already have a value.
    VAL = I*(I+1)
    A=B=C            The value of B=C (0 for false, 1 for true) is assigned to A.
    Error=0<J
    Username='MYNAME'

4) Label lines

Lines which begin with a ':' character followed by a label identifier.

Format:
    :<Label>

Example:
    :dial
    :100


TTL command reference

Command index

Communication commands

  • bplusrecv
  • bplussend
  • callmenu (version 4.56 or later)
  • changedir
  • clearscreen
  • closett
  • connect
  • cygconnect (version 4.57 or later)
  • disconnect
  • dispstr (version 4.67 or later)
  • enablekeyb
  • flushrecv
  • gethostname (version 4.61 or later)
  • getmodemstatus (version 4.86 or later)
  • gettitle
  • kmtfinish
  • kmtget
  • kmtrecv
  • kmtsend
  • loadkeymap
  • logautoclosemode (version 4.79 or later)
  • logclose
  • loginfo (version 4.73 or later)
  • logopen
  • logpause
  • logrotate (version 4.78 or later)
  • logstart
  • logwrite
  • quickvanrecv
  • quickvansend
  • recvln
  • restoresetup
  • scprecv (version 4.57 or later)
  • scpsend (version 4.57 or later)
  • send
  • sendbreak
  • sendbroadcast (version 4.62 or later)
  • sendfile
  • sendkcode
  • sendln
  • sendlnbroadcast (version 4.62 or later)
  • sendlnmulticast (version 4.96 or later)
  • sendmulticast (version 4.62 or later)
  • setbaud (version 4.58 or later)
  • setdebug (version 4.64 or later)
  • setdtr (version 4.59 or later)
  • setecho
  • setflowctrl (version 4.94 or later)
  • setmulticastname (version 4.62 or later)
  • setrts (version 4.59 or later)
  • setspeed (version 4.99 or later)
  • setsync
  • settitle
  • showtt
  • testlink
  • unlink
  • wait
  • wait4all (version 4.63 or later)
  • waitevent
  • waitln
  • waitn (version 4.62 or later)
  • waitrecv
  • waitregex (version 4.21 or later)
  • xmodemrecv
  • xmodemsend
  • ymodemrecv (version 4.66 or later)
  • ymodemsend (version 4.66 or later)
  • zmodemrecv
  • zmodemsend

Control commands

  • break (version 4.53 or later)
  • call
  • continue (version 4.77 or later)
  • do, loop (version 4.56 or later)
  • end
  • execcmnd
  • exit
  • for, next
  • goto
  • if, then, elseif, else, endif
  • include
  • mpause (version 4.27 or later)
  • pause
  • return
  • until, enduntil (version 4.56 or later)
  • while, endwhile

String operation commands

  • code2str
  • expandenv (version 4.71 or later)
  • int2str
  • regexoption (version 4.78 or later)
  • sprintf (version 4.52 or later)
  • sprintf2 (version 4.62 or later)
  • str2code
  • str2int
  • strcompare
  • strconcat
  • strcopy
  • strinsert (version 4.67 or later)
  • strjoin (version 4.67 or later)
  • strlen
  • strmatch (version 4.59 or later)
  • strremove (version 4.67 or later)
  • strreplace (version 4.67 or later)
  • strscan
  • strspecial (version 4.67 or later)
  • strsplit (version 4.67 or later)
  • strtrim (version 4.67 or later)
  • tolower (version 4.53 or later)
  • toupper (version 4.53 or later)

File operation commands

  • basename (version 4.69 or later)
  • dirname (version 4.69 or later)
  • fileclose
  • fileconcat
  • filecopy
  • filecreate
  • filedelete
  • filelock (version 4.74 or later)
  • filemarkptr
  • fileopen
  • filereadln
  • fileread (version 4.48 or later)
  • filerename
  • filesearch
  • fileseek
  • fileseekback
  • filestat (version 4.66 or later)
  • filestrseek
  • filestrseek2
  • filetruncate (version 4.67 or later)
  • fileunlock (version 4.74 or later)
  • filewrite
  • filewriteln
  • findfirst, findnext, findclose
  • foldercreate (version 4.69 or later)
  • folderdelete (version 4.69 or later)
  • foldersearch (version 4.69 or later)
  • getdir
  • getfileattr (version 4.69 or later)
  • makepath
  • setdir
  • setfileattr (version 4.69 or later)

Password commands

  • delpassword
  • getpassword
  • ispassword (version 4.75 or later)
  • passwordbox
  • setpassword (version 4.75 or later)

Miscellaneous commands

  • beep
  • bringupbox (version 4.78 or later)
  • checksum8 (version 4.78 or later)
  • checksum8file (version 4.78 or later)
  • checksum16 (version 4.78 or later)
  • checksum16file (version 4.78 or later)
  • checksum32 (version 4.78 or later)
  • checksum32file (version 4.78 or later)
  • closesbox
  • clipb2var (version 4.46 or later)
  • crc16 (version 4.78 or later)
  • crc16file (version 4.78 or later)
  • crc32 (version 4.60 or later)
  • crc32file (version 4.60 or later)
  • exec
  • dirnamebox (version 4.86 or later)
  • filenamebox (version 4.54 or later)
  • getdate
  • getenv
  • getipv4addr (version 4.78 or later)
  • getipv6addr (version 4.78 or later)
  • getspecialfolder (version 4.72 or later)
  • gettime
  • getttdir (version 4.60 or later)
  • getver (version 4.58 or later)
  • ifdefined (version 4.46 or later)
  • inputbox
  • intdim (version 4.72 or later)
  • listbox (version 4.78 or later)
  • messagebox
  • random (version 4.27 or later)
  • rotateleft (version 4.54 or later)
  • rotateright (version 4.54 or later)
  • setdate
  • setdlgpos
  • setenv (version 4.54 or later)
  • setexitcode
  • settime
  • show
  • statusbox
  • strdim (version 4.72 or later)
  • uptime (version 4.81 or later)
  • var2clipb (version 4.46 or later)
  • yesnobox


bplusrecv

Receives a file from the host with the B-Plus protocol.

bplusrecv

Remarks

Causes Tera Term to receive a file from the host with the B-Plus protocol. Pauses until the end of the file transfer. If the file is transferred successfully, the system variable "result" is set to 1. Otherwise, "result" is set to zero.


bplussend

Sends a file to the host with the B-Plus protocol.

bplussend <filename>

Remarks

Causes Tera Term to send the file <filename> to the host with the B-Plus protocol. Pauses until the end of the file transfer. If the file is transferred successfully, the system variable "result" is set to 1. Otherwise, "result" is set to zero.

Example

bplussend 'readme.txt'


callmenu

Executes a menu of window. (version 4.56 or later)

callmenu <menu ID>

Remarks

Executes the menu that was specified by <menu ID>. See Keycode about IDs.

Example

; select displaying screen.
callmenu 50280

; copy to the clipboard.
callmenu 50210

; This macro captures a screen contents and write it to a file. Refer to screencapture.ttl.
; Configuration

appendmode = 1        ; 0 or 1

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

getdate header #13#10"======== %Y-%m-%d %H:%M:%S ==========================================="#13#10#13#10

if appendmode=0 then
    getdate filename "screencapture_%Y%m%d-%H%M%S.txt"
    fileopen fp filename 0
else
    fileopen fp 'screencapture.txt' 1
endif

if result <> 0 end

;select screen
callmenu 50280

mpause 500

filewrite fp header

offset = 0
do
    clipb2var buff offset
    if result>0 filewrite fp buff
    offset = offset + 1
loop while result = 2

fileclose fp

;reset selection
callmenu 50270

end

; Select one of Kanji codes. On ahead, should install the TTX Kanji Menu.
;callmenu 54010  ; [KanjiCode] Recv: Shift_JIS
;callmenu 54110  ; [KanjiCode] Send: Shift_JIS
;callmenu 54011  ; [KanjiCode] Recv: EUC-JP
;callmenu 54111  ; [KanjiCode] Send: EUC-JP
;callmenu 54012  ; [KanjiCode] Recv: JIS
;callmenu 54112  ; [KanjiCode] Send: JIS
callmenu 54013  ; [KanjiCode] Recv: UTF-8
callmenu 54113  ; [KanjiCode] Send: UTF-8
;callmenu 54014  ; [KanjiCode] Recv: UTF-8m


changedir

Changes the current directory.

changedir <path>

Remarks

Changes the current directory for Tera Term to <path>.

Note: the setdir command changes the current directory for MACRO. File names specified for the communication commands (e.g. kmtsend) are based on the current directory for Tera Term. File names specified for other commands (e.g. fileopen) are based on the current directory for MACRO.

Complement: You must specify a fullpath name to the communication commands (e.g. sendfile, kmtsend) because these commands are not affected by `changedir' command.

Example

changedir 'c:\'
sendfile 'd:\source\code.dat' 1


clearscreen

Erases the screen.

clearscreen <int>

Remarks

Causes Tera Term to erase the screen of VT window if <int> is 0.
Causes Tera Term to erase the scroll buffer and screen of VT window if <int> is 1.
Causes Tera Term to erase the screen of TEK window if <int> is 2.

Example

clearscreen 0


closett

Closes Tera Term.

closett

Remarks

Closes Tera Term and enters the unlinked state.
In the unlinked state, the "connect" command can open a new Tera Term window and link MACRO to it.

This command always disables the warning on TCP/IP disconnection regardless of ConfirmDisconnect configuration.

Example

messagebox 'foo' 'val'
closett
end

See also

  • connect
  • cygconnect
  • disconnect
  • testlink
  • unlink


connect

Connects.

connect <command line parameters>

Remarks

If MACRO is not linked to Tera Term, this command runs Tera Term with <command line parameters>, and links it to MACRO.

If MACRO has already been linked to Tera Term and Tera Term is not connected to the host, this command causes Tera Term to connect to the host specified by <command line parameters>. See "Tera Term command line" and "TTSSH command line" for the format of <command line parameters>.

If MACRO has already been linked to Tera Term and Tera Term has already been connected to the host, this command is ignored.

As a result of this command, the system variable "result" is set to one of the following values depending on the link and connection status:

Value | Status
0 | Link to Tera Term has not been made.
1 | Connection to the host has not been made, but link to Tera Term has been made.
2 | Both connection and link have been made.

To test the current link and connect status before executing the "connect" command, use the "testlink" command.

Communication commands except "connect", "cygconnect" and "testlink" can not be executed before the link is established.

Connection method

There are 3 types of connection you can establish from Tera Term macro:

  • Telnet connection (port 23)
  • SSH1 or SSH2 connection (port 22)
  • Connection via COM port

Telnet connections

connect 'myserver:23 /nossh /T=1'
connect 'myserver:23'

Using /nossh is strongly recommended. Without this parameter Tera Term will start connecting with the same method (telnet or SSH) that was used during last time when teraterm.ini file was saved. In case it was SSH than your macro will try to connect via SSH and will eventually fail.

Using /T=1 is recommended. Without this parameter Tera Term will start connecting with the value of 'Telnet' in teraterm.ini file. When the Telnet value is off, Tera Term may not work well.

SSH connections

connect 'myserver /ssh'

This way will start SSH connection without defining whether SSH1 or SSH2 has to be used.

connect 'myserver /ssh /1'
connect 'myserver /ssh /2'

Parameters /1 and /2 force to use SSH1 or SSH2 method.

connect 'myserver /ssh /auth=password /user=username /passwd=password'
connect 'myserver /ssh /1 /auth=password /user=username /passwd=password'
connect 'myserver /ssh /2 /auth=password /user=username /passwd=password'
connect 'myserver /ssh /auth=publickey /user=username /passwd=password /keyfile=private-key-file'
connect 'myserver /ssh /1 /auth=publickey /user=username /passwd=password /keyfile=private-key-file'
connect 'myserver /ssh /2 /auth=publickey /user=username /passwd=password /keyfile=private-key-file'
connect 'myserver /ssh /auth=challenge /user=username /passwd=password'
connect 'myserver /ssh /1 /auth=challenge /user=username /passwd=password'
connect 'myserver /ssh /2 /auth=challenge /user=username /passwd=password'

Above 9 ways allow to skip popup dialog and pass username and password directly from macro. Please note that /auth=password or /auth=publickey or /auth=challenge is the parameter saying that authentication will be done by entering password or private-key-file thus you should not replace the word 'password' or the word 'publickey' in it with actual password.

connect 'myserver /ssh /auth=pageant /user=username'
connect 'myserver /ssh /1 /auth=pageant /user=username'
connect 'myserver /ssh /2 /auth=pageant /user=username'

Above 3 ways allow to skip popup dialog and pass username directly from macro.

connect 'myserver /ssh /auth=password /user=username /ask4passwd'
connect 'myserver /ssh /1 /auth=password /user=username /ask4passwd'
connect 'myserver /ssh /2 /auth=password /user=username /ask4passwd'
connect 'myserver /ssh /auth=publickey /user=username /ask4passwd /keyfile=private-key-file'
connect 'myserver /ssh /1 /auth=publickey /user=username /ask4passwd /keyfile=private-key-file'
connect 'myserver /ssh /2 /auth=publickey /user=username /ask4passwd /keyfile=private-key-file'
connect 'myserver /ssh /auth=challenge /user=username /ask4passwd'
connect 'myserver /ssh /1 /auth=challenge /user=username /ask4passwd'
connect 'myserver /ssh /2 /auth=challenge /user=username /ask4passwd'

Above 9 ways pass username and authentication method directly from macro, and the popup asks for password.

Connections via COM port

connect '/C=x'

Here x represents COM port number. For example to connect via COM port 1 the command will look like: connect '/C=1'

source URL: http://logmett.com/forum/viewtopic.php?t=28

Examples

; No command line parameter
connect ''

; Timeout will occur if connection does not succeed within five seconds.
connect 'myserver /timeout=5'

; Run Tera Term and open telnet session
connect 'myserver:23 /nossh'

; Run Tera Term and open SSH session
connect 'myserver /ssh'

; Run Tera Term and open SSH1 session
connect 'myserver /ssh /1'

; Run Tera Term and open SSH2 session
connect 'myserver /ssh /2'

; Run Tera Term,open SSH session and do not prompt for user name and password
connect 'myserver /ssh /auth=password /user=username /passwd=password'

; Run Tera Term, open SSH1 session and do not prompt for user name and password
connect 'myserver /ssh /1 /auth=password /user=username /passwd=password'

; Run Tera Term, open SSH2 session and do not prompt for user name and password
connect 'myserver /ssh /2 /auth=password /user=username /passwd=password'

; Run Tera Term, open SSH session and, not prompt for user name and password and use private key file
connect 'myserver /ssh /auth=publickey/user=username /passwd=password /keyfile=private-key-file'

; Run Tera Term, open SSH1 session and, not prompt for user name and password and use private key file
connect 'myserver /ssh /1 /auth=publickey/user=username /passwd=password /keyfile=private-key-file'

; Run Tera Term, open SSH2 session and, not prompt for user name and password and use private key file
connect 'myserver /ssh /2 /auth=publickey /user=username /passwd=password /keyfile=private-key-file'

; Tera Term automatically connects the remote host with the public key
; authentication, and not prompt for user name and password and use private key file.
connect 'myserver /ssh /auth=pageant /user=username'

; Run Tera Term and open serial port connection. Port number is x=1..Maximum value(MaxComPort).
connect '/C=x'

CommandLine = '111.111.11.11'
connect CommandLine

; Sample macro for Tera Term
;  Telnet login

; open Tera Term
;   command line = 'TERATERM myhost.mydomain' (telnet)
connect 'myhost.mydomain'

; set username
UsernamePrompt = 'Username:'
Username = 'MYNAME'
PasswordPrompt = 'Password:'
; get password from file
getpassword 'password.dat' 'mypassword' Password

; login
wait   UsernamePrompt
sendln Username

wait   PasswordPrompt
sendln Password

; OK, auto login complete.

; sample macro of Tera Term
;
; File: ssh2login.ttl
; Description: auto login with SSH2 protocol
; Environment: generic

username = 'nike'
hostname = '192.168.1.3'

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

msg = 'Enter password for user '
strconcat msg username
passwordbox msg 'Get password'

msg = hostname
strconcat msg ':22 /ssh /auth=password /user='
strconcat msg username
strconcat msg ' /passwd='
strconcat msg inputstr

connect msg

[test.bat]
ttpmacro.exe paramtest.ttl "192.168.3.2"
ttpmacro.exe paramtest.ttl "192.168.3.2" cal
ttpmacro.exe paramtest.ttl "192.168.3.2" uptime
ttpmacro.exe paramtest.ttl "192.168.3.2" "man ls" echo foo
ttpmacro.exe paramtest.ttl "192.168.3.2" "uname -a"
ttpmacro.exe paramtest.ttl "192.168.3.2" "cat /proc/cpuinfo"
pause

[paramtest.ttl]
if paramcnt != 3 then
    messagebox "Argument error" "ERROR"
    end
endif

prompt = 'yutaka@sai(~) '
sprintf2 var "%s:22 /2 /ssh /auth=password /user=yutaka /passwd=yutaka" param2
messagebox var "test"
connect var
wait prompt

sendln param3
wait prompt

pause 3

sendln 'exit'
pause 3

Note

  1. In these examples parameters shown with Italic font have to be replaced with their actual values.
  2. A user's password can include space characters. If the password includes the space character, a user should put the password in quotations by using `"' character. Also, if the password includes the " character, a user should write the " two times.
    NOTICE: A user can not use the "@" character instead of the space character from Tera Term 4.63.
  3. Please remember that entering actual username and password in Tera Term macro will cause them to be stored as an open text and it is your responsibility to keep such macro is secure location.
  4. When a user re-connect the remote host soon after disconnecting the server, a user could not connect the server. For more detail, refer to "here".

See also

  • closett
  • cygconnect
  • disconnect
  • testlink
  • unlink
  • NOTICE: Immediately re-connect the server after disconnection
  • Variables


cygconnect

Connects to Cygwin. (version 4.57 or later)

cygconnect [<command line parameters>]

Remarks

If MACRO is not linked to Tera Term, this command runs Tera Term that is connected to cygwin, and links it to MACRO. <command line parameters> is passed to CygTerm. See "CygTerm command line" for the format of <command line parameters>.

If MACRO has already been linked to Tera Term and Tera Term is not connected to the host, this command close Tera Term and runs new Tera Term that is connected to cygwin, and links it to MACRO.

If MACRO has already been linked to Tera Term and Tera Term has already been connected to the host, this command is ignored.

As a result of this command, the system variable "result" is set to one of the following values depending on the link and connection status:

Value | Status
0 | Link to Tera Term has not been made.
1 | Connection to the host has not been made, but link to Tera Term has been made.
2 | Both connection and link have been made.

To test the current link and connect status before executing the "cygconnect" command, use the "testlink" command.

Communication commands except "connect", "cygconnect" and "testlink" can not be executed before the link is established.

Examples

; connects to cygwin.
cygconnect

; change directory to C:\ and runs Tera Term that is connected to cygwin.
cygconnect '-d C:\ -nocd -nols'

See also

  • connect
  • closett
  • disconnect
  • testlink
  • unlink
  • Cygwin Information and Installation


disconnect

Closes the communication between Tera Term and the host.

disconnect [<confirm>]

Parameters

integer <confirm> (optional default=nonzero) (version 4.65 or later)
If this parameter is zero, the Tera Term is immediately disconnected without confirmation.
If this parameter is nonzero, the confirmation dialog is shown whether the Tera Term disconnects.

Remarks

If Tera Term is not terminated by this command, the link between Tera Term and MACRO is kept.

See also

  • closett
  • connect
  • cygconnect
  • testlink
  • unlink


dispstr

Displays character on the client terminal screen. (version 4.67 or later)

dispstr <data1> [<data2>....]

Remarks

Causes Tera Term to display characters on the client terminal screen.
If the <data> is a string type, the string is directly displayed on the terminal screen.
If the <data> is an integer type, its lowest-order byte (0-255) is regarded as an ASCII code of the character, and the corresponding character is displayed on the terminal screen.

Example

dispstr 'ABC'

; Display "ABC". (ASCII code of the character "A" is 65.)
dispstr  65 66 67
myname='Tera Term'
dispstr 'My name is ' myname '.'

; Clear your terminal screen by using the escape sequence.
dispstr #$1B"[2J"

; Display "Message" string along the X=20, Y=10 coordinate in your terminal screen.
dispstr #$1B"[10;20HMessage"

; Move your terminal screen to the X=100, Y=200 coordinate in the desktop.
dispstr #$1B"[3;100;200t"

; Change terminal size to 80x24
dispstr #$1b"[8;24;80t"

; demo
for y 24 30
  x = 80
  while x < 100
    sprintf #$1b"[8;%d;%dt" y x
    dispstr inputstr
    x = x + 5
    pause 1
  endwhile
next

connect '/C=1'
if result == 1 then
  dispstr 'Error opening COM1'   ; Command error because of not connection.
elseif result == 2 then
  dispstr 'Successfully opened COM1'
endif
end

Note

The remote host can not recognize the dispstr output data. So, the terminal screen may not display properly because the buffer of the terminal screen differs from the remote host screen.

When Tera Term does not connect to the host, this macro command can not be executed.


enablekeyb

Enables/Disables keyboard inputs.

enablekeyb <flag>

Remarks

The value of <flag> should be 1 for enabling and 0 for disabling.
When the value is 0, a user can not input while the macro is sending the data.

Example

; Disabling a user input
enablekeyb 0

for i 1 5
    sendln 'date'
    wait '$'
    pause 5
next

; Enabling a user input
enablekeyb 1

sendln 'cat > /tmp/foo.txt'
pause 10
send $4   ; CTRL+D


flushrecv

Clears received characters in the buffer of MACRO.

flushrecv

Remarks

Characters received from the host are transferred to MACRO. MACRO stores the characters in the buffer.
Character-reading commands, such as the "wait" command, read out them from the buffer.
Characters in the buffer are kept until character-reading commands process them or the buffer overflows or the flushrecv command clears the buffer.

The "flushrecv" command can be used to avoid unexpected results of character-reading commands caused by old characters in the buffer.

See also

  • setsync


gethostname

Gets the hostname or IP address. (version 4.61 or later)

gethostname <strvar>

Remarks

Retrieves the destination hostname or IP address of Tera Term and stores it in the string variable <strvar>.

Example

testlink
if result > 1 then
    gethostname hostname
    messagebox hostname result
endif


getmodemstatus

Retrieves the modem control-register values. (version 4.86 or later)

getmodemstatus <intvar>

Remarks

Retrieves the modem control-register values from the serial port.

The <intvar> variable can be one or more of the following values.
1  The CTS (clear-to-send) signal is on.
2  The DSR (data-set-ready) signal is on.
4  The ring indicator signal is on.
8  The RLSD (receive-line-signal-detect) signal is on.

If the command succeeds, the system variable "result" is set to 0. If the command fails, the variable is set to 1.

Example

testlink
if result=0 then
  connect '/C=1'
  pause 3
endif

getmodemstatus val

if result=0 then
  sprintf2 str "val = %d(%x)" val val
  messagebox str "Result value"
  if val & 2 > 0 then
    ; DSR signal is enabled.
    messagebox "DSR on" "Message"
  endif
else
  messagebox "failed" "ERROR"
endif

See also

  • setdtr
  • setrts
  • setspeed


gettitle

Gets the window title string.

gettitle <strvar>

Remarks

Retrieves the title text of Tera Term and stores it in the string variable <strvar>.

Example

gettitle titletext


kmtfinish

Causes Tera Term to execute the Kermit Finish command.

kmtfinish

Remarks

Pauses until the end of the Finish command.
If the command is executed successfully, the system variable "result" is set to 1. Otherwise, "result" is set to zero.


kmtget

Receives a file with the Kermit Get command.

kmtget <filename>

Remarks

Causes Tera Term to get the file <filename> from the host by using the Kermit Get command.
The host should be in the server state. Pauses until the end of the file transfer.
If the file is transferred successfully, the system variable "result" is set to 1. Otherwise, "result" is set to zero.

Example

kmtget'*.*'


kmtrecv

Receive a file with the Kermit protocol.

kmtrecv

Remarks

Pauses until the end of the file transfer.
If the file is transferred successfully, the system variable "result" is set to 1. Otherwise, "result" is set to zero.


kmtsend

Sends a file with the Kermit protocol.

kmtsend <filename>

Remarks

Causes Tera Term to send the file <filename> to the host with the Kermit protocol.
Pauses until the end of the file transfer.
If the file is transferred successfully, the system variable "result" is set to 1. Otherwise, "result" is set to zero.

Example

kmtsend 'readme.txt'


loadkeymap

Loads a keyboard setup file.

loadkeymap <filename>

Remarks

Causes Tera Term to load a keyboard setup file specified by <filename>.

Example

loadkeymap 'keyboard.cnf'


logautoclosemode

Closes a log file automatically when macro ends. (version 4.79 or later)

logautoclosemode <flag>

Remarks

When the value of <flag> is 1, a log file will be closed after the macro is finished.
When the value of <flag> is 0, a log file will not be closed after the macro is finished.

NOTICE: When the macro script is terminated, the configuration value is set to default. In other words, a log file is not always closed after the macro is finished.

Example

logautoclosemode 1
logopen 'D:\teraterm_sample.log' 0 0

; do something...

end

See also

  • logopen
  • logclose


logclose

Causes Tera Term to close the log file.

logclose

See also

  • logopen


loginfo

Retrieves Tera Term log status. (version 4.73 or later)

loginfo <strvar>

Remarks

When Tera Term is logging, the file name stores in the strvar variable and the flag status of log starting is stored in the system variable "result".
On the contrary, when Tera Term is not logging, the system variable "result" is set to -1.

The system variable "result" is bitwise OR in the following value:

Value | Meaning
1 | Binary flag
2 | Append flag
4 | Plain text flag
8 | Timestamp flag
16 | Hide dialog flag

Example

loginfo logfile

if result == -1 then
    ; When Tera Term is not logging, a new log is started.
    logopen "test.log" 0 0 0 1

elseif result & 8 == 0 then
    flags = result
    ; When the log timestamp is disabled, a new log with timestamp is re-opened.
    logclose
    logopen logfile 0 1 flags&4 1 flags&16
endif

See also

  • logopen


logopen

Causes Tera Term to start logging.

logopen <filename> <binary flag> <append flag> [<plain text flag> [<timestamp flag> [<hide dialog flag> [<include screen buffer flag> [<timestamp type]]]]]

Remarks

Received characters are written to the file <filename>.
When the file does not include \ character, the file is saved at the TeraTerm current directory. If a user want to change the directory, use the changedir macro command.

If <binary flag> is zero, received new-line characters are converted (CR -> CR/CRLF) and escape sequences are stripped out.
If <binary flag> is non-zero, received characters are written without any modifications.

If <append flag> is non-zero and the file <filename> already exists, received characters are appended to it.
If <append flag> is zero and the file <filename> already exists, the file is overwritten.

If <plain text flag> is not 0, ASCII non-printable characters are not written into log.
If <timestamp flag> is not 0, a timestamp is added on top of log.
If <binary flag> is non-zero, <plain text flag> and <timestamp flag> is ignored. The binary log file is available for Replay Log. (version 4.61 or later)

If <hide dialog flag> is not 0, "Log" dialog box is not displayed.

If <include screen buffer flag> is not 0, all current screen buffer is written into a log file in first. (version 4.80 or later)

<timestamp type> specifies timestamp type, and can be one of the following: (version 4.97 or later)

value | Meaning
0 | Local Time
1 | UTC
2 | Elapsed Time (Logging)
3 | Elapsed Time (Connection)

If a log file is successfully opened, the system variable "result" is set to 0. Otherwise, the "result" is set to 1. (version 4.62 or later)

Example

connect '/C=1'

; get a user name
getenv 'USERNAME' username
; get the date and time
gettime timestr "%Y%m%d-%H%M%S"

; add the user name and the timestamp to the log file name
sprintf2 filename 'console_%s_%s.log' username timestr

; change the current directory
changedir 'C:\Documents and Settings\yutaka\desktop'

logopen filename 0 0
logwrite 'Log start'#13#10
logwrite '*****************************************************'#13#10
logclose

end

;
; PowerCycle with logging
;

getenv 'USERNAME' username
gettime timestr "%Y%m%d-%H%M%S"
getdir mdir
sprintf2 filename '%s\console_%s_%s.log' mdir username timestr

logopen filename 0 0

step = 0
while 1
  call show_step
  sendln 'echo do something'
  wait '$'
  pause 2
endwhile

logclose
end

:show_step
step = step + 1
gettime timestr
sprintf2 str '[%d] %s' step timestr
statusbox str 'counter'
return

See also

  • logwrite
  • logclose
  • statusbox
  • gettime


logpause

Causes Tera Term to pause logging.

logpause

Remarks

Received characters are discarded while logging is paused.

Example

prompt = '$'

cygconnect
wait prompt

; get a user name
getenv 'USERNAME' username
; get the date and time
gettime timestr "%Y%m%d-%H%M%S"

; add the user name and the timestamp to the log file name
sprintf2 filename 'd:\console_%s_%s.log' username timestr
;messagebox filename 'filename'

logopen filename 0 0
logwrite 'Log start'#13#10
sendln 'cal'
wait prompt
; Suspend logging
logpause
; The below command is not logging
sendln 'date'
wait prompt
; Resume logging
logstart
sendln 'uptime'
wait prompt
logwrite '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@'#13#10
logclose

end


logrotate

Rotates a log file. (version 4.78 or later)

logrotate 'size' '<size>'
logrotate 'rotate' <count>
logrotate 'halt'

Parameters

'size' <size>
When a log file size is over <size> byte, the log file is be rotated.
The <size> value must be larger than 128.
If the <size> is followed by K, the size is assumed to be in kilobytes. If the M is used, the size is in megabytes.
'rotate' <count>
Log files are rotated <count> times before being removed.
The <count> value must be larger than 1.
'halt'
The log rotation is stopped.

NOTICE

  1. A log file must be opened previously.
  2. This command only configure the log rotation. So, the rotation does not be executed immediately.

Example

; Open log
getspecialfolder str "MyDocuments"
changedir str
logopen 'teraterm_sample.log' 0 0

; Start log rotation
logrotate 'size' '32K'
logrotate 'rotate' 3

pause 600
; Stop log rotation
logrotate 'halt'

pause 600

; Close log
logclose

See also

  • logopen


logstart

Causes Tera Term to restart the logging, if paused.

logstart

Example

Refer to logpause.


logwrite

Writes a string to the log file.

logwrite <string>

Remarks

Appends a <string> to the log file of the Tera Term.
This command is valid only while Tera Term is logging. The <string> can be written even while logging is paused.

If the string is empty, the syntax error occurs.

Example

Refer to logopen.


quickvanrecv

Receives a file with the Quick-VAN protocol.

quickvanrecv

Remarks

Causes Tera Term to receive a file from the host with the Quick-VAN protocol. Pauses until the end of the file transfer. If the file is transferred successfully, the system variable "result" is set to 1. Otherwise, "result" is set to zero.

Example

quickvansend 'readme.txt'


quickvansend

Sends a file with the Quick-VAN protocol.

quickvansend <filename>

Remarks

Causes Tera Term to send the file <filename> to the host with the Quick-VAN protocol.
Pauses until the end of the file transfer.
If the file is transferred successfully, the system variable "result" is set to 1. Otherwise, "result" is set to zero.

Example

quickvansend 'readme.txt'


recvln

Receives characters of a line.

recvln

Remarks

Retrieves a line of received characters from the host and stores it in the system variable "inputstr".
This command waits until a line is received or the communication between Tera Term and the host is terminated or the timeout occurs.

If the system variable "timeout" or "mtimeout" is greater than zero, the timeout occurs when <timeout>.<mtimeout> seconds have passed. If the timeout is less than or equal to zero, the timeout never occurs.

If the line is received successfully, the system variable "result" is set to 1. Otherwise, "result" is set to zero.

Example

; open the log file
fileopen file 'log.txt' 0
; enter synchronous mode
setsync 1
result=1

while result=1
  ; receive one line
  recvln
  ; write it to the log file
  filewriteln file inputstr
endwhile

; enter asynchronous mode
setsync 0

See also

  • setsync


restoresetup

Loads a Tera Term setup file.

restoresetup <filename>

Remarks

Causes Tera Term to load a Tera Term setup file specified by <filename>.

Example

restoresetup 'teraterm.ini'


scprecv

Receives a file from the remote host with the SCP protocol. (version 4.57 or later)

scprecv <remote filename> [<local filename>]

Remarks

Causes Tera Term to receive the remote file <remote filename> to the host with the SCP(Secure Copy Protocol) protocol. If the local file <local filename> is omitted, the file <remote filename> would be copied in the current directory of the local host. Tera Term does not pause until the end of the file transfer.

Example

connect '192.168.3.2:22 /ssh /2 /auth=password /user=hoge /passwd=fuga'
wait '$'
scprecv 'usr/bin/ls.exe'
scprecv 'sample.bin' 'd:\hoge.bin'


scpsend

Sends a file from the host with the SCP protocol. (version 4.57 or later)

scpsend <filename> [<destination filename>]

Remarks

Causes Tera Term to send the file <filename> to the host with the SCP(Secure Copy Protocol) protocol. If the file <destination filename> is omitted, the file <filename> would be copied in the home directory of the remote host. Tera Term does not pause until the end of the file transfer.

Example

connect '192.168.3.2:22 /ssh /2 /auth=password /user=hoge /passwd=fuga'
wait '$'
scpsend 'C:\usr\cvs\doc\en\teraterm.chm'
scpsend 'C:\usr\cvs\doc\en\teraterm.chm' 'tmp/foo.chm'

; Confirm finishing a file sending.
SOURFILE = 'C:\usr\ttssh2\doc\en\teraterm.chm'
DESTFILE = '~'

;; Send a file.
scpsend SOURFILE DESTFILE
;; Confirm a scp process.
do
  mpause 5000
  sprintf2 str 'ps -ef |grep -v grep |grep -c scp'
  sendln str
  waitln '0' '1'
loop while result != 1
;; Do next macro after finishing the file sending.
sendln 'echo SCP finish'
;; Exit this macro script.
end


send

Sends data.

send <data1> <data2>....

Remarks

Causes Tera Term to send characters to the host.
If <data> is a string, the string is sent to the host.
If <data> is an integer, its lowest-order byte (0-255) is regarded as an ASCII code of the character, and the character is sent to the host.

Example

send 'ABC'

; Send "ABC". (ASCII code of the character "A" is 65.)
send  65 66 67

myname='Tera Term'
send 'My name is ' myname '.'

; "ABC"
send $41 $42 $43

; "1"
value = $31
send value

; "31"
value = $31
sprintf2 command "%02X" value
send command

/* "CTRL+C" is 3 in binary so just send 3 like so.
 *
 * CTRL+A = 1, CTRL+B = 2.................. CTRL+Z = 26.
 */
send #3

/* Send the tab code. */
send #9

See also "setsync" for the synchronous mode.

See also

  • sendln
  • Formats of constants


sendbreak

Causes Tera Term to send a break signal to the host.

sendbreak

Remarks

Raises the break interrupt(Break interrupt indicator) to the host system on the serial console. This macro sends IAC BREAK(255 243) to the host system on the TELNET console. Also, sends SSH2_MSG_CHANNEL_REQUEST("break") to the host system on the SSH2 console.

Example

; Calls the help message of Magic SysRq(Linux).
sendbreak
send 'h'


sendbroadcast

Broadcasts the data. (version 4.62 or later)

sendbroadcast <data1> <data2>....

Remarks

Causes Tera Term to broadcast characters to all terminals, and then the character is sent to the host.
If <data> is a string, the string is sent to the host.
If <data> is an integer, its lowest-order byte (0-255) is regarded as an ASCII code of the character, and the character is sent to the host.

NOTICE: Sent data is ignored on the terminal the AcceptBroadcast is disabled.

Example

msg='cal'
sendbroadcast 'hoge' 13 10 'hohoho' msg 13 10


sendfile

Sends a file.

sendfile <filename> <binary flag>

Remarks

Causes Tera Term to send the file <filename> to the host. Pauses until the end of the file transfer.
If <binary flag> is non-zero, the file is sent without any modifications.
If <binary flag> is zero, new-line characters are converted (CR -> CR/CRLF) and control characters except TAB, LF and CR are stripped out.

Example

sendfile 'data.dat' 1


sendkcode

Sends the key code.

sendkcode <key code> <repeat count>

Remarks

Causes Tera Term to perform a function defined for pressing a key or key combination.
The key or key combination is specified by its <key code>, which is defined by KEYCODE.EXE. The function is performed <repeat count> times.

Usually the function means sending a character string to the host. The function can be defined in the keyboard setup file of Tera Term.
See KEYCODE.TXT.

Example

; Simulate pressing the down-arrow key three times.
; The key code of the down-arrow key is 336 for the IBM PC keyboard.
sendkcode 336 3


sendln

Sends data with new-line.

sendln <data1> <data2>....

Remarks

Causes Tera Term to send characters followed by a new-line character to the host.
Format of <data> is the same as the "send" command.

Example

; Only a new-line character is sent.
sendln

sendln 'abc'

Password='mypassword'
sendln Password

See also "setsync" for the synchronous mode.

See also

  • send


sendlnbroadcast

Broadcasts the data. (version 4.62 or later)

sendlnbroadcast <data1> <data2>....

Remarks

Causes Tera Term to broadcast characters followed by a new-line character to all terminals, and then the data is sent to the host.
Format of <data> is the same as the "sendbroadcast" command.

Sent data is ignored on the terminal the AcceptBroadcast is disabled.

Example

; Sends "ABCdefGHI" with a new-line character.
sendlnbroadcast "ABC" "def" "GHI"

; Only a new-line character is sent.
sendlnbroadcast


sendlnmulticast

Multicast the data with new-line. (version 4.96 or later)

sendlnmulticast <multicastname> <data1> <data2>....

Remarks

Causes Tera Term to multicast characters followed by a new-line character to selected terminals, and then the data is sent to the host.
Format of <data> is the same as the "sendmulticast" command.

Example

mcastname = "multicast-test"

connect "server-a"
setmulticastname mcastname

unlink

connect "server-b"
setmulticastname mcastname

; Sends "ABCdefGHI" with a new-line character.
sendlnmulticast mcastname "ABC" "def" "GHI"

; Only a new-line character is sent.
sendlnmulticast mcastname

See also

  • sendmulticast
  • setmulticastname


sendmulticast

Sends the data to the multicast host. (version 4.62 or later)

sendmulticast <multicastname> <data1> <data2>....

Remarks

Causes Tera Term to sends characters to the multicast terminal specified by <multicastname> argument or command line option. Beforehand, the name of terminal identification must be configured by using setmulticastname command.
If <data> is a string, the string is sent to the host.
If <data> is an integer, its lowest-order byte (0-255) is regarded as an ASCII code of the character, and the character is sent to the host.

NOTICE: Sent data is ignored on the terminal the AcceptBroadcast is disabled.

Example

; TerminalA
setmulticastname 'screen1'
; Do not receive any strings.

; TerminalB
setmulticastname 'screen2'
; The 'violin' string will be sent by the TerminalD.

; TerminalC
setmulticastname 'screen2'
; The 'violin' string will be sent by the TerminalD.

; TerminalD
setmulticastname 'screen3'
sendmulticast 'screen2' 'violin' 13 10     ; Multicast transmission
; Do not receive any strings.


setbaud

Causes Tera Term to change speed of serial port. (version 4.58 or later)

setbaud <value>

Parameters

integer <value> (less than version 4.66)
The corresponding ID of speed.
value    speed (bps)
1        110
2        300
3        600
4        1200
5        2400
6        4800
7        9600
8        14400
9        19200
10       38400
11       57600
12       115200
13       230400
14       460800
15       921600
integer <value> (version 4.66 or later)
The immediate speed.

Example

; change speed to 115200 bps

; less than version 4.66
setbaud 12

; version 4.66 or later
setbaud 115200

See also

  • setspeed


setdebug

Configures the debug mode to Tera Term. (version 4.64 or later)

setdebug <flag>

Remarks

Set the debug flag of Tera Term by using below flags. It is possible to wait the control code to enabling the debug mode.

0: no debug: output as usual
1: usual teraterm debug mode (described in here)
2: hex output. Received bytes are printed in hex format (capital letters) separated by a space
3: disable output completely

Example

setdebug 2
wait '09 0D 0A'
setdebug 0

setdebug 1
wait '^I^M^J'
setdebug 0

See also

  • wait


setdtr

Changes the DTR(Data Terminal Ready) status of Tera Term. (version 4.59 or later)

setdtr <flag>

Remarks

If the connection is not serial connection or flow control is not "none", this command will do nothing.

If <echo flag> is zero, the DTR is turned off.
If <echo flag> is non-zero, the DTR is turned on.

Example

; DTR on
setdtr 1

; DTR off
setdtr 0

See also

  • setrts


setecho

Changes the local echo status of Tera Term.

setecho <echo flag>

Remarks

If <echo flag> is non-zero, the local echo is turned on.
If <echo flag> is zero, the local echo is turned off.

Example

; local echo on
setecho 1


setflowctrl

Causes Tera Term to change flow control. (version 4.94 or later)

setflowctrl <value>

Parameters

integer <value>
Set the flow control of serial port by using below flags.
Value | Meaning
1 | Xon/Xoff
2 | hardware(RTS/CTS)
3 | none
4 | hardware(DSR/DTR) (version 4.105 or later)

Example

; change flow control to "none"
setflowctrl 3


setmulticastname

Configures a name of terminal identification for the multicast transmission. (version 4.62 or later)

setmulticastname <multicastname>

Remarks

Causes Tera Term to configure the name of terminal identification as own terminal.

See also

  • sendmulticast


setrts

Changes the RTS(Request To Send) status of Tera Term. (version 4.59 or later)

setrts <flag>

Remarks

If the connection is not serial connection or flow control is not "none", this command will do nothing.

If <echo flag> is zero, the RTS is turned off.
If <echo flag> is non-zero, the RTS is turned on.

Example

; RTS on
setrts 1

; RTS off
setrts 0

See also

  • setdtr


setspeed

Causes Tera Term to change speed of serial port. (version 4.99 or later)

setspeed <value>

This command is a alias of setbaud command.

Description

Causes Tera Term to change speed of serial port to <value> bps.

Example

; change speed to 115200 bps
setspeed 115200

See also

  • setbaud


setsync

Sets the synchronous mode.

setsync <sync flag>

Remarks

Enters the synchronous communication mode if <sync flag> is non-zero, or enters the asynchronous communication mode if <sync flag> is zero.

Tera Term transfers received characters from the host to MACRO. MACRO stores the characters in the buffer.
The character-reading commands, such as the "wait" command, read out the characters from the buffer.

Initially, MACRO is in the asynchronous mode. In this mode, the buffer may overflow if no character-reading command is executed for a long time, or the receiving speed is too fast.
In the synchronous mode, the buffer never overflows. If the buffer becomes full, Tera Term stops receiving characters from the host and stops transferring them to MACRO. When the buffer regains enough space,Tera Term restarts receiving and transferring.
Enter the synchronous mode only when it is necessary and re-enter the asynchronous mode when the synchronous operation is no longer needed.

For a macro operation, which requires reliability, something like processing lines of received characters without loss of data, you need to enter the synchronous mode. However, the synchronous mode makes Tera Term slow in speed of receiving characters and causes Tera Term freeze if no character-reading command is executed for a long time.
On the other hand, a simple macro operation, such as auto login, works with almost no problem in the asynchronous mode, because the buffer size is large enough (16K bytes) and all received characters are processed by character-reading commands before the buffer overflows.

Example

connect server
; enter the synchronous mode
setsync 1
timeout = 60
waitln '+OK' '-ERR'

; enter the asynchronous mode
setsync 0

end

connect '/C=1'

setsync 1

while 1
  ; Request data
  sendln  'REQ'

  ; Delay for 1 second
  pause 1

  flushrecv
endwhile

See also

  • flushrecv


settitle

Sets the window title string.

settitle <title>

Remarks

Changes the title text of Tera Term to <title>.

Example

settitle 'Tera Term'


showtt

Changes the displaying of Tera Term window.

showtt <show flag>

Remarks

Hides the VT window of Tera Term if <show flag> is -1.
Minimizes the VT window of Tera Term if <show flag> 0.
Restores the VT window Tera Term if <show flag> is 1.
Hides the TEK window of Tera Term if <show flag> is 2.
Minimizes the TEK window of Tera Term if <show flag> 3.
Open/restores the TEK window of Tera Term if <show flag> is 4.
Closes the TEK window of Tera Term if <show flag> is 5.
Hides the log window if <show flag> is 6.
Minimizes the log window if <show flag> is 7.
Restores the log window if <show flag> is 8.

Example

; Minimize Tera Term.
showtt 0

; Restore Tera Term.
showtt 1

; Hide Tera Term.
showtt -1

showtt 7    ;Minimize log window
showtt 8    ;Restore log window
showtt 6    ;Hide log window


testlink

Reports the current link and connection status.

testlink

Remarks

The system variable "result" is set to one of the following values depending on the link and connection status:

Value | Status
0 | Link to Tera Term has not been made.
1 | Connection to the host has not been made, but link to Tera Term has been made.
2 | Both connection and link have been made.

Example

; If MACRO is not linked to Tera Term,
testlink
; execute the connect command.
if result=0 connect 'host'

See also

  • closett
  • connect
  • cygconnect
  • disconnect
  • unlink


unlink

Terminates the link between the current Tera Term window and MACRO.

unlink

Remarks

MACRO enters the unlinked state and can not control the Tera Term window any more.
In the unlinked state, the "connect" command can open a new Tera Term window and link MACRO to it.

Example

; open a Tera Term window and link MACRO to it
connect 'host'

; terminate the link
unlink

; open another Tera Term window and link MACRO to it
connect 'host2'

See also

  • closett
  • connect
  • cygconnect
  • disconnect
  • testlink


wait

Waits string.

wait <string1> [<string2> ...]

Remarks

Pauses until one of the character strings is received from the host, or until the timeout occurs. Maximum number of the strings is 10.

When the empty string is specified, this command will wait an character.

If the system variable "timeout" or "mtimeout" is greater than zero, the timeout occurs when <timeout>.<mtimeout> seconds have passed. If the timeout is less than or equal to zero, the timeout never occurs.

These commands return one of the following values in the system variable "result":

Value | Meaning
0 | Timeout. No string has received.
1 | <string1> has received.
2 | <string2> has received.
n | <stringn> has received. n=1..10.

Example

; The timeout limit is 30 sec.
timeout = 30

wait 'OK' 'ERROR'
; If timeout occurs, go to ":timeout".
if result=0 goto timeout
; has received, go to ":error".
If result=1 goto ok
; "ERROR" has received, go to ":error".
If result=2 goto error

; Wait a line beginning with the ">" or a line ending with the "complete.". (ASCII code of LF is 10, and CR is 13.)
wait #10'>' 'complete.'#13

; The timeout limit is 100 msec.
timeout = 0
mtimeout = 100
wait 'server response'

; Waits control codes with hex mode
setdebug 2
wait '11 0D 11 0D'
setdebug 0

See also

  • setdebug
  • waitln
  • waitregex


wait4all

Waits string for all macro linked terminals. (version 4.63 or later)

wait4all <string1> [<string2> ...]

Remarks

Pauses until one of the character strings for all macro linked terminals at the time of executing this command is received from the host, or until the timeout occurs. Maximum number of the strings is 10.
The command does not watch the terminal executed after the command and the macro not-linked terminal.

If the system variable "timeout" or "mtimeout" is greater than zero, the timeout occurs when <timeout>.<mtimeout> seconds have passed. If the timeout is less than or equal to zero, the timeout never occurs.

These commands return one of the following values in the system variable "result":

Value | Meaning
0 | Timeout. No string has received.
1 | <string1> has received.
2 | <string2> has received.
n | <stringn> has received. n=1..10.

NOTICE: The Wait4allMacroCommand entry in the teraterm.ini file must be "on" to use this macro command. Rarely, the macro command does not work well.

Example

; Terminal1
pause 3000
end

; Terminal2
pause 3000
end

; Terminal3
wait4all 'message'


waitevent

Waits an event.

waitevent <events>

Remarks

Pauses until one of the events specified by <events> occurs. <events> can be combination of the following event identifiers.

Event | Event identifier
timeout | 1
unlink | 2
disconnection | 4
connection | 8

The timeout event occurs when <timeout>.<mtimeout> seconds have passed. <timeout> is the value of the system variable "timeout". <mtimeout> is the value of the system variable "mtimeout". If timeout is less than or equal to zero, this event never occurs.

The unlink event occurs when Tera Term is closed.

The disconnection (connection) event occurs when the communication between Tera Term and the host is closed (opened).

These commands return the identifier of the actual event in the system variable "result".

Example

; Wait the disconnection event
waitevent 4
; Wait the unlink or connection events
waitevent 2 or 8
; The unlink event occurred
if result=2 goto label1
; The connection event occurred
if result=8 goto label2


waitln

Waits a line that contains string.

waitln <string1> [<string2> ...]

Remarks

Pauses until a line which contains one of the character strings is received from the host, or until the timeout occurs. Maximum number of the strings is 10.

When the empty string is specified, this command will wait an character + CRLF.

If the system variable "timeout" or "mtimeout" is greater than zero, the timeout occurs when <timeout>.<mtimeout> seconds have passed. If the timeout is less than or equal to zero, the timeout never occurs.

These commands return the received line in the system variable "inputstr" and one of the following values in the system variable "result":

Value | Meaning
0 | Timeout.
1 | A line which contains <string1> has received.
2 | A line which contains <string2> has received.
n | A line which contains <stringn> has received. n=1..10.

Example

waitln 'cal'
messagebox inputstr "str"  ; echo aaa cal hoge fuga

See also

  • wait
  • waitregex


waitn

Waits for the given number of bytes to be put into TeraTerm macro received buffer. (version 4.62 or later)

waitn <received byte count>

Remarks

Pauses until the given number of bytes are received from the host, or until the timeout occurs.

If the system variable "timeout" or "mtimeout" is greater than zero, the timeout occurs when <timeout>.<mtimeout> seconds have passed. If the timeout is less than or equal to zero, the timeout never occurs.

These commands return one of the following values in the system variable "result":

Value | Meaning
0 | Timeout. No data has received.
1 | The characters of specified numbers are stored in the inputstr variable. When the numbers are over 511 bytes, the inputstr variable truncates the numbers to 511.

Example

; The timeout limit is 30 sec.
timeout = 30

; Clear the received buffer.
flushrecv

; Wait for more than 255 bytes.
waitn 255


waitrecv

Waits string.

waitrecv <sub-string> <len> <pos>

Remarks

Pauses until a string, which satisfies a condition, is received from the host, or until the timeout occurs.

The condition is:
The length of the string is <len>, and the string contains the <sub-string> beginning at the <pos>th(1-origin) character.
This command confirms whether the string is matched every time <len> byte is received.
For example, if <sub-string> is "def" and <len> is 9 and <pos> is 4, the string "abcdefghi" satisfies the condition.

If such a string is received, it is saved in the system variable "inputstr".

If the system variable "timeout" or "mtimeout" is greater than zero, the timeout occurs when <timeout>.<mtimeout> seconds have passed. If the timeout is less than or equal to zero, the timeout never occurs.

These commands return one of the following values in the system variable "result":

Value | Meaning
-1 | A string, which contains the <sub-string> beginning at the <pos>th character, has been received, and saved in the "inputstr", but its length is less than <len> because of the timeout.
0 | Timeout. No string, which satisfies the condition, has been received.
1 | A string, which satisfies the condition, has been received, and saved in the "inputstr".

Example

; Every byte is shown in hexadecimal
setdebug 2
waitrecv '43 0D'  2 1
setdebug 0

; In this mode non printable characters are shown as control keys e.g. ^A = 1, ^B = 2 etc.
setdebug 1
waitrecv 'C^M' 2 1
setdebug 0

; Normal mode
setdebug 0
waitrecv 'C'#13 2 1

See also

  • setdebug
  • wait


waitregex

Waits a line that contains string with regular expression. (version 4.21 or later)

waitregex <string1 with regular expression> [<string2 with regular expression> ...]

Remarks

Supports Oniguruma Regular Expressions.
Pauses until the string (maximum 511 characters), which matches one or more character strings with regular expression is received from the host, or until the timeout occurs. Maximum number of the regular expression strings is 10.

If the system variable "timeout" or "mtimeout" is greater than zero, the timeout occurs when <timeout>.<mtimeout> seconds have passed. If the timeout is less than or equal to zero, the timeout never occurs.

These commands return one of the following values in the system variable "result":

Value | Meaning
0 | Timeout.
1 | <string1 with regular expression> has received.
2 | <string2 with regular expression> has received.
n | <stringn with regular expression> has received. n=1..10.

The received line is stored in the system variable "inputstr".
The first matched pattern is stored in the system variable "matchstr".
Group matched patterns of regular expressions are stored in 9 system variables from "groupmatchstr1" to "groupmatchstr9".

When a user searches the multi-byte string like as Japanese, the user must configure the regular encoding by using the regexoption previously.

Example

timeout = 30
waitregex 'Longhorn' '.*@sai' 'Pentium\d+' 'TeraTermX{3}'
int2str s result
messagebox s 'result'
messagebox inputstr 'inputstr'
messagebox matchstr 'matchstr'

See also

  • regexoption
  • wait
  • waitln


xmodemrecv

Receives a file from the host with the XMODEM protocol.

xmodemrecv <filename> <binary flag> <option>

Remarks

Causes Tera Term to receive the file <filename> from the host with the XMODEM protocol. Pauses until the end of the file transfer.
If the file is transferred successfully, the system variable "result" is set to 1. Otherwise, "result" is set to zero.

If the file is a binary file, <binary flag> must be non-zero.
If the file is a text file, <binary flag> must be zero.

<option> specifies the XMODEM option (Type of error detection), and can be one of the following:
Packet size (1K) can be only specified at sender side. (version 4.90 or later)

<option> | (version 4.89 or earlier) | (version 4.90 or later)
1 | Checksum | Checksum
2 | CRC | CRC
3 | 1K | CRC
others | Checksum | Checksum

Example

; XMODEM receive, text file, CRC
xmodemrecv 'readme.txt' 0 2


xmodemsend

Sends a file from the host with the XMODEM protocol.

xmodemsend <filename> <option>

Remarks

Causes Tera Term to send the file <filename> to the host with the XMODEM protocol. Pauses until the end of the file transfer.
If the file is transferred successfully, the system variable "result" is set to 1. Otherwise, "result" is set to zero.

<option> specifies the XMODEM option (packet size), and can be one of the following:
Type of error detection (Checksum/CRC) can be specified at receiver side. (version 4.90 or later)

<option> | (version 4.89 or earlier) | (version 4.90 or later)
1 | Checksum | default(128 bytes)
2 | CRC | default(128 bytes)
3 | 1K | 1K
others | Checksum | default(128 bytes)

Example

; XMODEM send, default packet size
xmodemsend 'readme.txt' 1

; XMODEM send, 1K
xmodemsend 'readme.txt' 3


ymodemrecv

Receives a file from the host with the YMODEM protocol. (version 4.66 or later)

ymodemrecv

Remarks

Pauses until the end of the file transfer.
If the file is transferred successfully, the system variable "result" is set to 1. Otherwise, "result" is set to zero.

See also

  • ymodemsend


ymodemsend

Sends a file from the host with the YMODEM protocol. (version 4.66 or later)

ymodemsend <filename>

Remarks

Causes Tera Term to send the file <filename> to the host with the YMODEM protocol. Pauses until the end of the file transfer.
If the file is transferred successfully, the system variable "result" is set to 1. Otherwise, "result" is set to zero.

Example

filename = 'test.ttl'
srcfile = 'C:\Documents and Settings\yutaka\My Documents\TeraTermMacro\test.ttl'
dstfile = 'C:\usr\ttssh2\teraterm\debug\test.ttl'

ymodemsend srcfile
if result=1 then
    messagebox 'File transfer success' 'Send'
else
    messagebox 'File transfer failure' 'Send'
endif

sprintf2 var 'sb %s' filename
sendln var
ymodemrecv
if result=1 then
    messagebox 'File transfer success' 'Recv'
else
    messagebox 'File transfer failure' 'Recv'
endif

sprintf2 var 'fc /b %s %s' srcfile dstfile
exec var
if result=0 then
    messagebox 'Two files are same.' 'Compare'
else
    messagebox 'Two files are not same.' 'Compare'
endif

See also

  • ymodemrecv


zmodemrecv

Receives a file from the host with the ZMODEM protocol.

zmodemrecv

Remarks

Pauses until the end of the file transfer.
If the file is transferred successfully, the system variable "result" is set to 1. Otherwise, "result" is set to zero.

See also

  • zmodemsend


zmodemsend

Sends a file from the host with the ZMODEM protocol.

zmodemsend <filename> <binary flag>

Remarks

Causes Tera Term to send the file <filename> to the host with the ZMODEM protocol. Pauses until the end of the file transfer.
If the file is transferred successfully, the system variable "result" is set to 1. Otherwise, "result" is set to zero.

If the file is a binary file, <binary flag> must be non-zero.
If the file is a text file, <binary flag> must be zero.

Example

zmodemsend 'readme.txt' 0

See also

  • zmodemrecv


break

Quit from loop. (version 4.53 or later)

break

Remarks

Quit from "for" and "while" loop.

Example

for i 1 10
  yesnobox 'quit from loop?' 'Tera Term'
  if result break
next

while 1
  recvln
  strcompare inputstr "OK"
  if result=0 then
    break
  else
    sendln "abc..."
  endif
endwhile

See also

  • do, loop
  • for, next
  • until, enduntil
  • while, endwhile
  • continue


call

Calls a subroutine.

call <label>

Remarks

Calls a subroutine beginning with the <label> line.

Example

messagebox "I'm in main." "test"
; Jump to ":sub".
call sub
messagebox "Now I'm in main" "test"
end

; Start of the subroutine.
:sub
messagebox "Now I'm in sub" "test"
; Go back to the main routine.
return

See also

  • return


continue

Transfers control immediately to the next iteration of a loop. (version 4.77 or later)

continue

Remarks

Transfer from inside a "for" or "while" loop to the next iteration of that loop.

Example

a=0
b=0
while a<5
    a=a+1
    if a>2 then
        continue
    endif
    b=b+1
endwhile

sprintf2 var "a=%d b=%d" a b
dispstr var
;a=5 b=2

See also

  • do, loop
  • for, next
  • until, enduntil
  • while, endwhile
  • break


do, loop

Repeats. (version 4.56 or later)

do [ { while | until } <expression> (option)]

  ...

  ...

loop [ { while | until } <expression> (option)]

Remarks

Repeats the statements between 'do' and 'loop' according to condition as follows. If 'while' specified, repeats while <expression> is non-zero. If 'until' specified, repeats while <expression> is zero.

Example

; Repeat ten times.
i = 10
do while i>0
    i = i - 1
loop

; Send clipboard content.
offset = 0
do
    clipb2var buff offset
    if buff > 0 send buff
    offset = offset + 1
loop while result = 2

See also

  • Expressions and operators
  • for, next
  • until, enduntil
  • while, endwhile
  • break
  • continue


end

Quits the execution of the macro.

end

Remarks

MACRO is also closed.
This command is not strictly equal to the exit command.

See also

  • exit


execcmnd

Executes a TTL statement.

execcmnd <statement>

Remarks

Executes a TTL statement expressed by the string <statement>.

Example

; Execute the statement "send 'abc'".
execcmnd "send 'abc'"
; Stores 1 to the variable 'a'.
execcmnd "a=1"

for x 1 10      ;creates variables arr1 thru arr10 and assigns them 1 thru 10
  tmp='arr'
  int2str ix x
  strconcat tmp ix
  strconcat tmp '='
  strconcat tmp ix
  execcmnd tmp
next

messagebox arr1 'variable1'
messagebox arr2 'variable2'
messagebox arr3 'variable3'
messagebox arr4 'variable4'
messagebox arr5 'variable5'
messagebox arr6 'variable6'
messagebox arr7 'variable7'
messagebox arr8 'variable8'
messagebox arr9 'variable9'
messagebox arr10 'variable10'
messagebox arr11 'variable11'  ; syntax error


exit

Returns to the main file.

exit

Remarks

Exits the include file and returns to the main file.
Quits the execution of the macro by using this command in the main file(equivalent of end command).

See also

  • include
  • end


for, next

Repeats.

for <intvar> <first> <last>

  ...

  ...

next

Remarks

Repeats the statements between "for" and "next" until the integer variable <intvar> has the value <last> at the 'next' statement.
The initial value of the <intvar> is <first>. If <last> is greater than <first>, <intvar> is incremented by 1 at the 'next' line. If <last> is less than <first>, <intvar> is decremented by 1 at the 'next' line.

Example

; Repeat ten times.
for i 1 10
  sendln 'abc'
next

; Repeat five times.
for i 5 1
  sendln 'abc'
next

See also

  • do, loop
  • until, enduntil
  • while, endwhile
  • break
  • continue


goto

Jumps to a label,

goto <label>

Remarks

Moves control to the next line of the <label>.
However, the goto can not be used to exit the loop like as for and while, use the break instruction in place of the goto.

Example

; Jump to the next line of the ':label'.
goto label
...
...
...

:label
send 'abc'


if, then, elseif, else, endif

Conditional branching

1) Format 1

if <expression> <statement>

Remarks

Executes a <statement>, if <expression> is true(non-zero).

Example

; If A>1, jump to ':label'.
if A>1 goto label

; If result<>0, assign 0 to A.
if result A=0

2) Format 2

if <expression 1> then
  ...
  (Statements for the case:  <expression 1> is true (non-zero).)
  ...
[elseif <expression 2> then]
  ...
  (Statements for the case:  <expression 1> is false (zero) and <expression 2> is true.)
  ...
[elseif <expression N> then]
  ...
  (Statements for the case:  <expression 1>, <expression 2>,... and <expression N-1> are all false, and <expression N> is true.)
  ...
[else]
  ...
  (Statements for the case:  all the conditions above are false (zero).)
  ...
endif

Remarks

'if' and 'elseif' statements must end with 'then'.
'elseif' and 'else' can be omitted.
'endif' can not be omitted.

Example

if a=1 then
  b = 1
  c = 2
  d = 3
endif

if i<0 then
  i=0
else
  i=i+1
endif

if i=1 then
  c = '1'
elseif i=2 then
  c = '2'
elseif i=3 then
  c = '3'
else
  c = '?'
endif

*) NOTICE

(version 4.90 or later)
By using Format 2(if - endif), the syntax error occurs when then is not described.
code = 100
if code != 100
    messagebox 'The code value is not 100.' 'error'
    goto error
else
    messagebox 'The code value is 100.' 'OK'
endif

:error
end

See also

  • Expressions and operators


include

Moves control to the include file.

include '<include file name>'

Remarks

Loads the specified macro file and interprets the macro. When the macro execution ends, the next line of the include command is restarted.
Also, the include nest level is 9.

Example

----- Main file "main.ttl" ------
i=10
:loop
; Move to the include file.
include 'sub.ttl'
if i>=0 goto loop
end
----- End of "main.ttl" ---------

----- Include file "sub.ttl" ----
if i<0 then
  messagebox 'error!' 'sub'
  ; Go back to the main file.
  exit
endif
i = i - 1
; Go back to the main file.
----- End of "sub.ttl" ----------

See also

  • Note: Loading a macro file
  • exit


mpause

Pauses. (version 4.27 or later)

mpause <time>

Remarks

Pauses for <time> milliseconds.

Example

; Pause for 0.2 seconds.
mpause 200

mpause Time


pause

Pauses.

pause <time>

Remarks

Pauses for <time> seconds.

Example

; Pause for 10 seconds.
pause 10

pause Time


return

Exits the subroutine and returns to the main routine.

return

See also

  • call


until, enduntil

Repeats. (version 4.56 or later)

until <expression>

  ...

  ...

enduntil

Remarks

Repeats the statements between 'until' and 'enduntil' while <expression> is zero.

Example

; Repeat ten times.
i = 1
until i > 10
  i = i + 1
enduntil

See also

  • Expressions and operators
  • do, loop
  • for, next
  • while, endwhile
  • break
  • continue


while, endwhile

Repeats.

while <expression>

  ...

  ...

endwhile

Remarks

Repeats the statements between 'while' and 'endwhile' while <expression> is non-zero.

Example

; Repeat ten times.
i = 10
while i>0
  i = i - 1
endwhile

See also

  • Expressions and operators
  • do, loop
  • for, next
  • until, enduntil
  • break
  • continue


code2str

Converts ASCII code value to its string expression.

code2str <strvar> <ASCII code>

Remarks

If the integer value <ASCII code> is 1-255, this command copies a character with the <ASCII code> to the string variable <strvar>.
This command converts an ASCII code sequence expressed by <ASCII code> to a character string and copies it to <strvar>.
The non-zero highest-order byte of <ASCII code> is regarded as the first byte of the ASCII code sequence.
If <ASCII code> is zero, <strvar>.is set to ''(empty). The maximum length of the character string is 4

Example

; The character "A" is stored in the variable "str".
; The ASCII code for "A" is $41.
code2str str $41

; The character string "AB" is stored in the variable "str".
; The ASCII code $41 is for "A" and $42 for "B".
code2str str $4142


expandenv

Expands environment-variable strings. (version 4.71 or later)

Format

expandenv <strvar> [<strval>]

Parameters

string variable <strvar>
The specified string is expanded.
When the second argument(<strval>) is given, the result expanding the argument stores into the string variable <strvar>.
string <strval> (optional)
When this argument is given, the result expanding the argument stores into the string variable <strvar>.

Remarks

The expandenv command expands one or more environment-variable strings(%variableName%) and replaces them with the values for the current user.

Example

str = "%WINDIR%\notepad.exe"
expandenv str
messagebox str "env"    ; C:\WINDOWS\notepad.exe

expandenv str "%WINDIR%\notepad.exe"
messagebox str "env"    ; C:\WINDOWS\notepad.exe

expandenv str "%test%\notepad.exe"
messagebox str "env"    ; %test%\notepad.exe

See also

  • getpassword


int2str

Converts integer value to a string.

int2str <strvar> <integer value>

Remarks

Converts <integer value> to its string expression, and returns it in the string variable <strvar>.
This command is equal to the formatted output("%d") of the sprintf family.

Example

; The string "123" is assigned to the variable "valstr".
int2str valstr 123
messagebox valstr "str"     ; 123

num = 123
sprintf2 valstr "%d" num
messagebox valstr "str"     ; 123

See also

  • sprintf
  • sprintf2


regexoption

Specifies the syntax, character encoding and option of regular expression. (version 4.78 or later)

regexoption <option1> [<option2> ...]

Remarks

This command specifies the the syntax, character encoding and option of regular expression regarding the strmatch, strreplace and waitregex.

The option1 [option2 ...] can specify one of below syntaxes or encodings, some options.
These default value are the Syntax:SYNTAX_RUBY, the Encoding: ENCODING_ASCII and the Option: OPTION_NONE.

Type | Option Name | (short form) | Description
Syntax | SYNTAX_DEFAULT | - | Default (Ruby style)
 | SYNTAX_ASIS | ASIS | plain text
 | SYNTAX_POSIX_BASIC | POSIX_BASIC | POSIX Basic RE
 | SYNTAX_POSIX_EXTENDED | POSIX_EXTENDED | POSIX Extended RE
 | SYNTAX_EMACS | EMACS | Emacs style RE
 | SYNTAX_GREP | GREP | grep style RE
 | SYNTAX_GNU_REGEX | GNU_REGEX | GNU Regex
 | SYNTAX_JAVA | JAVA | Java style
 | SYNTAX_PERL | PERL | Perl style
 | SYNTAX_PERL_NG | PERL_NG | Perl + named group
 | SYNTAX_RUBY | RUBY | Ruby style
Encoding | ENCODING_ASCII | ASCII | ASCII encoding
 | ENCODING_ISO_8859_1 | ISO_8859_1 | ISO 8859-1 encoding
 | ENCODING_ISO_8859_2 | ISO_8859_2 | ISO 8859-2 encoding
 | ENCODING_ISO_8859_3 | ISO_8859_3 | ISO 8859-3 encoding
 | ENCODING_ISO_8859_4 | ISO_8859_4 | ISO 8859-4 encoding
 | ENCODING_ISO_8859_5 | ISO_8859_5 | ISO 8859-5 encoding
 | ENCODING_ISO_8859_6 | ISO_8859_6 | ISO 8859-6 encoding
 | ENCODING_ISO_8859_7 | ISO_8859_7 | ISO 8859-7 encoding
 | ENCODING_ISO_8859_8 | ISO_8859_8 | ISO 8859-8 encoding
 | ENCODING_ISO_8859_9 | ISO_8859_9 | ISO 8859-9 encoding
 | ENCODING_ISO_8859_10 | ISO_8859_10 | ISO 8859-10 encoding
 | ENCODING_ISO_8859_11 | ISO_8859_11 | ISO 8859-11 encoding
 | ENCODING_ISO_8859_13 | ISO_8859_13 | ISO 8859-13 encoding
 | ENCODING_ISO_8859_14 | ISO_8859_14 | ISO 8859-14 encoding
 | ENCODING_ISO_8859_15 | ISO_8859_15 | ISO 8859-15 encoding
 | ENCODING_ISO_8859_16 | ISO_8859_16 | ISO 8859-16 encoding
 | ENCODING_UTF8 | UTF8 | UTF-8 encoding
 | ENCODING_UTF16_BE | UTF16_BE | UTF-16 (Big Endian) encoding
 | ENCODING_UTF16_LE | UTF16_LE | UTF-16 (Little Endian) encoding
 | ENCODING_UTF32_BE | UTF32_BE | UTF-32 (Big Endian) encoding
 | ENCODING_UTF32_LE | UTF32_LE | UTF-32 (Little Endian) encoding
 | ENCODING_EUC_JP | EUC_JP | EUC-JP encoding
 | ENCODING_EUC_TW | EUC_TW | EUC-TW encoding
 | ENCODING_EUC_KR | EUC_KR | EUC-KR encoding
 | ENCODING_EUC_CN | EUC_CN | EUC-CN encoding
 | ENCODING_SJIS | SJIS | Shift_JIS encoding
 | ENCODING_KOI8_R | KOI8_R | KOI8-R encoding
 | ENCODING_CP1251 | CP1251 | CP1251 encoding
 | ENCODING_BIG5 | BIG5 | Big5 encoding
 | ENCODING_GB18030 | GB18030 | GB18030 encoding
Option | OPTION_NONE | - | no option
 | OPTION_SINGLELINE | SINGLELINE | '^' -> '\A', '$' -> '\Z'
 | OPTION_MULTILINE | MULTILINE | '.' match with newline
 | OPTION_IGNORECASE | IGNORECASE | ambiguity match on
 | OPTION_EXTEND | EXTEND | extended pattern form
 | OPTION_FIND_LONGEST | FIND_LONGEST | find longest match
 | OPTION_FIND_NOT_EMPTY | FIND_NOT_EMPTY | ignore empty match
 | OPTION_NEGATE_SINGLELINE | NEGATE_SINGLELINE | clear ONIG_OPTION_SINGLELIN
 | OPTION_DONT_CAPTURE_GROUP | DONT_CAPTURE_GROUP | only named group captured
 | OPTION_CAPTURE_GROUP | CAPTURE_GROUP | named and no-named group captured

Example

string="test À string"
pattern="E

regexoption "IGNORECASE"
strmatch string pattern
messagebox result "ASCII"        ; result -> 0 (Not Match)

regexoption "ISO_8859_1" "IGNORECASE"
strmatch string pattern
messagebox result "ISO_8859_1"   ; result -> 6 (Match)

string="Test (PaTTerN) String"
pattern="(pattern)"

regexoption "IGNORECASE"
strmatch string pattern
sprintf2 msg 'result=%d, matchstr="%s"' result matchstr
messagebox msg "IGNORECASE"          ; result=7, matchstr="PaTTerN"

regexoption "ASIS" "IGNORECASE"
strmatch string pattern
sprintf2 msg 'result=%d, matchstr="%s"' result matchstr
messagebox msg "IGNORECASE + ASIS"   ; result=6, matchstr="(PaTTerN)"

See also

  • strmatch
  • strreplace
  • waitregex


sprintf

Returns formatted output. (version 4.52 or later)

sprintf FORMAT [ARGUMENT ...]

Remarks

FORMAT controls the output as in C language printf with ARGUMENTs converted to proper type first. The output string is stored in the string variable <inputstr>.

supported format style
type | c, d, i, o, u, x, X, e, E, f, g, G, a, A and s
flags(option) | -, +, 0, # and blank(' ')
width(option) | decimal integer or *
precision(option) | nonnegative decimal integer or *(option), preceded by a period(.)

Please specify the floating point number with the string variable and string because the TTL can not support the floating point number.

As a result of this command, the system variable "result" is set to one of the following values.

Value | Status
0 | Formatted successfully
1 | No format string
2 | Invalid format
3 | Invalid argument

Example

sprintf 'Tera Term 4.%d' 51
messagebox inputstr 'sprintf test(1)'

sprintf 'Windows %d (+%s)' 2000 'SP4'
messagebox inputstr 'sprintf test(2)'

sprintf '%s=%d %s=0x%x' 'dec' 10 'hex' 33
messagebox inputstr 'sprintf test macro(3)'

sprintf 'pi=%f' "3.14159"
messagebox inputstr 'sprintf test macro(4)'

sprintf 'pi=%.4e' "3.14159"
messagebox inputstr 'sprintf test macro(5)'

sprintf 'pi=%.4g' "3.14159"
messagebox inputstr 'sprintf test macro(6)'

See also

  • sprintf2


sprintf2

Returns formatted output. (version 4.62 or later)

sprintf2 strvar FORMAT [ARGUMENT ...]

Remarks

FORMAT controls the output as in C language printf with ARGUMENTs converted to proper type first. The output string is stored in the string variable <strvar>.

supported format style
type | c, d, i, o, u, x, X, e, E, f, g, G, a, A and s
flags(option) | -, +, 0, # and blank(' ')
width(option) | decimal integer or *
precision(option) | nonnegative decimal integer or *(option), preceded by a period(.)

Please specify the floating point number with the string variable and string because the TTL can not support the floating point number.

As a result of this command, the system variable "result" is set to one of the following values.

Value | Status
0 | Formatted successfully
1 | No format string
2 | Invalid format
3 | Invalid argument
4 | Invalid destnation variable

Example

sprintf2 ver 'Tera Term 4.%d' 51
messagebox ver 'sprintf test(1)'

sprintf2 win 'Windows %d (+%s)' 2000 'SP4'
messagebox win 'sprintf test(2)'

sprintf2 test '%s=%d %s=0x%x' 'dec' 10 'hex' 33
messagebox test 'sprintf test macro(3)'

sprintf 'pi=%f' "3.14159"
messagebox inputstr 'sprintf test macro(4)'

sprintf 'pi=%.4e' "3.14159"
messagebox inputstr 'sprintf test macro(5)'

sprintf 'pi=%.4g' "3.14159"
messagebox inputstr 'sprintf test macro(6)'

See also

  • sprintf


str2code

Converts string to ASCII code value.

str2code <intvar> <string>

Remarks

If the <string> consists of one character, this function copies the ASCII code for the character to the integer variable <intvar>.
If the length of <string> is longer than one, this function converts <string> to its ASCII code sequence and copies it to <intvar>. The variable <intvar> can store 4 ASCII codes at maximum.
If the length of <string> is longer than 4, the last 4 bytes of ASCII code sequence is copied to <intvar>.

Example

str2code val 'A'
; val=65 (ASCII code for "A")

str2code val 'AB'
; val=65*256+66


str2int

Converts a string to integer value.

str2int <intvar> <string>

Remarks

Converts the <string> to its numeric value. The value is returned in the integer variable <intvar>.
You can specify the <string> as a format of decimal and hexadecimal number.

A decimal number     - 123, 0009
A hexadecimal number - 0x7b, $7b

If the string is converted successfully, the system variable "result" is set to 1. Otherwise, "result" is set to zero.

Example

str2int val '123'
; val=123, result=1

str2int val '123abc'
; val=123, result=1

str2int val '0009'
; val=9,   result=1

str2int val 'abc'
; val=0,   result=0

hexnum='0x456FE3'
str2int val hexnum
sprintf '%d %x' val val
messagebox inputstr 'test'
; val=4550627, result=1


strcompare

Compares two strings.

Format

strcompare <string1> <string2>

Remarks

Compares two strings. Depending on the relation between them, one of the following result code is returned in the system variable "result":

Relation | Result
<string1> < <string2> | -1
<string1> = <string2> | 0
<string1> > <string2> | 1

Example

; result = -1
strcompare 'abc' 'def'

strcompare command 'next'
if result=0 goto label
strcompare command 'end'
if result=0 end


strconcat

Appends a string.

Format

strconcat <strvar> <string>

Remarks

Appends a copy of <string> to the end of the string variable <strvar>.

Example

filename = 'c:\teraterm\'
strconcat filename 'test.txt'  ; c:\teraterm\test.txt

msg='HOST:'
sprintf2 var "%s/ USER NAME:%s" '192.168.1.1' 'test user'
strconcat msg var
messagebox msg "inputstr" ; HOST:192.168.1.1/ USER NAME:test user


strcopy

Copies a string.

Format

strcopy <string> <pos> <len> <strvar>

Remarks

Copies a substring of <string> to the string variable <strvar>. The substring begins at the <pos>th(1-origin) character in <string>, and its length is <len>.

Example

strcopy 'tera term' 6 4 substr
; substr='term'


strinsert

Inserts a string. (version 4.67 or later)

Format

strinsert <strvar> <index> <string>

Remarks

Inserts a specified instance of <string> at a specified <index> position(1-origin) in the string variable <strvar>.

Example

s='abc'
strinsert s 3 'XYZ'  ; 'abXYZc'
messagebox s s

s='abc'
strinsert s 1 'XYZ'  ; 'XYZabc'
messagebox s s

s='abc'
strinsert s -1 'XYZ'  ; Syntax error
messagebox s s

s='abc'
strinsert s 0 'XYZ'  ; Syntax error
messagebox s s

s='abc'
strinsert s 4 'XYZ'  ; 'abcXYZ'
messagebox s s

s='abc'
strinsert s 5 'XYZ'  ; Syntax error
messagebox s s

See also

  • strmatch
  • strreplace
  • strremove


strjoin

Concatenates a string with delimiters. (version 4.67 or later)

Format

strjoin <strvar> <separator> [<count>]

Remarks

Concatenates a specified separator string variable <strvar> between each element of the 9 system variables from "groupmatchstr1" to "groupmatchstr9", yielding a single concatenated string.

<separator> is specified delimiter characters.

The <count> is specified the maximum number of substrings to concatenate.
When the <count> is left out, the default value is 9.

Example

groupmatchstr1="Jan"
groupmatchstr2="Feb"
groupmatchstr3="Mar"
groupmatchstr4="Apr"
groupmatchstr5="May"
groupmatchstr6="Jun"
groupmatchstr7="Jul"
groupmatchstr8="Aug"
groupmatchstr9="Sep"
strjoin strvar ","
messagebox strvar "strvar"   ; 'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep'

groupmatchstr1="Jan"
groupmatchstr2="Feb"
groupmatchstr3="Mar"
groupmatchstr4="Apr"
groupmatchstr5="May"
groupmatchstr6="Jun"
groupmatchstr7="Jul"
groupmatchstr8="Aug"
groupmatchstr9="Sep"
strjoin strvar " and " 6
messagebox strvar "strvar"   ; 'Jan and Feb and Mar and Apr and May and Jun'

groupmatchstr1="Jan"
groupmatchstr2="Feb"
groupmatchstr3="Mar"
groupmatchstr4="Apr"
groupmatchstr5="May"
groupmatchstr6="Jun"
groupmatchstr7=""
groupmatchstr8=""
groupmatchstr9=""
strjoin strvar "," 9
messagebox strvar "strvar"   ; 'Jan,Feb,Mar,Apr,May,Jun,,,'

See also

  • strsplit


strlen

Returns a length of string.

Format

strlen <string>

Remarks

Returns the length of <string> in the system variable "result".
The length counts in terms of bytes.

Example

strlen Txcnt
if result>0 then
    logwrite Txcnt
else
    messagebox 'Txcnt is NULL' 'error'
endif


strmatch

Matches the target string with the regular expression. (version 4.59 or later)

Format

strmatch <target string> <string with regular expression>

Remarks

Supports Oniguruma Regular Expressions.
This command searches the <target string> with the <string with regular expression>.
The "strmatch" command returns one of the following values in the system variable "result":

Value | Meaning
0 | Not matched.
1 | Matched offset(1origin).

The first matched pattern is stored in the system variable "matchstr".
Group matched patterns of regular expressions are stored in 9 system variables from "groupmatchstr1" to "groupmatchstr9".
Also, these system variables will not be changed when the pattern does not match.

When a user searches the multi-byte string like as Japanese, the user must configure the regular encoding by using the regexoption previously.

Example

strmatch 'Microsoft Windows XP [Version 5.1.2600]' '\[(Version (\d+).(\d+).(\d+))\]'

int2str s result
messagebox s 'result'                        ; 22
messagebox matchstr 'matchstr'               ; [Version 5.1.2600]
messagebox groupmatchstr1 'groupmatchstr1'   ; Version 5.1.2600
messagebox groupmatchstr2 'groupmatchstr2'   ; 5
messagebox groupmatchstr3 'groupmatchstr3'   ; 1
messagebox groupmatchstr4 'groupmatchstr4'   ; 2600

See also

  • regexoption
  • strreplace
  • strinsert
  • strremove


strremove

Deletes a string. (version 4.67 or later)

Format

strremove <strvar> <index> <len>

Remarks

Deletes a specified number <len> of characters from the string variable <strvar> beginning at a specified position <index>(1-origin).

Example

s = '123abc456'
strremove s 4 3  ; '123456'
messagebox s s

s = '123abc456'
strremove s 1 3  ; 'abc456'
messagebox s s

s = '123abc456'
strremove s -1 3 ; Syntax error
messagebox s s

s = '123abc456'
strremove s 0 3  ; Syntax error
messagebox s s

s = '123abc456'
strremove s 9 1  ; '123abc45'
messagebox s s

s = '123abc456'
strremove s 9 2  ; Syntax error
messagebox s s

s = '123abc456'
strremove s 10 1 ; Syntax error
messagebox s s

s = '123abc456'
strremove s 4 0  ; Syntax error
messagebox s s

See also

  • strmatch
  • strreplace
  • strinsert


strreplace

Replaces a string, with another string. (version 4.67 or later)

Format

strreplace <strvar> <index> <regex> <newstr>

Remarks

Replaces a specified <regex> string in the string variable <strvar> beginning at a specified position <index>(1-origin), with another specified <newstr> string.
If the <newstr> is ''(empty), the <regex> string is removed from <strvar>.

When the replacing succeeds, the system variable "result" is set to 1 and the matched string by the <regex> is stored into the system variable "matchstr".
When the replacing fails by the reason <regex> not match <strvar>, the system variable "result" is set to 0.
When <regex> format is not valid, the system variable "result" is set to -1.

When a user searches the multi-byte string like as Japanese, the user must configure the regular encoding by using the regexoption previously.

NOTE: When this macro command is performed, the 9 system variables from "groupmatchstr1" to "groupmatchstr9" are cleared.

Example

src='linux.txt'
strreplace src 1 '\.txt' '.doc'
messagebox src 'result'          ; linux.doc

src='I can do it.'
strreplace src 1 'can\s' ''
messagebox src 'result'     ; 'I do it.'

src='Microsoft Windows XP [Version 5.1.2600]'
strmatch src '(Version \d+.\d+.)\d+'

int2str s result
messagebox s groupmatchstr1
pos=result                ; 23
mstr=groupmatchstr1       ; Version 5.1.

strreplace src pos mstr 'Build '
if result=1 then
    messagebox src 'result'   ; Microsoft Windows XP [Build 2600]
endif

See also

  • Oniguruma Regular Expressions
  • regexoption
  • strmatch
  • strinsert
  • strremove


strscan

Searches for substring in string.

Format

strscan <string> <substring>

Remarks

Searches for <substring> in <string>.
If <substring> is found, its position(1-origin) is returned in the system variable "result".
If <string> contains more than one occurrence of <substring>, the position of the first one is returned. If <substring> is not found, "result" is set to zero.

Example

strscan 'tera term' 'term'
; result = 6
int2str valstr result
messagebox valstr 'result'

; Converts a hex string to a hexadecimal and binary value
basenum='0060E3da'
base=16
call base2dec
int2str sdec decnum
messagebox sdec 'decnum'
base=2
call dec2base
messagebox basenum 'basenum'
end

:dec2base
basenum=''
tmp=decnum      ;modified so not destructive of decnum
while tmp > 0
   strcopy '0123456789ABCDEF' (tmp%base)+1 1 basedig
   strconcat basedig basenum
   basenum=basedig
   tmp=tmp/base
endwhile
return

:base2dec
decnum=0
strlen basenum
len=result
for i 1 len
   strcopy basenum i 1 basedig
   decnum=decnum*base
   strscan '0123456789ABCDEFabcdef' basedig
   if result>16 result=result-6      ;take care of lower case
   decnum=decnum+result-1
next
return

; Network IP calculation from IP and Subnet mask
ip='192.168.1.189'
sn='255.255.255.248'
bits=0          ;calculate bits & first address in sn
bitstr='000 128 192 224 240 248 252 254 255'    ;lookup table for # bits
do
    str2int isn sn
    int2str stmp isn
    strscan bitstr stmp     ;use lookup table to find bits
    bits=bits+(result-1)/4
    str2int tmp ip      ;find net by bitwise AND of ip and mask
    sprintf2 net '%s%d' net tmp&isn
    strscan sn '.'
    strcopy sn result+1 999 sn
    strscan ip '.'
    strcopy ip result+1 999 ip
    if result>0 strconcat net '.'
loop while result>0
messagebox bits 'bits'
messagebox net 'net'


strspecial

Converts special characters. (version 4.67 or later)

Format

strspecial <strvar> [<strval>]

Parameters

string variable <strvar>
The specified string is converted.
When the second argument(<strval>) is given, the result converting the argument stores into the string variable <strvar>.
string <strval> (optional)
When this argument is given, the result converting the argument stores into the string variable <strvar>.

Remarks

Converts the following characters in the string to special characters.

input | output
\\ | "\"
\n | line feed
\t | tab

Example

str = "AB\tCD\nEF\\nGH"
strspecial str
messagebox str "special"

strspecial str "AB\tCD\nEF\\nGH"
messagebox str "special"


strsplit

Splits a string by delimiters. (version 4.67 or later)

Format

strsplit <strval> <separator> [<count>]

Remarks

Splits the string <strval> by the <separator> delimiter, and returns the 9 system variables from "groupmatchstr1" to "groupmatchstr9".

One delimiter character is specified in the <separator>.

The <count> is specified the maximum number of substrings to return. The upper limit of <count> is 9.
If a number of substrings is smaller than <count>, the remaining groupmatchstr variables stores ''(empty).
When the number of substrings are greater than the <count>, the remaining substrings stores into the last groupmatchstr variable.

When the <count> is not specified, the maximum of substrings is 9.
If the number of substrings is larger than 9, the ninth substring stores into the last groupmatchstr variable.

The division count stores into the system variable "result".
When the <count> is not specified and the number of substrings is larger than 9, the "result" is set to 10.

Example

src=',,Sun,Mon,Tue,,Thu,Fri,Sat'
strsplit src ',' 7

messagebox groupmatchstr1 "groupmatchstr1" ; ''
messagebox groupmatchstr2 "groupmatchstr2" ; ''
messagebox groupmatchstr3 "groupmatchstr3" ; 'Sun'
messagebox groupmatchstr4 "groupmatchstr4" ; 'Mon'
messagebox groupmatchstr5 "groupmatchstr5" ; 'Tue'
messagebox groupmatchstr6 "groupmatchstr6" ; ''
messagebox groupmatchstr7 "groupmatchstr7" ; 'Thu,Fri,Sat'
messagebox groupmatchstr8 "groupmatchstr8" ; ''
messagebox groupmatchstr9 "groupmatchstr9" ; ''
messagebox result         "result"         ; 7

src='Sun,Mon,Tue,Wed,Thu,Fri,Sat'
strsplit src ',' 7

messagebox groupmatchstr1 "groupmatchstr1" ; 'Sun'
messagebox groupmatchstr2 "groupmatchstr2" ; 'Mon'
messagebox groupmatchstr3 "groupmatchstr3" ; 'Tue'
messagebox groupmatchstr4 "groupmatchstr4" ; 'Wed'
messagebox groupmatchstr5 "groupmatchstr5" ; 'Thu'
messagebox groupmatchstr6 "groupmatchstr6" ; 'Fri'
messagebox groupmatchstr7 "groupmatchstr7" ; 'Sat'
messagebox groupmatchstr8 "groupmatchstr8" ; ''
messagebox groupmatchstr9 "groupmatchstr9" ; ''
messagebox result         "result"         ; 7

src='A string'#10'of ,,tokens'#10'and some  more tokens'
strsplit src '\n' 9

messagebox groupmatchstr1 "groupmatchstr1" ; 'A string'
messagebox groupmatchstr2 "groupmatchstr2" ; 'of ,,tokens'
messagebox groupmatchstr3 "groupmatchstr3" ; 'and some  more tokens'
messagebox groupmatchstr4 "groupmatchstr4" ; ''
messagebox groupmatchstr5 "groupmatchstr5" ; ''
messagebox groupmatchstr6 "groupmatchstr6" ; ''
messagebox groupmatchstr7 "groupmatchstr7" ; ''
messagebox groupmatchstr8 "groupmatchstr8" ; ''
messagebox groupmatchstr9 "groupmatchstr9" ; ''
messagebox result         "result"         ; 3

src='1,2,3,4,5,6,7,8,9,0'
strsplit src ','

messagebox groupmatchstr1 "groupmatchstr1" ; '1'
messagebox groupmatchstr2 "groupmatchstr2" ; '2'
messagebox groupmatchstr3 "groupmatchstr3" ; '3'
messagebox groupmatchstr4 "groupmatchstr4" ; '4'
messagebox groupmatchstr5 "groupmatchstr5" ; '5'
messagebox groupmatchstr6 "groupmatchstr6" ; '6'
messagebox groupmatchstr7 "groupmatchstr7" ; '7'
messagebox groupmatchstr8 "groupmatchstr8" ; '8'
messagebox groupmatchstr9 "groupmatchstr9" ; '9'
messagebox result         "result"         ; 10

See also

  • strjoin


strtrim

Trims characters from beginning and end of string. (version 4.67 or later)

Format

strtrim <strvar> <trimchars>

Remarks

Removes all occurrences of a set of characters specified in the <trimchars> from the beginning end end of the string variable <strvar>.

Example

src='   '#9' #include <stdio.h>      '#9' '
strtrim src ' \t'
messagebox src 'result'          ; '#include <stdio.h>'

src='         #include <stdio.h>         '
strtrim src ' '
messagebox src 'result'          ; '#include <stdio.h>'

src='*;|@123***456@|;'
strtrim src '*;|@'
messagebox src 'result'          ; '123***456'

src='*;|@123***456@|;'
strtrim src '*;|@123456'
messagebox src 'result'          ; ''

src='#*;|@123***456@|;'
strtrim src '*;|@'
messagebox src 'result'          ; '#*;|@123***456'

src='*;|@123***456@|;#'
strtrim src '*;|@'
messagebox src 'result'          ; '123***456@|;#'

See also

  • strinsert
  • strremove


tolower

Converts all of alphabetic characters to lower-case. (version 4.53 or later)

tolower <strvar> <string>

Remarks

Converts all of alphabetic characters in <string> to lower-case, and returns it in the string variable <strvar>.

Example

; The string 'abcdefgh' is assigned to the variable "valstr".
tolower valstr 'abCDefGH'


toupper

Converts all of alphabetic characters to upper-case. (version 4.53 or later)

toupper <strvar> <string>

Remarks

Converts all of alphabetic characters in <string> to upper-case, and returns it in the string variable <strvar>.

Example

; The string 'ABCDEFGH' is assigned to the variable "valstr".
toupper valstr 'abCDefGH'


basename

Returns trailing name component of path. (version 4.69 or later)

basename <strvar> <path>

Remarks

Given a <path> string containing the path to a file or directory, this macro will return the trailing name component into the <strvar> variable name.
The file or directory will need not be existed.

Example

basename fname 'c:\teraterm\test.txt'
; fname = "test.txt"

See also

  • dirname
  • makepath


dirname

Returns the directory name from a path name. (version 4.69 or later)

dirname <strvar> <path>

Remarks

Given a <path> pathname, this macro will delete any suffix beginning with the last slash('/') character and return the result into the <strvar> variable name.
The pathname will need not be existed.

Example

dirname dir 'c:\teraterm\test.txt'
; dir = "c:\teraterm"
dirname dir 'c:\teraterm\'
; dir = "c:"
dirname dir 'c:\teraterm'
; dir = "c:"

See also

  • dirname
  • makepath


fileclose

Closes a filehandle.

fileclose <file handle>

Remarks

Closes the file specified by <file handle>.
<file handle> is no longer valid after this command.

Example

fileclose fhandle
Refer to fileopen.


fileconcat

Appends a copy of file to other file.

fileconcat <file1> <file2>

Remarks

Appends a copy of file <file2> to the end of file <file1>.
<file1> and <file2> must not be same.
If <file2> is added successfully, the system variable "result" is set to 0. Otherwise, "result" is set to non-zero.

Example

fileconcat 'test.dat' test2.dat'


filecopy

Copies a file.

filecopy <file1> <file2>

Remarks

Copies file <file1> to file <file2>.
If <file2> already exists, it is overwritten. <file1> and <file2> must not be same.
If the file is copy successfully, the system variable "result" is set to 0. Otherwise, "result" is set to non-zero. (version 4.104 or later)

Value of the system variable "result"

As a result of this command, the system variable "result" is set to one of the following values depending on the copy status:

Value | Status
-4 | Copy failed.
-3 | A file <file1> and file <file2> is same of name.
-2 | Be used invalid characters to file <file2>.
-1 | Be used invalid characters to file <file1>.
0 | Copy succeeded.

Example

filecopy 'test.dat' 'test2.dat'


filecreate

Creates a file.

filecreate <file handle> <filename>

Remarks

Creates and opens a new file specified by <filename>.
The file pointer is set to the beginning of the file. If file <filename> already exists, its size is truncated to zero.
If the file is successfully created and opened, the file handle is returned in the integer variable <file handle>. Otherwise, <file handle> is set to -1.
If the file is created successfully, the system variable "result" is set to 0. Otherwise, "result" is set to non-zero.

Also, the file handle is opening after creation a file.

Example

filecreate fhandle 'data.dat'
fileclose fhandle


filedelete

Deletes a file.

filedelete <filename>

Remarks

Deletes the file specified by <filename>.
If the file is deleted successfully, the system variable "result" is set to 0. Otherwise, "result" is set to non-zero.

Example

filedelete 'temp.log'


filelock

Locks the specified file. (version 4.74 or later)

filelock <file handle> [<timeout>]

Remarks

Locks the specified whole file for exclusive access by the calling process.
The <timeout> argument is described below.

<timeout> | Description
0 | Returns quickly the error when the file is already locked.
Abbreviation | Returns only when the file is unlocked.
Value | Waits until the file is unlocked or the time-out interval(in seconds) elapses. Returns the error when the time-out interval elapsed.

If the function succeeds, the system variable "result" is set to 0.
If the function fails, the system variable "result" is set to 1.

Examples

fileopen fhandle 'test.txt' 0
filelock fhandle
if result!=0 then
    messagebox 'error' 'hoge'
endif
filewrite fhandle 'sample'
pause 60
fileunlock fhandle
if result!=0 then
    messagebox 'error' 'hoge'
endif
fileclose fhandle

See also

  • fileunlock


filemarkptr

Marks a file pointer.

filemarkptr <file handle>

Remarks

Marks the current file pointer for an opened file specified by <file handle>.
The marked pointer can be recalled by the "fileseekback" command.

Example

filemarkptr fhandle

See also the example of "filestrseek2" command.


fileopen

Opens a file.

fileopen <file handle> <filename> <append flag> [<readonly flag>]

Parameters

integer variable <file handle>
If the file is successfully opened, the file handle is returned in this variable.
version 4.101 or earlier, and 4.104 or later: Otherwise, <file handle> is set to -1. The macro error does not cause.
version 4.102 and 4.103: Otherwise, <file handle> is set to -1. The macro script is halted after the macro eror causes.
string <filename>
Specify an opened file name
If the file does not exist, it is created and then opened.
integer <append flag>
If this parameter is zero, the file pointer is set to the beginning of the file.
If this parameter is nonzero, the file pointer is set to the end of the file.
integer <readonly flag> (optional default=0) (version 4.85 or later)
If this parameter is zero, it requests opening the file read/write.
If this parameter is nonzero, it requests opening the file read-only.

Remarks

The file is opened in the binary mode.

Example

fileopen fhandle 'data.dat' 0
fileopen fhandle 'data.dat' 1

fileopen fhandle 'test.bat' 0
filewrite fhandle 'md .\v20080619_Test'
fileclose fhandle
pause 5
exec 'cmd /c test.bat'
pause 10
end

See also

  • filewrite
  • fileclose


filereadln

Reads a line from file.

filereadln <file handle> <strvar>

Remarks

Reads a line from the file specified by <file handle>.
The line is written into the string variable <strvar>.
The file pointer is moved to the beginning of the next line.
If the file pointer reaches the end of the file while reading the line, the system variable "result" is set to 1. Otherwise, "result" is set to zero.
When a line only includes a new line, the string variable is empty and "result" is set to zero.

Example

; Open a file.
fileopen fhandle 'test.txt' 0

:loop
; Read a line from the file.
filereadln fhandle line
if result goto fclose
; Display the line.
messagebox line 'test.txt'
; Repeat until the end of the file.
goto loop

:fclose
; Close the file.
fileclose fhandle

; Open a file.
fileopen fhandle 'test.txt' 0
while 1
    ; Read a line from the file.
    filereadln fhandle line
    if result=1 then
          break
    endif
    ; Display the line.
    messagebox line 'test.txt'
    ; Repeat until the end of the file.
endwhile
; Close the file.
fileclose fhandle

; Search a keyword and replace in the file.
infile = 'testdata.txt'
outfile = 'testdata_output.txt'

oldkeyword = 'BBB'
newkeyword = 'zzz'

fileopen ifd infile 0
fileopen ofd outfile 0

while 1
    filereadln ifd line
    if result=1 then
        break
    endif
    strreplace line 1 oldkeyword newkeyword
    filewriteln ofd line
endwhile

fileclose ifd
fileclose ofd

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[testdata.txt]
AABBBCCCCDDDDD
###DDCCCBBBBAAAAA####
1234567890

[testdata_output.txt]
AAzzzCCCCDDDDD
###DDCCCzzzBAAAAA####
1234567890

See also

  • strreplace
  • fileopen
  • filewriteln
  • fileclose


fileread

Reads a file. (version 4.48 or later)

fileread <file handle> <read byte> <strvar>

Remarks

Reads specified byte data from the file specified by <file handle>.
The data are written into the string variable <strvar>. The file pointer is moved to reading bytes.
If the file pointer reaches the end of the file while reading the data, the system variable "result" is set to 1. Otherwise, "result" is set to zero.
The range of <read byte> argument must be from 1 to 511.

Example

filename = 'foo.txt'

fileopen fp filename 0

:loop
fileread fp 10 data
messagebox data filename
if result goto fclose
goto loop

:fclose
fileclose fp

; Send 32 bytes from a binary file.
filename = 'sample.bin'

fileopen fhandle filename 0
if fhandle == -1 goto the_end

call send_16_bytes      ; send first 16 bytes
fileseek fhandle 16 1   ; seek past next 16 without sending
call send_16_bytes      ; send next (last) 16 bytes
fileclose fhandle
goto the_end

;#########################################
:send_16_bytes
    for i 1 16
        fileread fhandle 1 str      ; read one byte at a time so we can detect zero.
        if result == 1 break
        str2code integer str        ; if zero then str will be empty and integer will be set to zero
        ;sprintf 'integer = 0x%02X' integer
        ;messagebox inputstr 'test'
        send integer
    next
return
;#########################################
:the_end

See also

  • fileopen
  • fileclose


filerename

Renames a file.

filerename <file1> <file2>

Remarks

Renames <file1> to <file2>.
<file1> and <file2> must not be same.
If the file is renamed successfully, the system variable "result" is set to 0. Otherwise, "result" is set to non-zero.

Example

filerename 'test.dat' test2.dat'


filesearch

Search a file or folder.

filesearch <filename>

Remarks

Searches for the file or folder specified by <filename>.
If it is found, the system variable "result" is set to 1. Otherwise, "result" is set to zero.

Example

filesearch 'readme.txt'
if result=0 messagebox 'File not found.' 'error'

See also

  • foldersearch


fileseek

Moves a file pointer.

fileseek <file handle> <offset> <origin>

Remarks

Moves the pointer for the file specified by <file handle>.
With this command, the file pointer is moved to followings:

<origin> | 0 | <offset> bytes from the beginning of the file.
<origin> | 1 | <offset> bytes from the current position.
<origin> | 2 | <offset> bytes from the end of the file.

Example

; Move to the beginning of file.
fileseek fhandle 0 0

; Move 10 bytes from the current position.
fileseek fhandle 10 1

; Move to the end of file.
fileseek fhandle 0 2

; Move to the position 10 bytes backward from the end of file.
fileseek fhandle 0-10 2


fileseekback

Moves a file pointer to the position that was marked by "filemarkptr" command.

fileseekback <file handle>

Remarks

Moves the file pointer for an opened file to the position marked by the "filemarkptr" command.
The file is specified by <file handle>.

Example

fileseekback fhandle

See also the example of "filestrseek2" command.


filestat

Gets status information on a file or folder. (version 4.66 or later)

filestat <filename> <size> [<mtime>] [<drive>]

Remarks

Obtains information about the file or directory specified by <filename>.
<size> is set to the size of the file in bytes.
<mtime> is set to the time of last modification of file or folder.
<drive> is set to the drive number of the disk containing the file or folder.

The system variable "result" value of -1 indicates an error.

Example

filestat 'test.exe' size time drive

if result = -1 then
    messagebox 'file open error' 'filestat'
else
    sprintf2 str 'File size=%d Time modified=%s Drive=%s' size time drive
    messagebox str 'filestat'
endif

filestat 'Macro' size time drive

if result = -1 then
    messagebox 'Directory open error' 'filestat'
else
    sprintf2 str 'Directory size=%d Time modified=%s Drive=%s' size time drive
    messagebox str 'filestat'
    ; ex. Directory size=0 Time modified=2014-03-04 22:44:47 Drive=C
endif

See also

  • foldersearch
  • getfileattr


filestrseek

Forward searchs a string from a file.

filestrseek <file handle> <string>

Remarks

Searches for <string> in the file specified by <file handle>.
The search is done forward and started from the current position of the file pointer. For the backward search, use the "filestrseek2" command.
If <string> is found, the file pointer is moved to the next character of the string and the system variable "result" is set to 1.
If <string> is not found, the file pointer is not moved and "result" is set to zero.

Example

fileopen fhandle 'teraterm.log' 0

; Search for the string "abc" in the file "teraterm.log".
filestrseek fhandle 'abc'
if result=0 goto not_found
; Read characters from the next of "abc" to the end of the line.
filereadln fhandle str

:not_found
fileclose fhandle


filestrseek2

Backward searches a string from a file.

filestrseek2 <file handle> <string>

Remarks

Searches for <string> in the file specified by <file handle>.
The search is done backward and started from the current position of the file pointer. For the forward search, use the "filestrseek" command.
If <string> is found, the file pointer is moved to the position of the character just before the string and the system variable "result" is set to 1. However, if the string locates at one byte of the file, the file pointer is zero offset.
If <string> is not found, the file pointer is not moved and "result" is set to zero.
If the file pointer is already zero before the execution of this command, "result" is set to zero.

Example

; Open the file "teraterm.log". The file pointer is set to the end of file.
fileopen fhandle 'teraterm.log' 1

:next
; Backward search for the string "abc"
filestrseek2 fhandle 'abc'
if result=0 goto not_found
; mark the file pointer
filemarkptr fhandle
; Read characters from the character just before "abc" to the end of the line.
filereadln fhandle str
; recall the file pointer
fileseekback fhanlde
; search for the next word
goto next

:not_found
fileclose fhandle


filetruncate

Changes the size of a file. (version 4.67 or later)

filetruncate <filename> <size>

Remarks

Changes the <size> bytes of a <filename> file.
Null characters('\0') are appended if the file is extended.

The system variable "result" value is set to 0 if the file size is successfully changed. The system variable "result" value of -1 indicates an error.

Example

; Changes 32 bytes of a file.
filetruncate 'test.exe' 32
if result = -1 then
    messagebox 'file truncate error' 'filetruncate'
else
    messagebox 'file truncate success' 'filetruncate'
endif

; Makes 8M bytes of a file containing all zero data.
size = 8*1024*1024
filetruncate 'bigfile.bin' size

; Opens a log file at the macro file directory.
getdir dir
sprintf2 filename '%s\test.log' dir
logopen filename 0 0
; Limitation of a file size
maxsize = 512
counter = 0

:loop
counter = counter + 1
sprintf2 line 'counter = %d' counter
logwrite line
logwrite #13#10
filetruncate filename maxsize
if result = -1 then
    messagebox 'file truncate error' 'filetruncate'
    goto skip
endif
if counter > 32 goto skip
goto loop

:skip
logclose


fileunlock

Unlocks the specified file. (version 4.74 or later)

fileunlock <file handle>

Remarks

Unlocks the specified whole file. Unlocking a file enables other processes to access the file.

If the function succeeds, the system variable "result" is set to 0.
If the function fails, the system variable "result" is set to 1.

Examples

fileopen fhandle 'test.txt' 0
filelock fhandle
if result!=0 then
    messagebox 'error' 'hoge'
endif
filewrite fhandle 'sample'
pause 60
fileunlock fhandle
if result!=0 then
    messagebox 'error' 'hoge'
endif
fileclose fhandle

See also

  • filelock


filewrite

Writes a data to the file.

filewrite <file handle> <data>

Remarks

Writes <data> to the file specified by <file handle>.

When the <data> type is the character string, the data is written as string.
When the <data> type is the integer, the least significant byte(0-255) regards as the ASCII code and the ASCII character is written.

Example

filewrite fhandle '---------cut here---------'#13#10

; write a NUL character (0x00).
filewrite fhandle 0


filewriteln

Writes a data with new-line to a file.

filewriteln <file handle> <data>

Remarks

Writes <data> and the new-line characters (CR+LF) to the file specified by <file handle>.

When the <data> type is the character string, the data is written as string.
When the <data> type is the integer, the least significant byte(0-255) regards as the ASCII code and the ASCII character is written.

Example

filewriteln fhandle '---------cut here---------'

; write a NUL character (0x00) and the new-line character (CR+LF).
filewrite fhandle 0


findfirst, findnext, findclose

findfirst

Searches for the first file matching a string.

findfirst <dir handle> <file name> <strvar>

Remarks

The findfirst command searches for the first file matching the specified file name <file name>.
If the file is found, this command returns the directory handle in <dir handle>, returns the first file name in <strvar> and sets the system variable "result" to 1.
Otherwise, <dir handle>, <strvar> and "result" are set to -1, "" and 0, respectively.
If the findfirst command find the first file successfully, the directory handle can be used for the findnext command to search for the next file matching the specified <file name>.
The directory handle should be released by the findclose command.

findnext

Searches for the next file matching a string.

findnext <dir handle> <strvar>

Remarks

The findnext command searches for the next file matching the file name specified in the findfirst command.
The integer value <dir handle> should be the directory handle returned by the findfirst command.
If the next file is found, the file name is returned in <strvar> and "result" is set to 1.
Otherwise, <strvar> and "result" are set to "" and 0, respectively.

findclose

Releases a directory handle.

findclose <dir handle>

Remarks

The findclose command releases the directory handle <dir handle> returned by the findfirst command.
As soon as the file operation ends, this command should be executed.

Example

extpat='*.txt'
findfirst dh extpat filename

while result
    messagebox filename extpat
    findnext dh filename
endwhile

findclose dh


foldercreate

Creates a folder. (version 4.69 or later)

foldercreate <foldername>

Remarks

Creates a new folder specified by <foldername>.
If the folder is created successfully, the system variable "result" is set to 0. Otherwise, "result" is set to non-zero.

Example

foldercreate 'data'


folderdelete

Deletes a folder. (version 4.69 or later)

folderdelete <foldername>

Remarks

Deletes the folder specified by <foldername>.
If the folder is deleted successfully, the system variable "result" is set to 0. Otherwise, "result" is set to non-zero.
However, the folder can not be removed if files within the folder exist.

Example

folderdelete 'temp'


foldersearch

Search a folder. (version 4.69 or later)

foldersearch <foldername>

Remarks

Searches for the folder specified by <foldername>.
If it is found, the system variable "result" is set to 1. Otherwise, "result" is set to zero.

Note

The foldersearch command returns 1 when the <foldername> is a folder, and returns 0 when the <foldername> is a file. For this reason, this command can not be used as checking the existing folder.

Example

foldersearch 'data'
if result=0 messagebox 'Folder not found.' 'error'

name = 'data'
filesearch name
if result=1 then
    foldersearch name
    if result=1 then
        sprintf2 msg '%s is a folder.' name
        messagebox msg ''
    else
        sprintf2 msg '%s is a file.' name
        messagebox msg ''
    endif
else
    sprintf2 msg '%s is not found.' name
    messagebox msg ''
endif

See also

  • filesearch


getdir

Gets the current working directory for MACRO.

getdir <strvar>

Remarks

Returns the current working directory for MACRO (not for Tera Term) to the string variable <strvar>.
If the directory is the root, the string ends with a backslash(\). If the directory is a directory other than the root, the string ends with the directory name and not with a backslash.

Example

getdir dir
; dir = C:\Documents and Settings\yutaka\My Documents\TeraTermMacro

See also

  • setdir


getfileattr

Returns the attributes of a file or directory. (version 4.69 or later)

getfileattr <filename>

Parameters

string <filename>
The file name or directory name

Return Value

System variable <result>
When this command fails, -1 is stored.
When the command succeeds, the returned value is in the following:
Value | Meaning
$1 | Read only
$2 | Hidden
$4 | The operating system uses a part of, or uses exclusively
$10 | Directory
$20 | Archive
$80 | Not have other attributes set
$100 | Temporary
$200 | Sparse file
$400 | Has an associated reparse point, or a file that is a symbolic link
$800 | Compressed
$1000 | Physically moved to offline storage(Windows 2000 or later)
$2000 | Not to be indexed by the content indexing service(Windows 2000 or later)
$4000 | Encrypted

Example

file = 'c:\test.txt'
getfileattr file
if result <> -1 then
    if result & $1 > 0 then
        messagebox 'This file has readonly attribute.' file
    endif
endif

name = "C:\test"

getfileattr name

if result < 0 then
    messagebox "Not found" name
elseif result & $10 then
    messagebox "Directory" name
else
    messagebox "File" name
endif

See also

  • setfileattr
  • MSDN Library GetFileAttributes
  • MSDN Library File Attribute Constants


makepath

Creates a full path name.

makepath <strvar> <dir> <name>

Remarks

Creates the full path name from the directory name <dir> and file name <name>. The full path name is stored in the string variable <strvar>.
If necessary, '\' is inserted between <dir> and <name>.

Example

makepath path 'c:\teraterm' 'test.txt'
; path = "c:\teraterm\test.txt"

See also

  • basename
  • dirname


setdir

Changes the current working directory for MACRO.

setdir <dir>

Remarks

Changes the current working directory for MACRO to <dir>.

Note: the changedir command changes the current directory for Tera Term.
File names specified for the communication commands (e.g. kmtsend) are based on the current directory for Tera Term.
File names specified for other commands (e.g. fileopen) are based on the current directory for MACRO.

Example

setdir 'c:\'


setfileattr

Sets attributes of a file or directory. (version 4.69 or later)

setfileattr <filename> <attributes>

Parameters

string <filename>
The file name or directory name
integer <attributes>
A user can specify a attribute value combined in the following:
Value | Meaning
$1 | Read only
$2 | Hidden
$4 | The operating system uses a part of, or uses exclusively
$20 | Archive
$80 Not have other attributes set
Enabled when the value is independently specified.
$100 | Temporary
$1000 | Physically moved to offline storage(Windows 2000 or later)
$2000 | Not to be indexed by the content indexing service(Windows 2000 or later)

Return Value

System variable <result>
When the command fails, 0 is stored.
When the command succeeds, 1 is stored.

Example

; add readonly attribute
file = 'c:\test.txt'
getfileattr file
attr = result | $1 ; keep current attributes
setfileattr file attr

See also

  • getfileattr
  • MSDN Library SetFileAttributes
  • MSDN Library File Attribute Constants


delpassword

Deletes a password.

delpassword <filename> <password name>

Remarks

Deletes a password specified by <password name> in the password file <filename>.
If <password name> is a blank string, all passwords in the file are deleted.

Example

delpassword 'password.dat' 'mypassword'

See also

  • getpassword


getpassword

Reads a password.

Format

getpassword <filename> <password name> <strvar>

Remarks

Retrieves an encrypted password identified by <password name> from the password file <filename>.
Decrypts the password and stores it into the string variable <strvar>.

If the specified file does not exist, it is newly created.
If the specified password is not stored in the file, the password dialog box appears and the entered password is stored in <strvar>.
At the same time, the new password is encrypted and written in the file with the identifier <password name>.

A password file can contain multiple passwords.
Each of them is identified by the password identifier.

(version 4.71 or later)
When the password file can not be written, the system variable "result" is set to 0. Otherwise, "result" is set to 1.

Example

getpassword 'password.dat' 'mypassword' password
connect 'myhost'
wait 'login:'
sendln 'myname'
wait 'password:'
sendln password

expandenv str "%USERPROFILE%\myfile.dat"
getpassword str 'mypassword' password
if !result then
    messagebox 'Password was not saved' 'ERROR'
endif

See also

  • expandenv


ispassword

Determines if a password is stored. (version 4.75 or later)

Format

ispassword <filename> <password name>

Remarks

A password identified by <password name> from the password file <filename> is determined if the password is stored in the file.

When a password identified by <password name> exists in the password file, the system variable "result" is set to 1. Otherwise, "result" is set to 0.

Example

strdim pw 2
username = 'yutaka'

ispassword 'pw.dat' username ; result: 0=false; 1=true
if result = 1 then
  getpassword 'pw.dat' username pw[0]
  pw[1] = pw[0]
else
  msg = 'What is your password for '
  strconcat msg username
  strconcat msg '?'
  passwordbox msg 'Enter your password'
  pw[0] = inputstr
  pw[1] = pw[0]
  setpassword 'pw.dat' username pw[0]
endif

See also

  • getpassword
  • setpassword


passwordbox

Displays a dialog box prompting the user to input a password.

passwordbox <message> <title> [<special>]

Parameters

string <message>
It is displayed in the dialog box.
string <title>
It is displayed as the dialog box title.
integer <special> (optional default=0)
If it is non-zero, following strings in <message> is treated as spacial character.
input | output
\\ "\"
\n | line feed
\t | tab
This option is obsolete. You are recommended to use the strspecial command.

Return Value

System variable <inputstr>
The string entered by the user is returned.

Remarks

The password typed by the user is not displayed as is. Instead, asterisks are displayed.

Example

passwordbox 'Enter password' 'Login'

See also

  • inputbox
  • listbox
  • setdlgpos
  • strspecial
  • yesnobox


setpassword

Adds or Overwrites a password. (version 4.75 or later)

Format

setpassword <filename> <password name> <strvar>

Remarks

A password identified by <password name> from the password file <filename> is updated.
The string variable <strvar> 's password is encrypted and stored into the file.

If the specified file does not exist, it is newly created.

A password file can contain multiple passwords.
Each of them is identified by the password identifier.

When the password file can not be written, the system variable "result" is set to 0. Otherwise, "result" is set to 1.

Example

newpasswd = 'hoge'
setpassword 'password.dat' 'yutaka' newpasswd
if result then
  messagebox 'Password updated successfully.' 'Result'
endif

See also

  • getpassword
  • ispassword


beep

Makes a beep sound.

beep [<sound type>]

Remarks

Plays a waveform sound.
The <sound type> parameter can be one of the following values. The default value is the Windows Default Beep sound.

Value | Meaning
0 | A simple beep
1 | Windows Asterisk sound
2 | Windows Exclamation sound
3 | Windows Critical Stop sound
4 | Windows Question sound
5 | Windows Default Beep sound

Example

for i 1 10
    beep 0
    pause 1
next


bringupbox

Brings the status box to the top of the Z order. (version 4.78 or later)

bringupbox

Parameters

None.

Return Value

None.

Example

step = 0
while 1
  call show_step
  sendln 'echo do something'
  wait '$'
  pause 2

  bringupbox

endwhile
end

:show_step
step = step + 1
gettime timestr "%Y/%m/%d-%H:%M:%S"
sprintf2 s "counter %d" step
statusbox timestr s
return

See also

  • statusbox
  • closesbox
  • setdlgpos


checksum8, checksum8file

Calculates the 8bit-checksum of a string or a file. (version 4.78 or later)

checksum8 <intvar> <string>
checksum8file <intvar> <filename>

Remarks

This macro function calculates the checksum(8bit) of a string or a file.

The calculated value stores the variable "intvar" as mathematical value.
If the <filename> file can not open by using checksum8file, the system variable "result" is set to -1.

Example

str = 'this is a test string to be checksum8ed'
checksum8 crc str

; Display checksum8 result asHEX
sprintf '0x%08X' crc
messagebox inputstr 'checksum8 = '

checksum8file crc 'foo.bin'
if result = -1 then
    messagebox 'file open error' 'checksum8 = '
else
    sprintf '0x%08X' crc
    messagebox inputstr 'checksum8 = '
endif


checksum16, checksum16file

Calculates the 16bit-checksum of a string or a file. (version 4.78 or later)

checksum16 <intvar> <string>
checksum16file <intvar> <filename>

Remarks

This macro function calculates the checksum(16bit) of a string or a file.

The calculated value stores the variable "intvar" as mathematical value.
If the <filename> file can not open by using checksum16file, the system variable "result" is set to -1.

Example

str = 'this is a test string to be checksum16ed'
checksum16 crc str

; Display checksum16 result asHEX
sprintf '0x%08X' crc
messagebox inputstr 'checksum16 = '

checksum16file crc 'foo.bin'
if result = -1 then
    messagebox 'file open error' 'checksum16 = '
else
    sprintf '0x%08X' crc
    messagebox inputstr 'checksum16 = '
endif


checksum32, checksum32file

Calculates the 32bit-checksum of a string or a file. (version 4.78 or later)

checksum32 <intvar> <string>
checksum32file <intvar> <filename>

Remarks

This macro function calculates the checksum(32bit) of a string or a file.

The calculated value stores the variable "intvar" as mathematical value.
If the <filename> file can not open by using checksum32file, the system variable "result" is set to -1.

Example

str = 'this is a test string to be checksum32ed'
checksum32 crc str

; Display checksum32 result asHEX
sprintf '0x%08X' crc
messagebox inputstr 'checksum32 = '

checksum32file crc 'foo.bin'
if result = -1 then
    messagebox 'file open error' 'checksum32 = '
else
    sprintf '0x%08X' crc
    messagebox inputstr 'checksum32 = '
endif


closesbox

Closes the status dialog box opened by the "statusbox" command.

closesbox

Example

See "statusbox".


clipb2var

Copies the text data of clipboard. (version 4.46 or later)

clipb2var <strvar> [<offset>]

Remarks

Copies the text data in clipboard to <strvar>.
If clipboard content is too long, copied data was truncated. (cf. maximum length of a string)

If <offset> is specified, copied string starts offset*511-1 bytes.
When the <offset> is specified not 0, please run the clipb2var command with the offset is nothing or is 0.
When <offset> is not 0, the clipboard content is not current but the content after the <offset> is nothing or 0.

The "clipb2var" command returns one of the following values in the system variable "result":

Value | Meaning
0 | Could not open the clipboard. Or the clipboard content was not a text data. Or the offset value was invalid.
1 | Copying to <strvar> is successful.
2 | Copied string was truncated. If you want to read a truncated data, increment a offset value and execute a clipb2var command again.
3 | Could not allocate a memory to copy a clipboard content.

Example

clipb2var data
messagebox data 'clipboard data'

; Load the clipboard data over 511 byte
; +------------------------------------------------------------------+
; |  1024 bytes clipboard text                                       |
; +------------------------------------------------------------------+
; +-------------------------+--------------------------+-------------+
; | (1) 511 bytes           | (2) 511 bytes            | (3) 2 bytes |
; +-------------------------+--------------------------+-------------+

clipb2var data ; (1) stores into the data and the result is 2.
messagebox data 'clipboard data 1'

clipb2var data 1 ; (2) stores into the data and the result is 2.
messagebox data 'clipboard data 2'

clipb2var data 2 ; (3) stores into the data and the result is 1.
messagebox data 'clipboard data 3'

clipb2var data 3 ; the data is empty and the result is 0.
messagebox data 'clipboard data 4'

; read a clipboard content and write it to a file.
fileopen fp 'clipboard.txt' 0
if result <> 0 end

offset = 0
do
    clipb2var buff offset
    if result > 0 filewrite fp buff
    offset = offset + 1
loop while result = 2

fileclose fp


crc16, crc16file

Calculates the CRC-16-CCITT of a string or a file. (version 4.78 or later)

crc16 <intvar> <string>
crc16file <intvar> <filename>

Remarks

This macro function calculates the CRC(Cyclic Redundancy Checking) of a string or a file. The polynomial expression(right rotation) is as follows:

10001000000100001 (x16+x12+x5+x0)

The calculated value stores the variable "intvar" as mathematical value.
If the <filename> file can not open by using crc16file, the system variable "result" is set to -1.

The CRC algorithm implementation by C language is as follows:

static unsigned int crc16(int n, unsigned char c[])
{
#define CRC16POLY1  0x1021U
#define CRC16POLY2  0x8408U  /* left-right reversal */
    int i, j;
    unsigned long r;

    r = 0xFFFFU;
    for (i = 0; i < n; i++) {
        r ^= c[i];
        for (j = 0; j < CHAR_BIT; j++)
            if (r & 1) r = (r >> 1) ^ CRC16POLY2;
            else       r >>= 1;
    }
    return r ^ 0xFFFFU;
}

Example

str = 'this is a test string to be CRC16ed'
crc16 crc str

; Display CRC16 result asHEX
sprintf '0x%08X' crc
messagebox inputstr 'CRC16 = '

crc16file crc 'foo.bin'
if result = -1 then
    messagebox 'file open error' 'CRC16 = '
else
    sprintf '0x%08X' crc
    messagebox inputstr 'CRC16 = '
endif


crc32, crc32file

Calculates the CRC-32 of a string or a file. (version 4.60 or later)

crc32 <intvar> <string>
crc32file <intvar> <filename>

Remarks

This macro function calculates the CRC(Cyclic Redundancy Checking) of a string or a file. The polynomial expression(right rotation) is as follows:

100000100110000010001110110110111 (x32+x26+x23+x22+x16+x12+x11+x10+x8+x7+x5+x4+x2+x1+x0)

The calculated value stores the variable "intvar" as mathematical value.
If the <filename> file can not open by using crc32file, the system variable "result" is set to -1.

The CRC algorithm implementation by C language is as follows: This algorithm is often used as the Ethernet FCS(Frame Check Sequence).

static unsigned long crc32(int n, unsigned char c[])
{
#define CRC32POLY1 0x04C11DB7UL
#define CRC32POLY2 0xEDB88320UL  /* left-right reversal */
    int i, j;
    unsigned long r;

    r = 0xFFFFFFFFUL;
    for (i = 0; i < n; i++) {
        r ^= c[i];
        for (j = 0; j < CHAR_BIT; j++)
            if (r & 1) r = (r >> 1) ^ CRC32POLY2;
            else       r >>= 1;
    }
    return r ^ 0xFFFFFFFFUL;
}

Example

str = 'this is a test string to be CRC32ed'
crc32 crc str

; Display CRC32 result asHEX
sprintf '0x%08X' crc
messagebox inputstr 'CRC32 = '

crc32file crc 'foo.bin'
if result = -1 then
    messagebox 'file open error' 'CRC32 = '
else
    sprintf '0x%08X' crc
    messagebox inputstr 'CRC32 = '
endif


exec

Runs an application.

exec <command line> [<show> [<wait> [<current directory>]]]

Remarks

Runs an application specified by <command line>.

Parameters

string <show> (optional default="show")
The following are display style:
  • hide
  • minimize
  • maximize
  • show
integer <wait> (optional default=0) (version 4.63 or later)
If it is 1, macro waits to finish the launched application. The exit code of the application stores the `result' system variable.
If it is not 1, macro launches the application and control is returned to macro.
string <current directory> (optional default="") (version 4.78 or later)
A current directory can be specified.

Return Value

System variable <result>
version 4.63 to 4.102
If integer value <wait> is 1, the exit code of the application is stored.
version 4.103 or later
If integer value <wait> is 1
Value | Meaning
-1 | Failed to execute the application.
not -1 | The exit code of the application

If integer value <wait> is not 1
Value | Meaning
-1 | Failed to execute the application.
0 | Succeeded to execute the application.

Example

; Run "Notepad".
exec 'notepad readme.txt'

; Run "Notepad" and maximize the application.
exec 'notepad readme.txt' 'maximize'

; Run "Notepad" with the current directory.
exec 'notepad readme.txt' 'show' 0 'c:\usr'

; Launch a batch file.
tmp='cmd /c c:\upload.bat '
strconcat tmp username1
strconcat tmp ' '
strconcat tmp userpass1
strconcat tmp ' '
strconcat tmp address
messagebox tmp 'exec'
exec tmp

; Make a directory.
getenv "USERPROFILE" userprof
getdate logdir "log-%Y%m%d"
sprintf2 cmd 'cmd /c mkdir "%s\My Documents\%s"' userprof logdir
exec cmd "HIDE"

Note

When the macro script is executed on the 64bit Windows, an WOW64's application will not work well.

The 32bit application can launch because the ttpmacro.exe is the 32bit program. An application will launch the 64bit program again when the 32bit program is executed on the 64bit operating system.
If the <wait> is specified, the exec macro will continue to next step because the 32bit program launched by the macro script terminates soon.

Please use the sysnative alias and launches the native application in the system directory to resolve this problem.

; fail
exec 'mstsc /v 192.0.2.0 /w 1024 /h 768 /admin' 'show' 1

; succeed
exec 'C:\windows\sysnative\mstsc /v 192.0.2.0 /w 1024 /h 768 /admin' 'show' 1


dirnamebox

Open a dialog can be selected a directory. (version 4.86 or later)

dirnamebox <title> [<initialdir>]

Parameters

string <title>
The title of dialog box
string <initialdir> (optional default="")
Initial directory of dialog box.
When an empty string and an invalid path is specified, the initial directory is the user desktop.

Return Value

System variable <result>
If the user specifies a directory name and clicks OK button, set to 1. The directory name is stored in "inputstr."
If the user cancels or closes the dialog, set to zero.
System variable <inputstr>
The directory name entered by the user

Example

dirnamebox 'select a directory'
if result<>0 then
    messagebox inputstr 'selected directory'
endif


filenamebox

Open a dialog can be selected a file. (version 4.54 or later)

filenamebox <title> [<dialogtype> [<initialdir>]]

Parameters

string <title>
The title of dialog box
integer <dialogtype> (optional default=zero) (version 4.65 or later)
Specifies the type of dialog box.
If this parameter is zero, creates [Open] dialog box.
If this parameter is nonzero, creates [Save] dialog box.
string <initialdir> (optional default="") (version 4.85 or later)
The initial directory of the dialog box can be specified.
When the empty string and the invalid path are specified, the initial directory will be automatically selected by using the Windows specification(lpstrInitialDir member of OPENFILENAME structure).

Return Value

System variable <result> (version 4.65 or later)
If the user specifies a file name and clicks OK button, set to nonzero. The file name is stored in "inputstr."
If the user cancels or closes the dialog, set to zero.
System variable <inputstr>
The file name entered by the user

Example

connect '/C=11'
filenamebox 'File selection' 0
if result<>0 then
    messagebox inputstr 'title' 0
    sendfile inputstr 1
endif


getdate

Gets current date.

getdate <strvar> [<format> [<timezone>]]

Remarks

Returns the current date in the string variable <strvar>, with the default format "YYYY-MM-DD". The user can specify the format same as strftime. And also, the default format equals "%Y-%m-%d" at the <format> argument.

The behavior of the getdate command specified with the format equals the gettime command specified with the same format.
When the <timezone> argument is specified as a timezone string, the timestamp is generated by using the timezone. When the <timezone> argument is not specified, the timestamp is treated as the localtime.

This command returns one of the following values in the system variable "result":

Value | Meaning
0 | Normal success. <strvar> is stored.
1 | Error. <strvar> is not stored because a length of the generated string exceeds the upper limit -511 characters-.
2 | Error. <format> is invalid.

Example

;Stores the current date to "datestr" variable with YYYY-MM-DD format.
getdate datestr

;Stores the current date with the user format to "logfile" variable.
;The format is log-YYYYMMDD-HHMMSS.txt.
getdate logfile "log-%Y%m%d-%H%M%S.txt"

;To generate a GMT/UTC time stamp
tz="GMT"
gettime s "%Y/%m/%d %H:%M:%S" tz
messagebox s tz

;To retrieve Today's date.
gettime s "|%d|%#d|"    ; |07|7| (Today is 7th).
gettime s "|%d|%#d|"    ; |25|25| (Today is 25th).

See also

  • gettime
  • strftime (MSDN Library)


getenv

Gets an environment variable.

Format

getenv <envname> <strvar>

Remarks

Retrieves the value of an environment variable specified by <envname> and stores it in the string variable <strvar>.

Example

getenv 'TEMP' env


getipv4addr

Retrieves local IPv4 address(es). (version 4.78 or later)

getipv4addr <string array> <intvar>

Parameters

String array <string array>
IP addresses are stored in the string array.
Integer variable <intvar>
IP address counts. If the IP address is none, it is set to 0.

Return Value

System variable <result>
When the IP addresses are retrieved, it is set to 1.
When the IP address counts is bigger than the <string array> entries, it is set to 0.
When the IP address can not retrieve, it is set to -1.

Example

ipaddr_size = 10
strdim ipaddr ipaddr_size

getipv4addr ipaddr num
if result = -1 then
    messagebox 'Error' 'IPv4 address'
elseif result = 0 then
    N = ipaddr_size - 1
    for i 0 N
        messagebox ipaddr[i] "IPv4 address"
    next
    N = num - ipaddr_size
    sprintf2 str "And %d address(es)." N
    messagebox str "IPv4 address"
else
    N = num - 1
    for i 0 N
        messagebox ipaddr[i] "IPv4 address"
    next
endif

See also

  • getipv6addr


getipv6addr

Retrieves local IPv6 address(es). (version 4.78 or later)

getipv6addr <string array> <intvar>

Parameters

Array <string array>
IP addresses are stored in the string array.
Integer variable <intvar>
IP address counts. If the IP address is none, it is set to 0.

Return Value

System variable <result>
When the IP addresses are retrieved, it is set to 1.
When the IP address counts is bigger than the <string array> entries, it is set to 0.
When the IP address can not retrieve, it is set to -1. It is always failed on Windows 2000 or earlier.

Example

ipaddr_size = 10
strdim ipaddr ipaddr_size

getipv6addr ipaddr num
if result = -1 then
    messagebox 'Error' 'IPv6 address'
elseif result = 0 then
    N = ipaddr_size - 1
    for i 0 N
        messagebox ipaddr[i] "IPv6 address"
    next
    N = num - ipaddr_size
    sprintf2 str "And %d address(es)." N
    messagebox str "IPv6 address"
else
    N = num - 1
    for i 0 N
        messagebox ipaddr[i] "IPv6 address"
    next
endif

See also

  • getipv4addr


getspecialfolder

Retrieves the path of a special folder. (version 4.72 or later)

Format

getspecialfolder <strvar> <foldertype>

Remarks

Stores a Windows special folder to the <strvar> string variable.

Parameters

string variable <strvar>
Returns into the got string.
string <foldertype>
The drive and path of the specified folder by the string <foldertype> stores into the <strvar> string variable.
AllUsersDesktop | directory that contains files and folders that appear on the desktop for all users
AllUsersStartMenu | directory that contains the programs and folders that appear on the Start menu for all users
AllUsersPrograms | directory that contains the directories for the common program groups that appear on the Start menu for all users
AllUsersStartup | directory that contains the programs that appear in the Startup folder for all users
Desktop | virtual folder that represents the Windows desktop
Favorites | directory that serves as a common repository for the user's favorite items
Fonts | virtual folder that contains fonts
MyDocuments | virtual folder that represents the My Documents desktop item
NetHood | directory that contains the link objects that may exist in the My Network Places virtual folder
PrintHood | directory that contains the link objects that can exist in the Printers virtual folder
Programs | directory that contains the user's program groups
Recent | directory that contains shortcuts to the user's most recently used documents
SendTo | directory that contains Send To menu items
StartMenu | directory that contains Start menu items
Startup | directory that corresponds to the user's Startup program group
Templates | directory that serves as a common repository for document templates
cf. CSIDL(MSDN library)

Return Value

System variable <result>
When the command fails, 0 is stored.
When the command succeeds, 1 is stored.

Example

getspecialfolder str "Desktop"
if result then
    messagebox str "Desktop"   ; C:\Documents and Settings\user\desktop
endif


gettime

Gets current time.

gettime <strvar> [<format> [<timezone>]]

Remarks

Returns the current time in the string variable <strvar>, with the default format "HH:MM:SS". The user can specify the format same as strftime. And also, the default format equals "%H:%M:%S" at the <format> argument.

The behavior of the gettime command specified with the format equals the getdate command specified with the same format.
When the <timezone> argument is specified as a timezone string, the timestamp is generated by using the timezone. When the <timezone> argument is not specified, the timestamp is treated as the localtime.

This command returns one of the following values in the system variable "result":

Value | Meaning
0 | Normal success. <strvar> is stored.
1 | Error. <strvar> is not stored because a length of the generated string exceeds the upper limit -511 characters-.
2 | Error. <format> is invalid.

Example

;Stores the current time to "timestr" variable with HH:MM:SS format.
gettime timestr

;Stores the current date with the user format to "logfile" variable.
;The format is log-YYYYMMDD-HHMMSS.txt.
gettime logfile "log-%Y%m%d-%H%M%S.txt"
changedir 'C:\Test'
logopen logfile 0 0
logwrite 'test data'
logclose

;To generate a GMT/UTC time stamp
tz="GMT"
gettime s "%Y/%m/%d %H:%M:%S" tz
messagebox s tz

See also

  • getdate
  • strftime (MSDN Library)


getttdir

Gets the current working directory for ttpmacro.exe. (version 4.60 or later)

getttdir <strvar>

Remarks

The ttpmacro.exe directory is stored in the <strvar> string variable.
If the directory is gotten successfully, the system variable "result" is set to 0. Otherwise, "result" is set to zero.

Example

getttdir dir
messagebox dir 'getttdir' 0
; dir is "C:\Program Files\teraterm"


getver

Get the version of Tera Term. (version 4.58 or later)

getver <strvar> [<version>]

Remarks

Returns the version of Tera Term in the string variable <strvar>.

If <version> is specified, <version> is compared with the version of running Tera Term and the result is stored in the system variable "result". If <version> is not specified, the system variable "result" is not changed. The meaning of "result" is as follows.

Value | Meaning
-2 | Error. <version> is invalid.
-1 | Tera Term version is older than <version>.
0 | Tera Term version is equal to <version>.
1 | Tera Term version is newer than <version>.

Example

getver version

getver version '4.56'
if result >= 0 then
  callmenu 50280
  callmenu 50210
  callmenu 50270
endif


ifdefined

Checks the type. (version 4.46 or later)

ifdefined <var>

Remarks

Sets the type of <var>. One of the following values in the system variable "result":

Value | Meaning
0 | undefined
1 | integer
3 | string
4 | label
5 | integer array
6 | string array

Example

ifdefined data
int2str valstr result
messagebox valstr 'variable type'


inputbox

Displays a dialog box prompting user to input a string.

inputbox <message> <title> [<default> [<special>]]

Parameters

string <message>
It is displayed in the dialog box.
string <title>
It is displayed as the dialog box title.
string <default> (optional default=''(empty))
The default string on edit control.
integer <special> (optional default=0)
If it is non-zero, following strings in <message> is treated as spacial character.
<special> does not effect to <default>.
input | output
\\ "\"
\n | line feed
\t | tab
This option is obsolete. You are recommended to use the strspecial command.

Return Value

System variable <inputstr>
The string entered by the user is returned.

Example

inputbox 'Password:' 'Login'
sendln inputstr

See also

  • passwordbox
  • listbox
  • setdlgpos
  • strspecial
  • yesnobox


intdim

Declare integer array variable. (version 4.72 or later)

intdim <array> <size>

Remarks

Defines the array of integer type having the <size> entry. The <size> range is from 1 to 65536 and the array index is 0-origin.
The default value of the array is 0.

Example

; Fibonacci sequence
intdim fibonacci 20
fibonacci[0] = 0
fibonacci[1] = 1
for i 2 19
        fibonacci[i] = fibonacci[i-2] + fibonacci[i-1]
next

msg = ""
for i 0 19
        sprintf2 msg "%s%d, " msg fibonacci[i]
next

messagebox msg "result"

; binary search tree
N = 10
intdim a N
a[0] = 1
a[1] = 2
a[2] = 3
a[3] = 7
a[4] = 11
a[5] = 32
a[6] = 40
a[7] = 68
a[8] = 81
a[9] = 99

inputbox 'Search data?' 'User Input'
str2int key inputstr

flag = 0
low = 0
high = N - 1
while low <= high
    mid = (low + high) / 2
    if a[mid] == key then
        sprintf "Your data %d found in index %d." key mid
        messagebox inputstr 'Success'
        flag = 1
        break
    endif
    if a[mid] < key then
        low = mid + 1
    else
        high = mid - 1
    endif
endwhile

if flag == 0 then
    messagebox 'Your data not found.' 'Failure'
endif
end

; sieve of Eratosthenes
;
; Example of execution result
; 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 [17 primes]
;

N = 30
intdim flag N+1
count = 0
for i 0 N
    flag[i] = 1
next

for i 0 N
    if flag[i] =1 then
        count = count + 1
        p = 2 * i + 3
        sprintf "%d " p
        dispstr inputstr

        k = i + p
        while k <= N
            flag[k] = 0
            k = k + p
        endwhile
    endif
next

sprintf "[%d primes]" count
dispstr inputstr

end

See also

  • Types


listbox

Displays a list box, and ask an item to user. (version 4.78 or later)

listbox <message> <title> <string array> [<selected>]

Parameters

string <message>
It is displayed in the list box.
string <title>
It is displayed as the list box title.
array <string array>
It is displayed as the list box items.
integer <selected> (version 4.89 or later)
It is selected first item by specifying the zero-based index of the array. This argument is optional.

Return Value

System variable <result>
If the user selects one of items, it is set to from 0 to N-1.
If the user cancels, it is set to -1.

Remarks

The listbox macro command shows all selected items of the <string array> array.
If the <string array> is defined as bigger entries than selected numbers as follows, the empty string will be shown at last.

strdim msg 4
msg[0] = 'Banana'
msg[1] = 'Apple'
msg[2] = 'Orange'
listbox 'Select your favorite food.' 'Confirmation' msg

; displays 4 items
Banana
Apple
Orange
[Empty string]

(version 4.89 or later)
When the <selected> parameter is specified, an item of the list box can be selected at first.
If the parameter is omitted, the default value is 0.

Example

strdim msg 3
msg[0] = 'Banana'
msg[1] = 'Apple'
msg[2] = 'Orange'
listbox 'Select your favorite food.' 'Confirmation' msg
sprintf2 var "%d" result
messagebox var "result"
; result
;   -1: Cancel
;    0: Banana
;    1: Apple
;    2: Orange

strdim msg 7
msg[0] = 'Sunny'
msg[1] = 'Cloudy'
msg[2] = 'Rainy'
msg[3] = 'Windy'
msg[4] = 'Snowy'
msg[5] = 'Foggy'
msg[6] = 'Unknown'
; The seventh entry is selected by default.
listbox "How's today's weather?" 'Confirmation' msg 6
sprintf2 var "%d" result
messagebox var "result"

See also

  • inputbox
  • passwordbox
  • setdlgpos
  • yesnobox


messagebox

Displays a dialog box with message.

messagebox <message> <title> [<special>]

Parameters

string <message>
It is displayed in the dialog box.
string <title>
It is displayed as the dialog box title.
integer <special> (optional default=0)
If it is non-zero, following strings in <message> is treated as spacial character.
input | output
\\ "\"
\n | line feed
\t | tab
This option is obsolete. You are recommended to use the strspecial command.

Example

messagebox ErrorMessage 'Error'

title="Five lines display"
message="First line\nSecond line\nThird line\nFourth line\nFifth line\n"
strspecial message
messagebox message title

variable = 99
sprintf2 msg "%d" variable
messagebox msg "variable ="

See also

  • setdlgpos
  • statusbox
  • strspecial


random

Generates random number. (version 4.27 or later)

random <integer variable> <max number>

Remarks

Generates random integer within the range 0..<max number> and assigns it to <integer variable>. The <max number> has to be greater than 0.

Example

; Variable val will contain integer within the range 0..100.
random val 100

; random selection
while 1
    random val 10
    int2str valstr val
    statusbox valstr 'val'
    if val=0 then
        messagebox 'The val is zero.' 'test'
    elseif val<5 then
        messagebox 'The val is less than five.' 'test'
    else
        messagebox 'The val is greater than five.' 'test'
    endif
endwhile


rotateleft

Rotates (circular shifts) to left. (version 4.54 or later)

rotateleft <intvar> <intval> <count>

Remarks

Rotates (circular shifts) <intval> <count> digits to left, and returns it in the integer variable <intvar>.

Example

rotateleft b $80000000 4
sprintf '0x%08x' b
messagebox inputstr '0x00000008'


rotateright

Rotates (circular shifts) to right. (version 4.54 or later)

rotateright <intvar> <intval> <count>

Remarks

Rotates (circular shifts) <intval> <count> digits to right, and returns it in the integer variable <intvar>.

Example

rotateright b $00000008 4
sprintf '0x%08x' b
messagebox inputstr '0x80000000'


setdate

Changes the system date.

setdate <date>

Remarks

Sets the system date to <date>. The format of <date> should be "YYYY-MM-DD".

Example

setdate '1997-08-01'


setdlgpos

Sets the position of dialog box.

setdlgpos [<x> <y>]

Remarks

Changes the initial position for dialog boxes opened by the "inputbox", "listbox", "messagebox", "passwordbox", "statusbox", "yesnobox" commands and error dialogbox. If the status dialog box is displayed, the "setdlgpos" command also moves the dialog box.
Set dialog box position to default in main(primary) display when no argument is given. (version 4.105 or later)
<x> and <y> specify the position (x,y) in the screen coordinate.
The origin (0,0) is upper left corner of the screen(primary display).
Move into display, if dialog box position is outside display. (version 4.105 or later)

Example

; Message box at the upper left corner.
setdlgpos 0 0
messagebox 'Message' 'Title'

; Open the status box.
setdlgpos 0 200
statusbox 'Message' 'Title'

; Moves the status box.
for i 0 200
  setdlgpos i 200
next


setenv

Sets an environment variable. (version 4.54 or later)

Format

setenv <envname> <strval>

Remarks

Sets <strval> to an environment variable specified by <envname>.
It is effect to only the macro environment and not to system.
If already <envname> environment variable is set, <envname> is overwritten.

Example

setenv 'TEMP' 'C:\'


setexitcode

Sets the exit code of MACRO.

setexitcode <exit code>

Remarks

For Windows 98

If MACRO is run from a batch file by the command line "start /w ttpmacro <ttl filename>" (the option /w is necessary), the exit code can be tested by the DOS command "if errorlevel n".

For Windows NT4.0/2000/XP

If MACRO is run from a batch file by the command line "ttpmacro <ttl filename>", the exit code can be tested by the DOS command "if errorlevel n".

Example

----- Batch file "test.bat" (for Win 98/Me) ------
rem Run MACRO using the "start /w" command.
start /w ttpmacro test.ttl
rem Display message if the exit code is greater than 0.
if errorlevel 1 echo Error!
----- End of "test.bat" ---------

----- Batch file "test.bat" (for Win NT/2000/XP) ------
rem Run MACRO. No need to use the "start" command.
ttpmacro test.ttl
rem Display message if the exit code is greater than 0.
if errorlevel 1 echo Error!
----- End of "test.bat" ---------

----- Macro file "test.ttl" ----
; Set the exit code to 1.
setexitcode 1
----- End of "test.ttl"  ----------


settime

Changes the system time.

settime <time>

Remarks

Sets the system time to <time>. The format of <time> should be "HH:MM:SS".

Example

settime '01:05:00'


show

Changes the displaying of MACRO dialog box.

show <show flag>

Remarks

Minimizes MACRO, if <show flag> is zero.
Restores MACRO and bring to top, if <show flag> is greater than zero.
Hides MACRO, if <show flag> is less than zero.

Example

; Minimize MACRO.
show 0

; Restore MACRO.
show 1

; Hide MACRO.
show -1


statusbox

Displays the status dialog box.

statusbox <message> <title> [<special>]

Parameters

string <message>
It is displayed in the dialog box.
string <title>
It is displayed as the dialog box title.
integer <special> (optional default=0)
If it is non-zero, following strings in <message> is treated as spacial character.
input | output
\\ "\"
\n | line feed
\t | tab
This option is obsolete. You are recommended to use the strspecial command.

Remarks

Displays the status dialog box if it has not been displayed yet.
Changes the message to <message> and title to <title>.

The "setdlgpos" command changes the position of status dialog box.
The "closesbox" command closes the status dialog box. A user can not close the status dialog box by using the Enter and ESC key.

Example

; Set the initial position.
setdlgpos 200 200
; Display the status dialog box.
statusbox 'Message' 'Title'
pause 3
; Move the dialog box.
setdlgpos 0 0
pause 3
; Move the dialog box.
closesbox

; infinite loop while displaying the counter
step = 0
while 1
  call show_step
  sendln 'echo do something'
  wait '$'
  pause 2
endwhile
end

:show_step
step = step + 1
gettime timestr "%Y/%m/%d-%H:%M:%S"
sprintf2 s "counter %d" step
statusbox timestr s
return

See also

  • strspecial
  • closesbox
  • bringupbox
  • setdlgpos


strdim

Declare string array variable. (version 4.72 or later)

strdim <array> <size>

Remarks

Defines the array of integer type having the <size> entry. The <size> range is from 1 to 65536 and the array index is 0-origin.
The default value of the array is an empty string.

Example

strdim timeary 10
for i 9 0
        gettime timeary[9-i]
        statusbox i "wait"
        pause 1
next

msg = ""
for i 0 9
        strconcat msg timeary[i]
        strconcat msg #13#10
next

messagebox msg "result"

See also

  • Types


uptime

Gets System Up Time. (version 4.81 or later)

uptime <intvar>

Remarks

Retrieves the number of milliseconds that have elapsed since the Windows OS was started, and then stores the value into the <intvar> variable.

The time wraps around to zero if the system is run continuously for 49.7 days.

Example

; How to get the uptime in Windows
uptime var
day = var / 86400000
var = var % 86400000
hour = var / 3600000
var = var % 3600000
min = var / 60000
var = var % 60000
sec = var / 1000

sprintf2 str "System Up Time: %d Days, %d Hours, %d Minutes, %d Seconds" day hour min sec
messagebox str "uptime"

uptime varstart

; do something...

uptime varend
diff = varend - varstart
sprintf2 str "MACRO running time: %d msec" diff
messagebox str "running time"


var2clipb

Copies the text data to clipboard. (version 4.46 or later)

var2clipb <string>

Remarks

Copies <string> to clipboard.
The "var2clipb" command returns one of the following values in the system variable "result":

Value | Meaning
0 | Could not open the clipboard.
1 | Copying to clipboard is successful.

Example

var2clipb 'Tera Term 4.46'
clipb2var data
messagebox data 'clipboard data'


yesnobox

Displays a dialog box, and ask Yes or No to user.

yesnobox <message> <title> [<special>]

Parameters

string <message>
It is displayed in the dialog box.
string <title>
It is displayed as the dialog box title.
integer <special> (optional default=0)
If it is non-zero, following strings in <message> is treated as spacial character.
input | output
\\ "\"
\n | line feed
\t | tab
This option is obsolete. You are recommended to use the strspecial command.

Return Value

System variable <result>
If the user clicks on the "Yes" button, it is set to 1.
If the user clicks on the "No" button, it is set to zero.

Example

:retry
;;; do something ;;;
yesnobox 'Try again?' 'Tera Term'
if result goto retry
end

See also

  • inputbox
  • listbox
  • passwordbox
  • setdlgpos
  • strspecial


Appendixes

  • Error messages
  • About new-line characters
  • Note on negative integer constants
  • NOTICE: Immediately re-connect the server after disconnection
  • ASCII code table
  • Oniguruma Regular Expressions


Error messages

Error message | Meaning
Can't call sub. | Cannot call the subroutine,the subroutine is located in a different file.
Can't link macro. | Failure to establish the link between MACRO and Tera Term.
Can't open file. | The include file does not exist, or there are too many nested include files.
")" expected. | A closing parenthesis does not exist where it should.
"*/" expected. | A closing comment does not exist where it should.
Link macro first. Use 'connect' macro. | The command cannot be executed before the link between MACRO and Tera Term is established.
Divide by zero. | The expression attempts to divide by zero.
Invalid control. | Invalid use of "else", "elseif" or "endif".
Label already defined. | Duplicate use of the label.
Label required. | The label is not defined.
Stack overflow. | There are too many nested subroutines, "for-next" loops or "while-endwhile" loops.
Syntax error. | The format of the statement is invalid.
Too many labels. | MACRO can not handle more than 512 labels.
Too many variables. | MACRO cannot handle more than 256 integer variables, 256 string variables, 256 integer arrays and 256 string arrays.
Type mismatch. | The type of the constant or variable is invalid.
Variable not initialized. | The variable must be initialized before it is referenced.
Index out of range. | The accessed index is larger than the defined maximum number.
"]" expected. | The right bracket of the array is missing.
Can't allocate memory. | The heap memory can not be allocated.
Unknown command. | The macro command can not be supported in Tera Term current version.


About new-line characters

New-line characters (CR or CR+LF) received from the host are converted to CR+LF pairs by Tera Term, and then Tera Term sends them to MACRO.
You should use the pair (CR+LF) as a new-line character to send to Tera Term.
ASCII code 13 (decimal) is for CR, and 10 is for LF.

Example:

send 'abc'#13#10 | Same as the statement "sendln 'abc'". The actual new-line character to be sent to the host is determined by Tera Term.
wait #10'abc' 'def'#13 | Waits for a line beginning with "abc" or a line ending with "def".
logwrite 'abc'#13#10 | Writes line "abc" to the log file.


Note on negative integer constants

Using a negative integer constant may cause a problem like the following: For example,

for i 5 -1

causes the syntax error, because the second parameter is regarded as "5-1" instead of "5" and the third parameter is empty. To avoid this problem, take one of the following solutions:

  1. Put "0" before "-".
    for i 5 0-1
  2. Add parenthese.
    for i 5 (-1)
  3. Assign the negative constant to a variable.

A = -1
for i 5 A


Notice: re-connecting soon after disconnection

NOTICE: Immediately re-connect the server after disconnection

When a user immediately connects to the server after disconnection, a problem will occurs. Refer to below code.

; Sending the exit command to disconnect the remote host.
sendln "exit"

; Re-connect the remote host.
connect "server"

This macro script will do not work in most cases.
When a user sends the exit command, it will take a few minutes to disconnect the server. So, a time lag will occur.
If a user uses the connect command while the time lag occurs, the connect command will become successful because the local host still connects to the remote host.

To fix this problem, use the connect command after finish the disconnection. See below code.

; Sends the exit command and prompts the server disconnection.
sendln "exit"

do
    ; Waits 10 msec.
    mpause 10
    ; Confirms the connection status.
    testlink
; Repeats if TeraTerm connects the server. See result is 2.
loop while result = 2

; Re-connects a new connection.
connect "server"

Also, when Auto window close configuration is enabled, a user uses the unlink command. Refer to in the following code:

; Sends the exit command and prompts the server disconnection.
sendln "exit"

; Unlinks TeraTerm.
unlink

; Re-connects a new connection.
connect "server"


ASCII code table

For example, the ASCII code for "A" is 65 in decimal or $41 in hexadecimal.

Char | Code | Char | Code | Char | Code | Char | Code
NUL (^@) | 0 $00 | DLE (^P) | 16 $10 | SPACE | 32 $20 | 0 | 48 $30
SOH (^A) | 1 $01 | DC1 (^Q) | 17 $11 | ! | 33 $21 | 1 | 49 $31
STX (^B) | 2 $02 | DC2 (^R) | 18 $12 | " | 34 $22 | 2 | 50 $32
ETX (^C) | 3 $03 | DC3 (^S) | 19 $13 | # | 35 $23 | 3 | 51 $33
EOT (^D) | 4 $04 | DC4 (^T) | 20 $14 | $ | 36 $24 | 4 | 52 $34
ENQ (^E) | 5 $05 | NAK (^U) | 21 $15 | % | 37 $25 | 5 | 53 $35
ACK (^F) | 6 $06 | SYN (^V) | 22 $16 | & | 38 $26 | 6 | 54 $36
BEL (^G) | 7 $07 | ETB (^W) | 23 $17 | ' | 39 $27 | 7 | 55 $37
BS (^H) | 8 $08 | CAN (^X) | 24 $18 | ( | 40 $28 | 8 | 56 $38
HT (^I) | 9 $09 | EM (^Y) | 25 $19 | ) | 41 $29 | 9 | 57 $39
LF (^J) | 10 $0A | SUB (^Z) | 26 $1A | * | 42 $2A | : | 58 $3A
VT (^K) | 11 $0B | ESC (^[) | 27 $1B | + | 43 $2B | ; | 59 $3B
FF (^L) | 12 $0C | FS (^\) | 28 $1C | , | 44 $2C | < | 60 $3C
CR (^M) | 13 $0D | GS (^]) | 29 $1D | - | 45 $2D | = | 61 $3D
SO (^N) | 14 $0E | RS (^^) | 30 $1E | . | 46 $2E | > | 62 $3E
SI (^O) | 15 $0F | US (^_) | 31 $1F | / | 47 $2F | ? | 63 $3F
Char | Code | Char | Code | Char | Code | Char | Code
@ | 64 $40 | P | 80 $50 | ` | 96 $60 | p | 112 $70
A | 65 $41 | Q | 81 $51 | a | 97 $61 | q | 113 $71
B | 66 $42 | R | 82 $52 | b | 98 $62 | r | 114 $72
C | 67 $43 | S | 83 $53 | c | 99 $63 | s | 115 $73
D | 68 $44 | T | 84 $54 | d | 100 $64 | t | 116 $74
E | 69 $45 | U | 85 $55 | e | 101 $65 | u | 117 $75
F | 70 $46 | V | 86 $56 | f | 102 $66 | v | 118 $76
G | 71 $47 | W | 87 $57 | g | 103 $67 | w | 119 $77
H | 72 $48 | X | 88 $58 | h | 104 $68 | x | 120 $78
I | 73 $49 | Y | 89 $59 | i | 105 $69 | y | 121 $79
J | 74 $4A | Z | 90 $5A | j | 106 $6A | z | 122 $7A
K | 75 $4B | [ | 91 $5B | k | 107 $6B | { | 123 $7B
L | 76 $4C | \ | 92 $5C | l | 108 $6C | | | 124 $7C
M | 77 $4D | ] | 93 $5D | m | 109 $6D | } | 125 $7D
N | 78 $4E | ^ | 94 $5E | n | 110 $6E | ~ | 126 $7E
O | 79 $4F | _ | 95 $5F | o | 111 $6F | DEL | 127 $7F


Uninstallation

Case installed from the installer

To uninstall Tera Term, run "Programs and Features" in Control Panel, or run unins000.exe in the Tera Term directory.
Next, remove the "Tera Special" font from "Fonts" in Control Panel.
If the uninstaller does not work, you can uninstall Tera Term manually.

Case used ZIP archive

Please uninstall Tera Term manually.

Manual uninstallation

Delete all Tera Term files in the Tera Term directory and remove the "Tera Special" font from "Fonts" in Control Panel.
If a user uses the Tera Term Menu, delete the HKEY_CURRENT_USER\Software\ShinpeiTools\TTermMenu registry.


Transfer ([File] menu)

Kermit
Transfers files between the PC and the host with the Kermit protocol.
XMODEM
Transfers files between the PC and the host with the XMODEM protocol.
YMODEM
Transfers files between the PC and the host with the YMODEM protocol.
ZMODEM
Transfers files between the PC and the host with the ZMODEM protocol.
B-Plus
Transfers files between the PC and the host with the B-Plus protocol.
Quick-VAN
Transfers files between the PC and the host with the Quick-VAN protocol.


B-Plus ([File] Transfer menu)

Transfers a file between the PC and the host with the B-Plus protocol.

Receive
Receives a file from the host. Activate the download command of the host before executing this command.
Send...
Sends a file to the host. Activate the upload command of the host before executing this command.

Tips on B-Plus


Kermit ([File] Transfer menu)

Transfers files between the PC and the host with the Kermit protocol.

Receive
Receives files from the host. Activate the Send command of the host's Kermit before executing this command.
Get...
Receives files from the host, which is in the Kermit server state.
Send...
Sends files to the host. Activate the Receive or Server command of the host's Kermit before executing this command.
Finish
Exits the Kermit server state of the host.


Quick-VAN ([File] Transfer menu)

Transfers files between the PC and the host with the Quick-VAN protocol.

Note: Quick-VAN protocol is used in the Japanese BBS "PC-VAN".

Receive
Receives files from the host. Activate the download command of the host before executing this command.
Send...
Sends files to the host. Activate the upload command of the host before executing this command.

Tips on Quick-VAN


XMODEM ([File] Transfer menu)

Transfers files between the PC and the host with the XMODEM protocol.

Receive...
Receives a file from the host. Activate the send command of the host's XMODEM before executing this command.
Send...
Sends a file to the host.
Activate the send command of the host's XMODEM before executing this command.

Tips on XMODEM


YMODEM ([File] Transfer menu)

Transfers files between the PC and the host with the YMODEM protocol.

Receive...
Receives a file from the host. Activate the send command of the host's YMODEM before executing this command.
Send...
Sends a file to the host.
Activate the send command of the host's YMODEM before executing this command.


ZMODEM ([File] Transfer menu)

Transfers files between the PC and the host with the ZMODEM protocol.

Receive
Receives files from the host. Activate the send command of the host's ZMODEM before executing this command.
Send...
Sends files to the host.
Tera Term would call the host's ZMODEM "rz" command before sending ZRQINIT message.

Tips on ZMODEM


Keyboard ([Setup] menu; Russian mode)

"Keyboard setup" dialog box

Transmit DEL by:
Backspace key
If this option is checked, pressing the backspace key sends the DEL character (ASCII 0x7F). If not checked, the BS character (ASCII 0x08) is sent. Even if this option is (not) checked, the BS (DEL) character can be sent by pressing the Ctrl+backspace key.
Delete key
If this option is checked, pressing the Delete key sends the DEL character. If not checked, the function assigned for the Delete key is determined by the keyboard setupfile.
Keyboard
Russian keyboard driver type. If you are using the standard keyboard driver which comes with Russian Windows, select Windows. If you are using non-Russian Windows and using a driver which generates KOI8-R code, select KOI8-R.
Meta key
Enables the meta-key mode. The Alt key is used as the meta key. For example, the sequence ESC A is sent by pressing the Alt+A key. Shortcut keys which use the Alt key (such as Alt+C) are disabled.
Please set the "left" value to input the character with AltGr key and the Meta key is enabled. However, this value can be enabled with Windows NT 4.0 later.
Disabled mode:
Application Keypad
This option disables Application Keypad mode.
If this option is selected, you can prevent a problem of a numeric keypad from being unavailable due to an accidental transition to Application Keypad mode.
Note that some application which uses application keypad mode may encounter other problems when this option is selected.
Application Cursor
This option disables Application Cursor mode.

You can modify key assignments by editing the keyboard setupfile.


Terminal ([Setup] menu; Japanese mode)

This page is described when the Language is selected to Japanese on the Setup - General dialog. Please refer to below page if another language mode is used.

  • English mode
  • Korean mode
  • Russian mode
  • UTF-8 mode

"Terminal setup" dialog box

Terminal size
The logical size of the terminal (numbers of columns and lines). Note that the window size (real screen size) is not necessarily equal to the terminal size.
Term size = win size
Forces the terminal size to be always equal to the window size.
Auto window resize
When the terminal size is changed, resizes the window to the terminal size.
New-line (receive)
CR
Tera Term doesn't convert it.
CR+LF
Received CR ($0D) character is converted to CR+LF ($0D $0A) pairs.
e.g.) If "CR LF" is received, it is converted to "CR LF LF."
LF
Received LF ($0A) character is converted to CR+LF ($0D $0A) pairs.
e.g.) If "CR LF" is received, it is converted to "CR CR LF."
AUTO
Received CR ($0D) or LF ($0A) character is converted to CR+LF ($0D $0A) pairs.
e.g.) If "CR+LF" are received, it is not converted.
If "CR" is received, it is converted to "CR LF."
If "LF" is received, it is converted to "CR LF."
New-line (transmit)
CR
Tera Term doesn't convert it.
CR+LF
CR ($0D) character to be sent is converted to CR+LF ($0D $0A) pairs before it is actually sent.
LF
CR ($0D) character to be sent is converted to LF ($0A) before it is actually sent.
Terminal ID
Terminal ID to be reported to the host when the host requests it. Note that the terminal ID is not identical to the telnet terminal type. To change the telnet terminal type, use the [Setup] TCP/IP command.
Local echo
Enables local echoing of characters sent.
Answerback
The string to be answered back to the host, when the ENQ ($05) character is received. Each non-printable character in the string can be expressed as a "$" and ASCII code in two-character hex number. For example, the string "ABC<CR><LF>" is expressed as the following:

ABC$0D$0A

Auto switch (VT<->TEK)
Enables auto switching between VT and TEK emulations.
Kanji (receive)
Kanji character that is received from host(SJIS, EUC, JIS, UTF-8 and UTF-8m).
7bit katakana (receive)
When "HANKAKU" katakana code from host is described for 7bit (Shift control with SO/SI is using), please select this entry. This is only enabled when Kanji (receive) is JIS.
Kanji (transmit)
Kanji character that is sent from client(SJIS, EUC, JIS and UTF-8).
7bit katakana (transmit)
When "HANKAKU" katakana code from host is described for 7bit (Shift control with SO/SI is using), please select this entry. This is only enabled when Kanji (transmit) is JIS.
Kanji-in (transmit)
The escape sequence is used when Kanji (transmit) is JIS. (Sequence regarding Kanji character is specified to G0. ^[$@ or ^[$B). The escape sequence from host can use any sequence.
Kanji-out (transmit)
The escape sequence is used when Kanji (transmit) is JIS. (Sequence regarding ASCII and JIS Roman code is specified to G0. ^[(B or ^[(J ). The escape sequence from host can use any sequence.

NOTICE: ^[(H can not be selected on initial setting.

locale
Locale setting. Refer to Unicode for details.


Terminal ([Setup] menu; Korean mode)

This page is described when the Language is selected to Korean on the Setup - General dialog. Please refer to below page if another language mode is used.

  • English mode
  • Japanese mode
  • Russian mode
  • UTF-8 mode

"Terminal setup" dialog box

Terminal size
The logical size of the terminal (numbers of columns and lines). Note that the window size (real screen size) is not necessarily equal to the terminal size.
Term size = win size
Forces the terminal size to be always equal to the window size.
Auto window resize
When the terminal size is changed, resizes the window to the terminal size.
New-line (receive)
CR
Tera Term doesn't convert it.
CR+LF
Received CR ($0D) character is converted to CR+LF ($0D $0A) pairs.
e.g.) If "CR LF" is received, it is converted to "CR LF LF."
LF
Received LF ($0A) character is converted to CR+LF ($0D $0A) pairs.
e.g.) If "CR LF" is received, it is converted to "CR CR LF."
AUTO
Received CR ($0D) or LF ($0A) character is converted to CR+LF ($0D $0A) pairs.
e.g.) If "CR+LF" are received, it is not converted.
If "CR" is received, it is converted to "CR LF."
If "LF" is received, it is converted to "CR LF."
New-line (transmit)
CR
Tera Term doesn't convert it.
CR+LF
CR ($0D) character to be sent is converted to CR+LF ($0D $0A) pairs before it is actually sent.
LF
CR ($0D) character to be sent is converted to LF ($0A) before it is actually sent.
Terminal ID
Terminal ID to be reported to the host when the host requests it. Note that the terminal ID is not identical to the telnet terminal type. To change the telnet terminal type, use the [Setup] TCP/IP command.
Local echo
Enables local echoing of characters sent.
Answerback
The string to be answered back to the host, when the ENQ ($05) character is received. Each non-printable character in the string can be expressed as a "$" and ASCII code in two-character hex number. For example, the string "ABC<CR><LF>" is expressed as the following:

ABC$0D$0A

Auto switch (VT<->TEK)
Enables auto switching between VT and TEK emulations.
Coding (receive)
Character code that is received from host(KS5601, UTF-8 and UTF-8m).
Coding (transmit)
Character code that is sent from client(KS5601 and UTF-8).
locale
Locale setting. Refer to Unicode for details.


Terminal ([Setup] menu; Russian mode)

This page is described when the Language is selected to Russian on the Setup - General dialog. Please refer to below page if another language mode is used.

  • English mode
  • Japanese mode
  • Korean mode
  • UTF-8 mode

"Terminal setup" dialog box

Terminal size
The logical size of the terminal (numbers of columns and lines). Note that the window size (real screen size) is not necessarily equal to the terminal size.
Term size = win size
Forces the terminal size to be always equal to the window size.
Auto window resize
When the terminal size is changed, resizes the window to the terminal size.
New-line (receive)
CR
Tera Term doesn't convert it.
CR+LF
Received CR ($0D) character is converted to CR+LF ($0D $0A) pairs.
e.g.) If "CR LF" is received, it is converted to "CR LF LF."
LF
Received LF ($0A) character is converted to CR+LF ($0D $0A) pairs.
e.g.) If "CR LF" is received, it is converted to "CR CR LF."
AUTO
Received CR ($0D) or LF ($0A) character is converted to CR+LF ($0D $0A) pairs.
e.g.) If "CR+LF" are received, it is not converted.
If "CR" is received, it is converted to "CR LF."
If "LF" is received, it is converted to "CR LF."
New-line (transmit)
CR
Tera Term doesn't convert it.
CR+LF
CR ($0D) character to be sent is converted to CR+LF ($0D $0A) pairs before it is actually sent.
Terminal ID
Terminal ID to be reported to the host when the host requests it. Note that the terminal ID is not identical to the telnet terminal type. To change the telnet terminal type, use the [Setup] TCP/IP command.
Local echo
Enables local echoing of characters sent.
Answerback
The string to be answered back to the host, when the ENQ ($05) character is received. Each non-printable character in the string can be expressed as a "$" and ASCII code in two-character hex number. For example, the string "ABC<CR><LF>" is expressed as the following:

ABC$0D$0A

Auto switch (VT<->TEK)
Enables auto switching between VT and TEK emulations.
Character set
Host
Russian character set used in the host computer. Windows (CP 1251), KOI8-R, CP 866 or ISO 8859-5.
Client
Russian character set used in your PC. Windows (CP 1251), KOI8-R, CP 866 or ISO 8859-5. If you are using Russian version of Windows, you should select Windows.
Font
Character code set of the specified font, Windows (CP 1251), KOI8-R, CP 866 or ISO 8859-5.


Terminal ([Setup] menu; UTF-8 mode)

This page is described when the Language is selected to UTF-8 on the Setup - General dialog. Please refer to below page if another language mode is used.

  • English mode
  • Japanese mode
  • Korean mode
  • Russian mode

"Terminal setup" dialog box

Terminal size
The logical size of the terminal (numbers of columns and lines). Note that the window size (real screen size) is not necessarily equal to the terminal size.
Term size = win size
Forces the terminal size to be always equal to the window size.
Auto window resize
When the terminal size is changed, resizes the window to the terminal size.
New-line (receive)
CR
Tera Term doesn't convert it.
CR+LF
Received CR ($0D) character is converted to CR+LF ($0D $0A) pairs.
e.g.) If "CR LF" is received, it is converted to "CR LF LF."
LF
Received LF ($0A) character is converted to CR+LF ($0D $0A) pairs.
e.g.) If "CR LF" is received, it is converted to "CR CR LF."
AUTO
Received CR ($0D) or LF ($0A) character is converted to CR+LF ($0D $0A) pairs.
e.g.) If "CR+LF" are received, it is not converted.
If "CR" is received, it is converted to "CR LF."
If "LF" is received, it is converted to "CR LF."
New-line (transmit)
CR
Tera Term doesn't convert it.
CR+LF
CR ($0D) character to be sent is converted to CR+LF ($0D $0A) pairs before it is actually sent.
LF
CR ($0D) character to be sent is converted to LF ($0A) before it is actually sent.
Terminal ID
Terminal ID to be reported to the host when the host requests it. Note that the terminal ID is not identical to the telnet terminal type. To change the telnet terminal type, use the [Setup] TCP/IP command.
Local echo
Enables local echoing of characters sent.
Answerback
The string to be answered back to the host, when the ENQ ($05) character is received. Each non-printable character in the string can be expressed as a "$" and ASCII code in two-character hex number. For example, the string "ABC<CR><LF>" is expressed as the following:

ABC$0D$0A

Auto switch (VT<->TEK)
Enables auto switching between VT and TEK emulations.
Coding (receive)
Character code that is received from host(UTF-8 and UTF-8m).
Coding (transmit)
Character code that is sent from client(UTF-8).
locale
Locale setting. Refer to Unicode for details.


Window (TEK window [Window] menu)

Activates or closes a Tera-Term window.

"Window list" dialog box

Window
List of existing Tera-Term windows. Select one from the list.
Open
Activates the selected window and closes this dialog box.
Close window
Closes the selected window.


Argon2 reference source code package - reference C implementations

Copyright 2015
Daniel Dinu, Dmitry Khovratovich, Jean-Philippe Aumasson, and Samuel Neves

You may use this work under the terms of a Creative Commons CC0 1.0
License/Waiver or the Apache Public License 2.0, at your option. The terms of
these licenses can be found at:

- CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0
- Apache 2.0        : http://www.apache.org/licenses/LICENSE-2.0

The terms of the licenses are reproduced below.

--------------------------------------------------------------------------------

Creative Commons Legal Code

CC0 1.0 Universal

    CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
    LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
    ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
    INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
    REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
    PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
    THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
    HEREUNDER.

Statement of Purpose

The laws of most jurisdictions throughout the world automatically confer
exclusive Copyright and Related Rights (defined below) upon the creator
and subsequent owner(s) (each and all, an "owner") of an original work of
authorship and/or a database (each, a "Work").

Certain owners wish to permanently relinquish those rights to a Work for
the purpose of contributing to a commons of creative, cultural and
scientific works ("Commons") that the public can reliably and without fear
of later claims of infringement build upon, modify, incorporate in other
works, reuse and redistribute as freely as possible in any form whatsoever
and for any purposes, including without limitation commercial purposes.
These owners may contribute to the Commons to promote the ideal of a free
culture and the further production of creative, cultural and scientific
works, or to gain reputation or greater distribution for their Work in
part through the use and efforts of others.

For these and/or other purposes and motivations, and without any
expectation of additional consideration or compensation, the person
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
is an owner of Copyright and Related Rights in the Work, voluntarily
elects to apply CC0 to the Work and publicly distribute the Work under its
terms, with knowledge of his or her Copyright and Related Rights in the
Work and the meaning and intended legal effect of CC0 on those rights.

1. Copyright and Related Rights. A Work made available under CC0 may be
protected by copyright and related or neighboring rights ("Copyright and
Related Rights"). Copyright and Related Rights include, but are not
limited to, the following:

  i. the right to reproduce, adapt, distribute, perform, display,
     communicate, and translate a Work;
 ii. moral rights retained by the original author(s) and/or performer(s);
iii. publicity and privacy rights pertaining to a person's image or
     likeness depicted in a Work;
 iv. rights protecting against unfair competition in regards to a Work,
     subject to the limitations in paragraph 4(a), below;
  v. rights protecting the extraction, dissemination, use and reuse of data
     in a Work;
 vi. database rights (such as those arising under Directive 96/9/EC of the
     European Parliament and of the Council of 11 March 1996 on the legal
     protection of databases, and under any national implementation
     thereof, including any amended or successor version of such
     directive); and
vii. other similar, equivalent or corresponding rights throughout the
     world based on applicable law or treaty, and any national
     implementations thereof.

2. Waiver. To the greatest extent permitted by, but not in contravention
of, applicable law, Affirmer hereby overtly, fully, permanently,
irrevocably and unconditionally waives, abandons, and surrenders all of
Affirmer's Copyright and Related Rights and associated claims and causes
of action, whether now known or unknown (including existing as well as
future claims and causes of action), in the Work (i) in all territories
worldwide, (ii) for the maximum duration provided by applicable law or
treaty (including future time extensions), (iii) in any current or future
medium and for any number of copies, and (iv) for any purpose whatsoever,
including without limitation commercial, advertising or promotional
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
member of the public at large and to the detriment of Affirmer's heirs and
successors, fully intending that such Waiver shall not be subject to
revocation, rescission, cancellation, termination, or any other legal or
equitable action to disrupt the quiet enjoyment of the Work by the public
as contemplated by Affirmer's express Statement of Purpose.

3. Public License Fallback. Should any part of the Waiver for any reason
be judged legally invalid or ineffective under applicable law, then the
Waiver shall be preserved to the maximum extent permitted taking into
account Affirmer's express Statement of Purpose. In addition, to the
extent the Waiver is so judged Affirmer hereby grants to each affected
person a royalty-free, non transferable, non sublicensable, non exclusive,
irrevocable and unconditional license to exercise Affirmer's Copyright and
Related Rights in the Work (i) in all territories worldwide, (ii) for the
maximum duration provided by applicable law or treaty (including future
time extensions), (iii) in any current or future medium and for any number
of copies, and (iv) for any purpose whatsoever, including without
limitation commercial, advertising or promotional purposes (the
"License"). The License shall be deemed effective as of the date CC0 was
applied by Affirmer to the Work. Should any part of the License for any
reason be judged legally invalid or ineffective under applicable law, such
partial invalidity or ineffectiveness shall not invalidate the remainder
of the License, and in such case Affirmer hereby affirms that he or she
will not (i) exercise any of his or her remaining Copyright and Related
Rights in the Work or (ii) assert any associated claims and causes of
action with respect to the Work, in either case contrary to Affirmer's
express Statement of Purpose.

4. Limitations and Disclaimers.

 a. No trademark or patent rights held by Affirmer are waived, abandoned,
    surrendered, licensed or otherwise affected by this document.
 b. Affirmer offers the Work as-is and makes no representations or
    warranties of any kind concerning the Work, express, implied,
    statutory or otherwise, including without limitation warranties of
    title, merchantability, fitness for a particular purpose, non
    infringement, or the absence of latent or other defects, accuracy, or
    the present or absence of errors, whether or not discoverable, all to
    the greatest extent permissible under applicable law.
 c. Affirmer disclaims responsibility for clearing rights of other persons
    that may apply to the Work or any use thereof, including without
    limitation any person's Copyright and Related Rights in the Work.
    Further, Affirmer disclaims responsibility for obtaining any necessary
    consents, permissions or other rights required for any use of the
    Work.
 d. Affirmer understands and acknowledges that Creative Commons is not a
    party to this document and has no duty or obligation with respect to
    this CC0 or use of the Work.

--------------------------------------------------------------------------------

                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.


Communication (Tera Term setup file)

Maximum serial port number

You can specify the maximum serial port number (maximum value of n for COMn) to be listed in the [File] New connection and [Setup] Serial port dialog boxes. To specify the maximum number, edit the MaxComPort line in the [Tera Term] section of the setup file like the following:

MaxComPort=<maximum serial port number>

The maximum serial port number can not be less than 4 even if the actual maximum number is less than 4.
Configurable maximum number is in the following:
4096 (version 4.65 or later)
256 (version 4.55 or later)
99 (version 4.24 or later)
16 (version less than 4.24)

Default:
MaxComPort=256

Don't clear COM buffer when serial port opening.

In the default setup, Tera Term cleaning COM buffer when serial port opening.

To disable COM buffer cleaning, edit the ClearComBuffOnOpen line in the [Tera Term] section of the setup file like the following:

ClearComBuffOnOpen=off

Default:
ClearComBuffOnOpen=on

Disabling the warning on TCP/IP disconnection

In the default setup, Tera Term displays the warning message "Disconnect ?" when you try to close the TCP/IP connection by using the "Close" command in the system menu (or by double clicking the icon at upper left corner of the window).

To disable this warning message, edit the ConfirmDisconnect line in the [Tera Term] section of the setup file like the following:

ConfirmDisconnect=off

Default:
ConfirmDisconnect=on

Telnet binary option

To enable the telnet binary option, edit the TelBin line in the [Tera Term] section of the setup file like the following:

TelBin=on

You can also specify the binary option on the command line (/B option).

Default:
TelBin=off

Telnet echo option

If you edit the TelEcho line in the [Tera Term] section of the setup file like the following:

TelEcho=on

Tera Term tries to change the host's echoing (remote echoing) status, depending on the status of "Local echo" option in the [Setup] Terminal dialog box. If "Local echo" is (not) checked, Tera Term tries to make the remote echoing off (on), to avoid double echoing or no echoing at the remote host and Tera Term. Note that this mechanism does not work for hosts which do not support the telnet echo option.

Default:
TelEcho=off

Telnet log

To log option-negotiation data of a telnet session to the file TELNET.LOG, edit the TelLog line in the [Tera Term] section of the setup file like the following:

TelLog=on

Default:
TelLog=off

Telnet port number / Terminal setup for non-telnet connection

Telnet port number

On the command line, or on the [File] New connection dialog box, you can specify the TCP port number (<TCP port#>) and telnet flag (<telnet flag>) for a TCP/IP connection. If these parameters are omitted in the command line, the default values are taken from the Tera Term setup file.

Only if <telnet flag> is 1 (on) and <TCP port#> is 23, Tera Term starts spontaneously sending telnet commands to the host for the option negotiation when the TCP/IP connection is established.

This particular port number for telnet, 23, can be changed by editing the TelPort line in the [Tera Term] section of setup file like the following:

TelPort=<telnet port#>

Default:
TelPort=23

Whatever <TCP port#> is and whatever <telnet flag> is, Tera Term can respond to telnet commands sent by the host. (except TelAutoDetect setting is off.)

Terminal setup for non-telnet TCP/IP connection

For a non-telnet TCP/IP connection (usually with a port other than 23), you may need to set the "local echo" option on, and the "new-line (transmit)" option to CR+LF. If you edit the TCPLocalEcho and TCPCRSend lines in the [Tera Term] section of the setup file like the following:

TCPLocalEcho=on
TCPCRSend=CRLF    (CR is also acceptable)

the "local echo" option is turned on and the "new-line (transmit)" option is set to CRLF automatically when the connection is established on condition that <telnet flag> is 0 (off), or <TCP port#> is not equal to <telnet port#>. Otherwise, setup values specified by [Setup] Terminal are used. By using these options, one setup file can support both the telnet connection and non-telnet connection.

Default:
TCPLocalEcho=off
; (This option is disabled and the "local echo" option
; in the [Setup] Terminal dialog box is always used.)
TCPCRSend=
; (This option is disabled and the "new-line (transmit)" option
; in the [Setup] Terminal dialog box is always used.)

Disable Auto-Detect mode of Telnet command

Tera Term will detect a command of Telnet sent from host even a connection is in non-Telnet mode.Once it detects a command, a connection is treated as if in Telnet mode.
However, there is a possible problem that a connection is forced to Telnet mode when a character of '0xFF' is sent from Tera Term, it will be echoed back and is recognized as Telnet command.

This problem can be avoided by changing TelAutoDetect in [Tera Term] section of configuration file as follows,

TelAutoDetect=off

Default:
TelAutoDetect=on

Disabling "Line at a time" mode

Tera Term now supports for "Line at a time" mode from version 4.63.
Since the default value of this setting is on, when it is used in TCP/IP connection, input characters are not sent until the line feed is inputed. But, this setting is disabled (forced to "Character at a time" mode) when following situations:

  • ssh connection
  • when a server becomes echo-back mode (received WILL ECHO) in telnet negotiation
  • SGA request (WILL SGA) of Tera Term is accepted (received DO SGA) in telnet negotiation

In any connection mode other than telnet and SSH, the above condition is not met and therefore, "Line at a time" mode is enabled.
To send the key input immediately, edit the EnableLineMode line in the [Tera Term] section of the setup file like the following:

EnableLineMode=off

Default:
EnableLineMode=on

Pause time while the break signal is sending to the serial port

When the break signal is sent to the serial port, the default pause time is 1000 msec.
To change the pause time, edit change the SendBreakTime entry in the [Tera Term] of the setup file.

SendBreakTime=2000

Default:
SendBreakTime=1000

Automatic COM port Reconnection

The serial console is disconnected when the USB serial cable is extracted. Next, the serial console is connected when the serial cable is inserted.

This feature is enabled on the Windows XP or later.

If this feature is not used, please change the AutoComPortReconnect entry of the [Tera Term] section in the teraterm.ini file.

AutoComPortReconnect=off

Default:
AutoComPortReconnect=on

Wait for COM port connection

Tera Term waits for port connection when the serial port does not exist.

This feature is enabled on the Windows XP or later.
AutoComPortReconnect entry should be on.

If this feature is not used, please change the WaitCom entry of the [Tera Term] section in the teraterm.ini file.

WaitCom=off

Default:
WaitCom=off

Change the terminal speed notifies to server

When Telnet or SSH connection is started, Tera Term notifies the terminal speed to the server.

You can specify the maximum serial port number (maximum value of n for COMn) to be listed in the [File] New connection and [Setup] Serial port dialog boxes. To specify the maximum number, edit the MaxComPort line in the [Tera Term] section of the setup file like the following:

To change the terminal speed notifies to the server, edit the TerminalSpeed line in the [Tera Term] section of the setup file like the following:

TerminalSpeed=<Transmit Speed>,<Receive Speed>

For example, notifies the transmit speed as 38400bps and receive speed as 9600bps, configure the TerminalSpeed entry as follows:

TerminalSpeed=38400,9600

When only one value is specified as below, this value is used as both of the transmit speed and received speed.

TerminalSpeed=<Speed>

Default:
TerminalSpeed=38400


All items of Tera Term setup file

BG

item | Default of setup file | Default of program | Note
BGEnable | off | <- |
BGFastSizeMove | on | <- |
BGFlickerlessMove | on | <- |
BGNoFrame | on | <- |
BGSPIPath | plugin | <- |
BGUseAlphaBlendAPI | on | <- |
BGThemeFile | theme\*.ini | <- |
BGIgnoreThemeFile | off | <- |

Tera Term

item | Default of setup file | Default of program | Note
AcceleratorCygwinConnection | on | <- |
AcceleratorNewConnection | on | <- |
Accept8BitCtrl | on | <- |
AcceptBroadcast | on | <- |
AcceptTitleChangeRequest | overwrite | <- |
Aixterm16Color | on | off |
AllowWrongSequence | off | <- |
AlphaBlend | 255 | * | * the value of AlphaBlend setting is used.
AlternateScreenBuffer | on | <- |
ANSIColor | 0,0,0,0, 1,255,0,0, 2,0,255,0, 3,255,255,0, 4,128,128,255, 5,255,0,255, 6,0,255,255, 7,255,255,255, 8,64,64,64, 9,192,0,0, 10,0,192,0, 11,192,192,0, 12,64,64,192, 13,192,0,192, 14,0,192,192, 15,192,192,192 | 0,0,0,0, 1,255,0,0, 2,0,255,0, 3,255,255,0, 4,0,0,255, 5,255,0,255, 6,0,255,255, 7,255,255,255, 8,128,128,128, 9,128,0,0, 10,0,128,0, 11,128,128,0, 12,0,0,128, 13,128,0,128, 14,0,128,128, 15,192,192,192 |
Answerback |  | <- |
AutoComPortReconnect | on | <- |
AutoFileRename | on | off |
AutoScrollOnlyInBottomLine | on | off |
AutoTextCopy | on | <- |
AutoWinClose | on | <- |
AutoWinResize | off | <- |
AutoWinSwitch | off | <- |
BackWrap | off | <- |
BaudRate | 9600 | <- |
Beep | on | <- |
BeepOnConnect | off | <- |
BeepOverUsedCount | 5 | <- |
BeepOverUsedTime | 2 | <- |
BeepSuppressTime | 5 | <- |
BPAuto | off | <- |
BPEscCtl | off | <- |
BPLog | off | <- |
BroadcastCommandHistory | on | off |
BSKey | BS | <- |
ClearComBuffOnOpen | on | <- |
ClearOnResize | on | <- |
ClearScreenOnCloseConnection | off | <- |
ClickableUrlBrowser |  | <- |
ClickableUrlBrowserArg |  | <- |
ClipboardAccessFromRemote | off | <- |
ComPort | 1 | <- |
ConfirmChangePaste | on | <- |
ConfirmChangePasteCR | on | <- |
ConfirmChangePasteStringFile |  | <- |
ConfirmDisconnect | on | <- |
ConfirmFileDragAndDrop | on | <- |
ConfirmPasteMouseRButton | off | <- |
ConnectingTimeout | 0 | <- |
CRReceive | CR | <- |
CRSend | CR | <- |
CtrlInKanji | on | <- |
CursorCtrlSequence | off | <- |
CursorShape | block | <- |
CygwinDirectory | c:\cygwin | <- |
DataBit | 8 | <- |
Debug | off | <- |
DebugModes | off | <- |
DeferredLogWriteMode | on | <- |
DelayPerChar | 0 | <- |
DelayPerLine | 0 | <- |
DeleteKey | on | off |
DelimDBCS | on | <- |
DelimList | $20!"#$24%&'()*+,:;<=>?@[\]^`{|} | $20!"#$24%&'()*+,-./:;<=>?@[\]^`{|}~ |
DisableAcceleratorDuplicateSession | off | <- |
DisableAcceleratorSendBreak | off | <- |
DisableAppCursor | off | <- |
DisableAppKeypad | off | <- |
DisableMenuDuplicateSession | off | <- |
DisableMenuNewConnection | off | <- |
DisableMenuSendBreak | off | <- |
DisableMouseTrackingByCtrl | on | <- |
DisablePasteMouseMButton | on | <- |
DisablePasteMouseRButton | off | <- |
DisableWheelToCursorByCtrl | on | <- |
DlgFont |  | <- |
EnableANSIColor | on | <- |
EnableBlinkAttrColor | on | <- |
EnableBold | on | <- |
EnableBoldAttrColor | on | <- |
EnableClickableUrl | on | off |
EnableContinuedLineCopy | on | off |
EnableLineMode | on | <- |
EnablePopupMenu | on | <- |
EnableReverseAttrColor | on | off |
EnableScrollBuff | on | <- |
EnableShowMenu | on | <- |
EnableStatusLine | on | <- |
EnableURLColor | on | <- |
FileDir | *1 | *2 | *1 by the installer *2 install directory
FileSendFilter |  | <- |
FileSendHighSpeedMode | on | <- |
FlowCtrl | none | <- |
FontQuality | default | <- |
FTHideDialog | off | <- |
HideTitle | off | <- |
HistoryList | on | off |
HostDialogOnStartup | on | <- |
IME | on | <- |
IMEInline | on | <- |
IMERelatedCursor | off | <- |
ISO2022ShiftFunction | on | <- |
JoinSplitURL | off | <- |
JoinSplitURLIgnoreEOLChar | \ | <- |
JumpList | on | <- |
KanjiIn | B | <- |
KanjiOut | B | J |
KanjiReceive | UTF-8 | SJIS |
KanjiSend | UTF-8 | SJIS |
KatakanaReceive | 8 | <- |
KatakanaSend | 8 | <- |
KillFocusCursor | on | <- |
KmtFileAttr | off | <- |
KmtLog | off | <- |
KmtLongPacket | off | <- |
Language | * | English | * by the installer
LanguageSelection | on | <- |
ListHiddenFonts | off | <- |
Locale | * | japanese | * by the installer
LocalEcho | off | <- |
LockTUID | on | <- |
LogAppend | on | off |
LogAutoStart | off | <- |
LogBinary | off | <- |
LogDefaultName | teraterm.log | <- |
LogDefaultPath |  | <- |
LogHideDialog | off | <- |
LogIncludeScreenBuffer | off | off |
LogLockExclusive | on | <- |
LogRotate | 0 | <- |
LogRotateSize | 0 | <- |
LogRotateSizeType | 0 | <- |
LogRotateStep | 0 | <- |
LogTimestamp | off | <- |
LogTimestampFormat | %Y-%m-%d %H:%M:%S.%N | <- |
LogTimestampType | Local | <- |
LogTimestampUTC | off | <- |
LogTypePlainText | on | off |
MaxBroadcatHistory | 99 | <- |
MaxBuffSize | 500000 | 10000 |
MaxComPort | 256 | <- |
MaximizedBugTweak | on | <- |
MaxOSCBufferSize | 4096 | <- |
Meta8Bit | off | <- |
MetaKey | off | <- |
MouseCursor | ibeam | <- |
MouseEventTracking | on | <- |
MouseWheelScrollLine | 3 | <- |
NonblinkingCursor | off | <- |
NormalizeLineBreakOnPaste | off | <- |
NotifyClipboardAccess | on | <- |
Parity | none | <- |
PassThruDelay | 3 | <- |
PassThruPort |  | <- |
PasteDelayPerLine | 10 | <- |
PasteDialogSize | 330,220 | <- |
PcBoldColor | on | off |
PopupMenu | off | <- |
Port | tcpip | <- |
PrinterCtrlSequence | on | <- |
PrnConvFF | off | <- |
PrnFont |  | <- |
PrnMargin | 50,50,50,50 | <- |
QVLog | off | <- |
QVWinSize | 8 | <- |
RussClient | Windows | <- |
RussFont | Windows | <- |
RussHost | Windows | KOI8-R |
RussKeyb | Windows | <- |
RussPrint | Windows | <- |
SaveVTWinPos | off | <- |
ScpSendDir |  | <- |
ScrollBuffSize | 10000 | 100 |
ScrollThreshold | 12 | <- |
ScrollWindowClearScreen | on | <- |
SelectOnActivate | on | <- |
SelectOnlyByLButton | on | <- |
Send8BitCtrl | off | <- |
SendBreakTime | 1000 | <- |
StartupMacro |  | <- |
StopBit | 1 | <- |
StrictKeyMapping | off | <- |
TabStopModifySequence | on | <- |
TCPCRSend |  | <- |
TCPLocalEcho | off | <- |
TCPPort | *1 | *2 | *1 by the installer *2 value of TelPort
TEKColor | 0,0,0,255,255,255 | <- |
TEKColorEmulation | off | <- |
TEKFont | * | Courier,0,-13,0 | * by the installer
TEKGINMouseCode | 32 | <- |
TEKIcon | Default | <- |
TEKPos | -2147483648,-2147483648 | <- |
TEKPPI | 0,0 | <- |
TelAutoDetect | on | <- |
TelBin | off | <- |
TelEcho | off | <- |
TelKeepAliveInterval | 300 | <- |
TelLog | off | <- |
Telnet | on | <- |
TelPort | 23 | <- |
TerminalID | VT100 | <- |
TerminalSize | 80,24 | <- |
TerminalSpeed | 38400 | <- |
TerminalUID | FFFFFFFF | <- |
TermIsWin | on | off |
TermType | xterm | <- |
Title | Tera Term | <- |
TitleFormat | 13 | <- |
TitleReportSequence | empty | <- |
TransBin | off | <- |
TranslateWheelToCursor | on | <- |
TrimTrailingNLonPaste | off | <- |
UILanguageFile | * | lang\\Default.lng | * by the installer
UnicodeToDecSpMapping | 3 | <- |
UnknownUnicodeCharacterAsWide | off | <- |
URLColor | 0,255,255,0,0,0 | 0,255,0,255,255,255 |
URLUnderline | on | <- |
UseNormalBGColor | on | off |
UseTextColor | off | <- |
Version | 2.3 | * | * not used
ViewlogEditor | * | <- | * full path of notepad.exe in Windows folder
VTBlinkColor | 255,0,0,0,0,0 | 255,0,0,255,255,255 |
VTBoldColor | 255,255,0,0,0,0 | 0,0,255,255,255,255 |
VTColor | 255,255,255,0,0,0 | 0,0,0,255,255,255 |
VTCompatTab | off | <- |
VTFont | * | Terminal,0,-13,1 | * by the installer
VTFontSpace | 0,0,0,0 | <- |
VTIcon | Default | <- |
VTPos | -2147483648,-2147483648 | <- |
VTPPI | 0,0 | <- |
VTReverseColor | 0,0,0,255,255,255 | 255,255,255,0,0,0 |
Wait4allMacroCommand | off | <- |
WaitCom | off | <- |
WindowCtrlSequence | on | <- |
WindowMenu | on | <- |
WindowReportSequence | on | <- |
XmodemBin | on | <- |
XmodemLog | off | <- |
XmodemOpt | checksum | <- |
XmodemRcvCommand |  | <- |
XmodemTimeouts | 10,3,10,20,60 | <- |
Xterm256Color | on | <- |
YmodemLog | off | <- |
YmodemRcvCommand |  | rb |
YmodemTimeouts | 10,3,10,20,60 | <- |
ZmodemAuto | off | <- |
ZmodemDataLen | 1024 | <- |
ZmodemEscCtl | off | <- |
ZmodemLog | off | <- |
ZmodemRcvCommand | rz | <- |
ZmodemTimeouts | 10,0,10,3 | <- |
ZmodemWinSize | 32767 | <- |

TTSSH

item | Default of setup file | Default of program | Note
AuthBanner | 1 | <- |
CheckAuthListFirst | 0 | <- |
CipherOrder | MLK>H:J=G9I<F8C7D;EB30A@?62 | <- |
CompOrder | 3210 | <- |
Compression | 0 | <- |
DefaultAuthMethod | 3 | <- |
DefaultForwarding |  | <- |
DefaultRhostsHostPrivateKeyFile |  | <- |
DefaultRhostsLocalUserName |  | <- |
DefaultRSAPrivateKeyFile |  | <- |
DefaultUserName |  | <- |
DefaultUserType | 1 | <- |
DisablePopupMessage | 0 | <- |
Enabled | 1 | 0 |
ForwardAgent | 0 | <- |
ForwardAgentConfirm | 1 | <- |
GexMinimalGroupSize | 0 | <- |
HeartBeat | 60 | <- |
HostKeyOrder | 4567230 | <- |
KexOrder | 567:9843210 | <- |
KnownHostsFiles | ssh_known_hosts | <- |
LogLevel | 0 | <- |
MacOrder | @?:861>5;20<=34 | <- |
ProtocolVersion | 2 | <- |
RememberPassword | 1 | <- |
SSHIcon | Default | <- |
UpdateHostkeys | 0 | <- |
VerifyHostKeyDNS | 0 | 1 |
WriteBufferSize | 2097152 | <- |
X11Display |  | <- |

TTProxy

item | Default of setup file | Default of program | Note
ConnectionTimeout | "10" | <- |
SocksResolve | "auto" | <- |
TelnetConnectedMessage | "-- Connected to " | <- |
TelnetErrorMessage | "!!!!!!!!" | <- |
TelnetHostnamePrompt | ">> Host name: " | <- |
TelnetPasswordPrompt | "Password:" | <- |
TelnetUsernamePrompt | "Username:" | <- |

TTXKanjiMenu

item | Default of setup file | Default of program | Note
UseOneSetting | on | <- |

TTXttyrec

item | Default of setup file | Default of program | Note
RecordStartSize | on | <- |

TTXRecurringCommand

item | Default of setup file | Default of program | Note
Command |  | <- |
Enable | off | <- |
Interval | 300 | <- |


Miscellaneous (Tera Term setup file)

Beep sound on connection

To enable a beep sound which is made when a TCP/IP connection is established and when the connection is terminated, edit the BeepOnConnect line in the [Tera Term] section of the setup file like the following:

BeepOnConnect=on

Default:
BeepOnConnect=off

Executing a macro on startup

A macro can be executed automatically when Tera Term is started. You can specify the macro filename by using the command line option " /M=<macro file>" or by editing the StartupMacro line in the [Tera Term] section of the setup file like the following:

StartupMacro=<macro file>

Default:
StartupMacro=

User interface language file

To switch the display language, specify user interface language file that includes the message.

UILanguageFile=lang\Japanese.lng

Default:
UILanguageFile=

Number for the history of broadcast command

If you configure the number for the history of broadcast command, you need to set up MaxBroadcatHistory entry in the 'teraterm.ini' file. See example of this value below.

MaxBroadcatHistory=200

Default:
MaxBroadcatHistory=99

Mouse wheel action in application cursor mode

Basically, Tera Term window scrolls up and scrolls down when a user rotates the mouse wheel. However, Tera Term would send key sequences of up and down cursor when the application cursor mode is enabled by starting vi or less command.

To disable this feature, edit the TranslateWheelToCursor line in the [Tera Term] section of the setup file like the following:

TranslateWheelToCursor=off

If a user wants to disable this feature while pushing the control key, edit the DisableWheelToCursorByCtrl line in the [Tera Term] section of the setup file like the following:

DisableWheelToCursorByCtrl=on

Default:
TranslateWheelToCursor=on
DisableWheelToCursorByCtrl=on

Showing "New Connection" dialog on startup

Tera Term shows "New Connection" dialog on startup when the port type is TCP/IP. (The dialog is not shown when the port type is Serial).
If you do not want to show this dialog, please change HostDialogOnStartup entry of [Tera Term] section as follows.

HostDialogOnStartup=off

Default:
HostDialogOnStartup=on

Enable paste by clicking the middle button of mouse

In order to enable paste by clicking the middle button of mouse, change the DisablePasteMouseMButton line at [Tera Term] section of the setup file like the following:

DisablePasteMouseMButton=off

Default:
DisablePasteMouseMButton=on

Disable "New connection" menu

In order to disable "New connection" menu, change the DisableMenuNewConnection line at [Tera Term] section of the setup file like the following:

DisableMenuNewConnection=on

Default:
DisableMenuNewConnection=off

Disable "Duplicate session" menu

In order to disable "Duplicate session" menu, change the DisableMenuDuplicateSession line at [Tera Term] section of the setup file like the following:

DisableMenuDuplicateSession=on

Default:
DisableMenuDuplicateSession=off

Disable "Send break" menu

In order to disable "Send break" menu, change the DisableMenuSendBreak line at [Tera Term] section of the setup file like the following:

DisableMenuSendBreak=on

Default:
DisableMenuSendBreak=off

Clear the screen when disconnected

In order to clear the screen, change the ClearScreenOnCloseConnection line at [Tera Term] section of the setup file like the following:

ClearScreenOnCloseConnection=on

Default:
ClearScreenOnCloseConnection=off

Disable accelerator key of New Connection

In order to disable accelerator key of "New Connection", change the AcceleratorNewConnection line at [Tera Term] section of the setup file like the following:

AcceleratorNewConnection=off

Default:
AcceleratorNewConnection=on

Disable accelerator key of Duplicate session

In order to disable accelerator key of "Duplicate session", change the DisableAcceleratorDuplicateSession line at [Tera Term] section of the setup file like the following:

DisableAcceleratorDuplicateSession=on

Default:
DisableAcceleratorDuplicateSession=off

Disable accelerator key of Cygwin connection

In order to disable accelerator key of "Cygwin connection", change the AcceleratorCygwinConnection line at [Tera Term] section of the setup file like the following:

AcceleratorCygwinConnection=off

Default:
AcceleratorCygwinConnection=on

A browser by using Clickable URL

When the clickable URL is enabled, the default browser will be launched.
If a user can specify the browser and the argument, change the ClickableUrlBrowser and the ClickableUrlBrowserArg entries at [Tera Term] section in the following:

ClickableUrlBrowser=firefox
ClickableUrlBrowserArg=-new-tab

ClickableUrlBrowser=opera
ClickableUrlBrowserArg=-newpage

ClickableUrlBrowser=iexplore
ClickableUrlBrowserArg=

ClickableUrlBrowser=chrome
ClickableUrlBrowserArg=

Default:
ClickableUrlBrowser=
ClickableUrlBrowserArg=

URL string concatenated of split line

When the end of URL string continues to the next line, basically the whole string is recognized as a URL string. However, when the carriage return is inserted into the URL string by the end of a line, the whole string can not work well.
The URL string split by a carriage return can work well to configure the JoinSplitURL entry of the [Tera Term] section in the teraterm.ini file.

JoinSplitURL=on

By using the emacs editor, a special character will be displayed at the end of the line when the line continues to next line. If this character is recognized with a part of URL string, the whole string can not work well with the URL format.
So, Tera Term can ignore the special character to configure the JoinSplitURLIgnoreEOLChar entry of the [Tera Term] section in the teraterm.ini file.

JoinSplitURLIgnoreEOLChar=

Also, the emacs editor can change the special character to other character.
When the character is changed, a user configures the JoinSplitURLIgnoreEOLChar entry of the [Tera Term] section in the following:

JoinSplitURLIgnoreEOLChar=|

Default:
JoinSplitURL=off
JoinSplitURLIgnoreEOLChar=\

Exclusive-lock log file

When a log file is opened in written mode, the file will be locked exclusively. So, the log file can not be opened by multiple processes.
When this option is disabled, a user can open a log file while Tera Term is opening the file.

LogLockExclusive=off

Default:
LogLockExclusive=on

Deferred log write mode

The log file is written on the thread procedure to avoid Tera Term slows down when the log file is recorded on the network drive.

DeferredLogWriteMode=off

Default:
DeferredLogWriteMode=on

Specify timestamp format at the start of log file's line

When the log file is written, the timestamp can be added at the start of line and the timestamp format can be specified.

SYNOPSIS:
%a      Abbreviated weekday name
%b      Abbreviated month name
%d      Day of month as decimal number (01 - 31)
%e      Day of month as decimal number ( 1 - 31)
%H      Hour in 24-hour format (00 - 23)
%N      Milisecond as decimal number (000 - 999)
%m      Month as decimal number (01 - 12)
%M      Minute as decimal number (00 -  59)
%S      Second as decimal number (00 - 59)
%w      Weekday as decimal number (0 - 6; Sunday is 0)
%Y      Year with century, as decimal number
%%      Percent sign

Example:
; Sun Jun  4 21:12:40.123 2017
LogTimestampFormat=%a %b %e %H:%M:%S.%N %Y

Default:
; 2017-06-04 21:12:40.123
LogTimestampFormat=%Y-%m-%d %H:%M:%S.%N

UTC is used as timestamp at the start of log file's line

When the log file is written, the timestamp can be added at the start of log file's line. Basically, local time is used.
When local time is used for summer time, the clock will go or back at summer time switching. So, unexpected clock will be recorded.
Fortunately, this problem can be avoided because UTC timestamp does not support summer time.
If UTC timestamp is used instead of local time, change the LogTimestampUTC entry of [Tera Term] section in the following:

LogTimestampUTC=on

Default:
LogTimestampUTC=off

High DPI Aware

The High DPI feature is experimentally supported. Tera Term works as the Per-monitor DPI Aware application when "DPIAware=on" entry is set at [Tera Term] section of the setup file like the following:

DPIAware=on

Without the entry, Tera Term works as the DPI Unaware application as before. In the future release, it may automatically work as the Per-monitor DPI Aware application and, may ignore "DPIAware=on" entry.

Scaling results become smooth when you choose a TrueType font for the Font.

High DPI aware has some modes. For more reference, see the DPI AwarenessMode section on the High DPI Desktop Application Development on Windows DPI AwarenessMode.

Tera Term is using the Per-monitor DPI awareness V2 feature that is supported on the Windows 10 Version 1703 or later. For more details of the Per-monitor DPI awareness V2, see the High-DPI Scaling Improvements for Desktop Applications in the Windows 10 Creators Update (1703).


Printing (Tera Term setup file)

Delay of path-through printing

You can set the delay of pass-through printing. A pass-through sequence is initiated by ESC[5i and terminated by ESC[4i. The received data between ESC[5i and ESC[4i are printed when the delay time has passed since Tera Term received ESC[4i. If the second ESC[5i is received before the delay of the first pass-through sequence has passed, the first and second printing data are combined and printed at once after the delay of the second sequence has passed. Namely, multiple consecutive sequences with intervals less than the delay are treated as one printing sequence. To change the delay of pass-through printing, edit the PassThruDelay line in the [Tera Term] section of the setup file like the following:

PassThruDelay=<delay in sec>

Default:
PassThruDelay=3

Path-through printing directly to a port

You can send the data of pass-through printing to a port by editing the PassThruPort line in the [Tera Term] section of the setup file like the following:

PassThruPort=<port>

The <port> string specifies a port to which data is sent. The format of <port> string is the same as that of the MS-DOS "mode" command. If no port is specified, Tera Term prints the data by using Windows printing functions.

Example:
  PassThruPort=LPT1
  PassThruPort=COM2: 9600,n,8,1,x

Default:
PassThruPort=

For Russian mode, you should see also Russian code set of the printer font

Disabling the printing by the control sequence

You can disable the which invoked by the control sequence. To do this, edit the PrinterCtrlSequence line in the [Tera Term] section of the setup file like the following:

PrinterCtrlSequence=off

Default:
PrinterCtrlSequence=on

Disabling the form-feed in the path-through printing

You can disable the form-feed (moving to the next paper) which is caused by an FF character in the pass-through printing. To do this, edit the PrnConvFF line in the [Tera Term] section of the setup file like the following:

PrnConvFF=on

Then, the FF character causes the carriage-return and line-feed instead of the form-feed.

Note: This option is ignored for the direct pass-through printing.

Default:
PrnConvFF=off

Printer font

In the default setup, the font used for printing is the same as one for displaying text on the screen. You can specify a font for printing, by doing the following procedure:

  1. Change the font for displaying text by using the [Setup] Font command and print text.
  2. If you find a nice font for printing, save the current setup to the setup file by using the [Setup] Save setup command.
  3. In the [Tera Term] section of the setup file, copy parameters of the VTFont line (for example "Terminal,0,13,1") to the PrnFont line.
  4. Restore the font for displaying text.
Example:
PrnFont=Terminal,0,13,1

Default:
PrnFont=

For Russian mode, you should see also Russian code set of the printer font

Page margins

You can specify the left, right, top and bottom margins of a page for printing by editing the PrnMargin line in the [Tera Term] section of the setup file like the following:

PrnMargin=<left>,<right>,<top>,<bottom>

These margins should be specified in unit of 1/100 inches.

Default:
PrnMargin=50,50,50,50

Scaling factors for printing

When a printed image is too small or too large, usually you can enlarge or shrink the image by changing the scaling factor in the "Printer" section of Control Panel. If the printer driver does not support scaling, you can specify scaling factors for horizontal and vertical directions. To specify scaling factors, edit the VTPPI and TEKPPI lines in the [Tera Term] section of the setup file:

VTPPI=<x(horizontal), y(vertical); pixels per inch)>    ; for the VT window
TEKPPI=<x(horizontal), y(vertical); pixels per inch)>   ; for the TEK window

The scaling factors should be specified in unit of pixels per inch. If the printed image is too small (large), increase (decrease) the scaling factors. If at least one of the specified factor is zero, Tera Term takes the default scaling factors from the printer driver.

Example:
VTPPI=300,300
TEKPPI=300,300

Default:
VTPPI=0,0
TEKPPI=0,0

Russian code set of the printer font (Russian mode only)

When you specify a printer font or a printer device, you should specify also the character set for the printer font or device. Otherwise, Russian characters may not be printed correctly. To specify the character set, edit the RussPrint line in the [Tera Term] section of the setup file like the following:

RussFont=<char set>

where <char set> should be one of the following:
  Windows
  KOI8-R
  CP-866
  ISO-8859-5

Default:
RussPrint=Windows


TTSSH (Tera Term setup file)

How to display authentication banner

When SSH authentication is used, the SSH_MSG_USERAUTH_BANNER message may be sent from server.
Basically, this message is shown on VT window. If display method is changed, please change AuthBanner entry of [TTSSH] section in the following:

AuthBanner=<Display Method>

The display method can be specified from 0 to 3. Meaning of each value in the following:

Value | Action
0 | No display
1 | Display in VT window
2 | Display by pop-up
3 | Display by balloon tip
Default:
AuthBanner=1

Suppressing message box

When Tera Term is automated by using macro or non-logon and the error and warning is occurred, the message box will be shown. Next, Tera Term waits user operation and the procedure can not be continued.
To prevent this problem, the message box can be suppressed.

DisablePopupMessage=<Display Method>

The display method can be specified with 0 or 1. Meaning of each value is as follows.

Value | Action
0 | Not suppress pop-up window
1 | Suppress pop-up window
Default:
DisablePopupMessage=0

Minimum group size for Diffie-Hellman Group Exchange

When Diffie-Hellman Group Exchange(diffie-hellman-group-exchange-sha*) is used for key exchanging method, SSH client some requests of 'Minimum size', 'Proposed size' and 'Maximum size' regarding group to server.
As described below, current TTSSH sends 2048 as minimum size to server. When the group size sent from server is smaller than the minimu size, TTSSH shows the confirmation dialog whether the connection continues.

When the GexMinimalGroupSize entry of [TTSSH] section is changed below, the minimum size of group requesting to server.

GexMinimalGroupSize=<Minimum size of group>

The minimum size of group can be specified with 0 and 1024 to 8192.
When the value is 0, TTSSH uses the optimal value. Current TTSSH sends 2048 in accordance with RFC 8270. The value will be changed in the future.
When the value is specified from 1024 to 8192, the value is used necessarily.

Default:
GexMinimalGroupSize=0

Log Level

The log level can be specified that TTSSH records to TTSSH.LOG file.

LogLevel=<Value>

Value | Action
0 | Invalid
5 | FATAL
10 | ERROR
30 | WARNING
50 | NOTICE
80 | INFO
100 | VERBOSE
200 | SSHDUMP
Default:
LogLevel=0

Destination display for X11 transfer

When destination display for X11 transfer is specified, please change the X11Display entry of [TTSSH] section in the following.

X11Display=<Display specification>

The display specification can be used as X11 normal format([<host>]:[<display number>[.<screen number>]). When the X11Display is not any specified _empty string_, the DISPLAY environment variable is enabled and the value is used. The environment variable is disable and the localhost:0.0 is used.

This configuration is overwitten with /ssh-X command line option. The configuration priority is as follows.

  1. /ssh-X command line option
  2. X11Display entry of [TTSSH] section
  3. DISPLAY environment variable
  4. localhost:0.0
Default:
X11Display=


Terminal emulation (Tera Term setup file)

Back wrap

If you enables the back wrap, the cursor at the beginning of a line moves back to the end of previous line when a BS character is received. To enable the back wrap, edit the BackWrap line in the [Tera Term] section of the setup file like the following:

BackWrap=on

Default:
BackWrap=off

The motion receiving BEL character

Tera Term will sound the beep when the BEL character(ASCII $07) receives.

You can disable the beep sound for the BEL character by editing the Beep line in the [Tera Term] section of the setup file like the following:

Beep=off

Also, the terminal screen will flush instead of sounding the beep in the following configuration.

Beep=visual

Default:
Beep=on

Disabling the C1 (ASCII $80-$9F) control characters

If you choose the Terminal ID to be "VT2XX" or "VT3XX" in the [Setup] Terminal dialog box, characters in range of ASCII $80-$9F are interpreted as the C1 control characters.

You can disable this interpretation and make these characters visible on the screen (if you are using a font which supports these characters), by editing the Accept8BitCtrl line in the [Tera Term] section of the setup file like the following:

Accept8BitCtrl=off

Default:
Accept8BitCtrl=on

Send C1 (ASCII $80-$9F) control characters

When sending C1 control characters, Tera Term uses equivalent 7-bit sequences.

To send C1 control characters as single 8-bit characters, edit the Send8BitCtrl line in the [Tera Term] section of the setup file like the following:

Send8BitCtrl=on

Note: This setting is used only as default setting. Host can change this setting by S7C1T / S8C1T / DECSCL control sequence.

Default:
Send8BitCtrl=off

Displaying all received characters

To display all received characters (including control characters) on the screen, edit the Debug line in the [Tera Term] section of the setup file like the following:

Debug=on

If you press Shift+Esc, Tera Term enters the debug mode, in which all received characters are displayed on the screen. The debug mode have four pattern, a user can switch from output as usual to disable output completely.

  • output as usual -> usual teraterm debug mode -> hex output -> disable output completely

If you select the output as usual in the debug mode, Tera Term returns to the normal mode.

In the debug mode, received characters are displayed by the following way:

ASCII code of the character    Displaying form
$00 - $1F                      ^@ - ^_
                               ($00=^@ $01=^A $02=^B $03=^C $04=^D $05=^E $06=^F $07=^G
                                $08=^H $09=^I $0A=^J $0B=^K $0C=^L $0D=^M $0E=^N $0F=^O
                                $10=^P $11=^Q $12=^R $13=^S $14=^T $15=^U $16=^V $17=^W
                                $18=^X $19=^Y $1A=^Z $1B=^[ $1C=^\ $1D=^] $1E=^^ $1F=^_)
$20 - $7E                      normal character
$7F                            <DEL>
$80 - $FF                      MSB of the ASCII code is turned to be 0 and displayed by
                               the same way as one for $00-$7F characters,
                               except that text is displayed in the reversed color.

In the hex output mode, received characters are displayed by the following way:

ASCII code of the character    Displaying form
$00 - $FF                      hex format(capital letters) separated by a space

Default:
Debug=off

Disabling the status line

To disable the status line functions of VT terminal, edit the EnableStatusLine line in the [Tera Term] section of the setup file like the following:

EnableStatusLine=off

Then, escape sequences for the status line functions are ignored.

Default:
EnableStatusLine=on

Mouse code in TEK GIN report

In TEK GIN mode, the cross hair cursor appears in the TEK window. When you press a key or click the left mouse button, the key code (ASCII code) is sent with the coordinate of the cursor.

You can change the key code for the left mouse button by editing the TEKGINMouseCode line in the [Tera Term] section of the setup file like the following:

TEKGINMouseCode=<key code>

Default:
TEKGINMouseCode=32
(ASCII code 32 corresponds to the space character.)

Displaying tab at end of line like VT terminal

If you set 'on', the behavior of tab at end-of-line is the same as VT/PuTTY/xterm. The tab doesn't cause automatic linefeed.
If you set 'off', the behavior of tab at end-of-line is the same as FreeBSD console(syscons). The tab causes automatic linefeed. (it is not compatible with VT)

VTCompatTab=on

Default:
VTCompatTab=off

Scroll down the current buffer when the screen is clear

<ESC>[J (Erase Below) escape sequence equals <ESC>[2J (Erase All) when the current cursor is top left (0, 0).
A user can configure whether the current buffer scrolls down when the screen is clear.

If this configuration value is on, the current buffer will scroll down as well as <ESC>[2J escape sequence.
If this configuration value is off, the current buffer will not scroll down. Instead, some buffers from the cursor position to the end of the screen.

Default:
ScrollWindowClearScreen=on

Display unsupported Unicode character as wide character

When the received KANJI code is UTF-8 or UTF-8m, a user can configure the behavior of the Unicode characters which Tera Term does not support as the pure Unicode.
If this configuration value is on, the unsupported Unicode character is displayed as "??".
If this configuration value is off, the unsupported Unicode character is displayed as "?".

Default:
UnknownUnicodeCharacterAsWide=off

Mapping of Unicode to DEC special character

Tera Term in Japanese mode will display a ruled line and some symbols as 2-columns wide. However, some host applications may assume these characters will be displayed as 1-column wide character which results in incorrect display image.
In addition, a ruler may be displayed by using +-| and some unsupported characters may be displayed as ?? in English mode.
Tera Term can be configured to display these characters by similar code of DEC special characters (if any exists) to minimize the incorrect display image.
However this feature causes a side effect that characters selected by mouse will be copied as different characters in a clipboard.
This configuration takes effect only when received Kanji code are either UTF-8 or UTF-8.

Some mapping characters are categorized into several groups and you can specify each group to be converted or not.
If a user configures this option, please specify the sum value of the converting character at UnicodeToDecSpMapping entry.

Type A: Rule marks
Value: 1
  Box drawings (U+2500-U+257F)

Type B: The character that is displayed "??" up to version 4.58
(it includes undisplayed characters in English environment).

Value: 2
  Bullet (U+2022)
  Hyphenation point (U+2027)
  Light shade (25%) (U+2591)
  Medium shade (50%) (U+2592)
  Dark shade (75%) (U+2593)
  Black small square (U+25AA)
  Black vertical rectangle (U+25AE)
  Black very small square (U+2B1D)

Type C: The character that is displayed as bullet(wide character)
in Japanese environment, and is displayed as Middle dot in English environment.

NOTICE: A user is recommended to not specifying this option unless in Japanese environment.

Value: 4
  Middle dot (U+00B7)
  One dot leader (U+2024)
  Bullet operator (U+2219)

Default:
# Type A and B
UnicodeToDecSpMapping=3

Mapping of the function key

A use can change the default action of the function key and the editor keypad from Tera Term 4.62. When a user can use this feature, the key sequence like as the VT terminal sends to the server without the keyboard configuration file.

If a user disables the function key action in the keyboard configuration file and sends nothing to the server, please change the StrictKeyMapping entry in teraterm.ini file in the following:

StrictKeyMapping=on

The default value:
StrictKeyMapping=off

MSB set character sending with Alt key

To send MSB(Most Significant Bit) set character by using the Alt key, a user should modify Meta8Bit line of [Tera Term] section in a configuration file as follows

Meta8Bit=raw

To send MSB(Most Significant Bit) set character by using the Alt key with a conversion to transmission character code (e.g. UTF-8), a user should modify Meta8Bit line of [Tera Term] section in a configuration file as follows

Meta8Bit=text

Also, the user should enable the Meta Key setting.

default:
Meta8Bit=off

Disabling the alternate screen buffer

Tera Term 4.65 later version supports for the alternate screen buffer. An old screen is restored when the application such as Vim and less exits.

To disable the alternate screen buffer functions, edit the AlternateScreenBuffer line in the [Tera Term] section of the setup file like the following:

AlternateScreenBuffer=off

default:
AlternateScreenBuffer=on

Configure Terminal Unique ID

When the Tera Term receives the DA3 control sequence, the Tera Term replies the terminal unique ID. The ID is 8-digit hex value, the first 2-digit is the manufacture place and the remaining 6-digit is the unique number in the place.

If a user changes the ID to the 01234567, configure the TerminalUID entry in the teraterm.ini file as follows:

TerminalUID=01234567

Default:
TerminalUID=FFFFFFFF

Changing Terminal Unique ID

Basically, the terminal unique ID can be changed by receiving the DECSTUI control sequence. However, this feature is disabled.

When the feature is enabled, describe the LockTUID entry in the [Tera Term] section as follows:

LockTUID=off

Default:
LockTUID=on

Disabling tabstop modification

When the tabstop position can not be able to modify by the control sequence, configure below TabStopModifySequence entry in the [Tera Term] section of the teraterm.ini file.

TabStopModifySequence=off

Also, some control sequences can not be able to do. Enabling sequences of the tabstop control sequence are as follows:

Mnemonic | Sequence | Description
HTS7 | ESC H | Enables the tabstop at the cursor position(7bit form).
HTS8 | 0x88 | Enables the tabstop at the cursor position(8bit form).
HTS | - | Both HTS7 and HTS8.
TBC0 | ESC [ 0 g | Disabling the tabstop at the cursor position.
TBC3 | ESC [ 3 g | Disabling all tabstop.
TBC | - | Both TBC0 and TBC3.

For example, when 8bit-form tabstop sequence(HTS8) is disabled, configure below TabStopModifySequence entry in the [Tera Term] section of the teraterm.ini file.

TabStopModifySequence=HTS7,TBC

Default:
TabStopModifySequence=on

Limited BELL Over

When the BEL character(ASCII $07) is sent from the host server, Tera Term will generate a beep sound and blink a screen.

When a user shows the binary file by mistake and many BEL characters are sent, much beep sound can suppress automatically.
For example, when the BeepOverUsedTime, BeepOverUsedCount and BeepSuppressTime are below configured, the beep sound will be suppressed for ten seconds after five BEL characters are sent for two seconds.

BeepOverUsedTime=2
BeepOverUsedCount=5
BeepSuppressTime=10

Default:
BeepOverUsedTime=2
BeepOverUsedCount=5
BeepSuppressTime=5

OSC string buffer size

Tera Term will expand the buffer size of the OSC string when the buffer size is lack. However, when the remote host sends invalid OSC string by using the host bug, Tera Term will restrict the buffer size to prevent enlarged memory allocation.

When the OSC 52 (PASTE64) is used for burst data, the remote host data may be abandoned by above restriction.
So, a user can configure the OSC buffer size in the MaxOSCBufferSize entry of the teraterm.ini file.

MaxOSCBufferSize=16000

Default:
MaxOSCBufferSize=4096

Disabling ISO/IEC 2022 shift function

When character set switching by ISO/IEC 2022 shift is forbidden, please configure below setting on ISO2022ShiftFunction entry of [Tera Term] section in the teraterm.ini file.

ISO2022ShiftFunction=off

Also, specific entry can be disabled into ISO/IEC 2022 shift function. Please specify accepted function name's combination into below shift function.

Mnemonic | Code | Description
SI | 0x0F | Maps G0 character set into GL.
SO | 0x0E | Maps G1 character set into GL.
LS2 | ESC n | Maps G2 character set into GL.
LS3 | ESC o | Maps G3 character set into GL.
LS1R | ESC ~ | Maps G1 character set into GR.
LS2R | ESC } | Maps G2 character set into GR.
LS3R | ESC | | Maps G3 character set into GR.
SS2 | 0x8E / ESC N | Temporarily maps the G2 character set into GL or GR, for the next graphic character.
SS3 | 0x8F / ESC O | Temporarily maps the G3 character set into GL or GR, for the next graphic character.
ALL | - | All of the above
NONE | - | Nothing

For example, when Shift-In(SI) and Shift-Out(SO) is disabled, please configure below setting on the ISO2022ShiftFunction entry of [Tera Term] section in the teraterm.ini file.

ISO2022ShiftFunction=LS2,LS3,LS1R,LS2R,LS3R,SS2,SS3

Also, when '-' is added in the front of name, specified shift function can be disabled. The above Shift-In(SI) and Shift-Out(SO) is disabled to configure below setting.

ISO2022ShiftFunction=ALL,-SI,-SO

NOTE: When this format is specified, using function is replaced after configure saving.

Default:
ISO2022ShiftFunction=on


File transfer (Tera Term setup file)

Auto renaming of a received file to avoid overwriting

When a file is received by using the Kermit, Zmodem, BPlus or Quick-VAN protocol, the file name is given by the remote host. If the same file name already exists in the local disk, the existing file is overwritten by the received file. To avoid this overwriting, edit the AutoFileRename line in the [Tera Term] section of the setup file like the following:

AutoFileRename=on

Then, the received file is renamed automatically to avoid overwriting. For example, if the received file is "abc.txt" and the same file name already exists in the local disk, the received file is renamed to be "abc1.txt".

Default:
AutoFileRename=on

Auto activation of B-Plus Receive

To enable the auto activation of the B-Plus Receive command, edit the BPAuto line in the [Tera Term] section of the setup file like the following:

BPAuto=on

If you run the B-Plus Send command in the host, the B-Plus Receive command of Tera Term is automatically activated.

Default:
BPAuto=off

Escaping all control characters in the B-Plus protocol

To escape all control characters in the B-Plus file transfer, edit the BPEscCtl line in the [Tera Term] section of the setup file like the following.

BPEscCtl=on

Default:
BPEscCtl=off

B-Plus log

To log data packets of B-Plus to the file BPLUS.LOG, edit the BPLog line in the [Tera Term] section of the setup file like the following:

BPLog=on

Default:
BPLog=off

Kermit log

To log data packets of Kermit to the file KERMIT.LOG, edit the KmtLog line in the [Tera Term] section of the setup file like the following:

KmtLog=on

Default:
KmtLog=off

Kermit Long Packet

To transmit and receive extended-length packets of Kermit, edit the KmtLongPacket line in the [Tera Term] section of the setup file like the following:

KmtLongPacket=on

However, the kermit server must support this feature.

Default:
KmtLongPacket=off

Kermit File Attributes

To accept file attributes(size, type and timestamp, etc) of Kermit, edit the KmtFileAttr line in the [Tera Term] section of the setup file like the following:

KmtFileAttr=on

However, the kermit server must support this feature.

Default:
KmtFileAttr=off

XMODEM log

To log data packets of XMODEM to the file XMODEM.LOG, edit the XmodemLog line in the [Tera Term] section of the setup file like the following:

XmodemLog=on

Default:
XmodemLog=off

Receive command for XMODEM

You can automatically start the receipt of file by sending "a command for XMODEM receipt" to host immediately before transmitting a file. Specify a command for XMODEM receipt to be sent from Tera Term.

XmodemRcvCommand=rx

If not specified, " a command for XMODEM receipt" will not be sent.

default:
XmodemRcvCommand=

Timeout settings for XMODEM

XMODEM timeout value can be specified in seconds.

1st ... NAK mode: Timeout value for first packet
2nd ... CRC mode: Timeout value for first packet
3rd ... Timeout short time
4th ... Timeout long time
5th ... Timeout very long time

default:
XmodemTimeouts=10,3,10,20,60

Timeout settings for YMODEM

YMODEM timeout value can be specified in seconds.

1st ... NAK mode: Timeout value for first packet
2nd ... CRC mode: Timeout value for first packet
3rd ... Timeout short time
4th ... Timeout long time
5th ... Timeout very long time

default:
YmodemTimeouts=10,3,10,20,60

Auto activation of ZMODEM Receive / Send

To enable the auto activation of the ZMODEM Receive / Send command, edit the ZmodemAuto line in the [Tera Term] section of the setup file like the following:

ZmodemAuto=on

If you run the ZMODEM Send command at the host, the ZMODEM Receive command of Tera Term is automatically activated.
When ZMODEM receiving(upload) command of remote host is executed, the file selection dialog of ZMODEM sending is opened.

Default:
ZmodemAuto=off

Parameters for ZMODEM sending

You can change the ZMODEM parameters for sending by editing the ZmodemDataLen and ZmodemWinSize lines in the [Tera Term] section of the setup file like the following:

ZmodemDataLen=<data sub packet length in bytes>
ZmodemWinSize=<window size for sending in bytes>

Note that these parameters does not affect ZMODEM receiving.

The maximum data sub packet length is 1024. Usually the larger packet length causes the faster sending speed.

The maximum window size is 32767. Usually the larger window size causes the faster sending speed. If you want to set the window size to infinity, specify a minus value (e.g. -1).

If the communication line has problems in the flow control or error correction, or the data processing power of the host is extremely low, decreasing the packet length or window size may improve speed and stability of file sending.

Default:
ZmodemDataLen=1024
ZmodemWinSize=32767

NOTICE: Please specify the ZmodemDataLen=128 at the Allied Telesis router.

Escaping all control characters in the ZMODEM protocol

To escape all control characters in the ZMODEM file transfer, edit the ZmodemEscCtl line in the [Tera Term] section of the setup file like the following:

ZmodemEscCtl=on

Default:
ZmodemEscCtl=off

ZMODEM log

To log data packets of ZMODEM to the file ZMODEM.LOG, edit the following line in the [Tera Term] section of the setup file like the following:

ZmodemLog=on

Default:
ZmodemLog=off

Receive command for ZMODEM

You can automatically start the receipt of file by sending "a command for ZMODEM receipt" to host immediately before transmitting a file. Specify a command for ZMODEM receipt to be sent from Tera Term.

If not specified, " a command for XMODEM receipt" will not be sent.

ZmodemRcvCommand=

default:
ZmodemRcvCommand=rz

Timeout settings for ZMODEM

ZMODEM timeout value can be specified in seconds.

1st ... Timeout value for serial port
2nd ... Timeout value for TCP/IP port
3rd ... Timeout value for initial packet
4th ... Timeout value for final packet

default:
ZmodemTimeouts=10,0,10,3

File name filter for send file dialog

To apply user define filter for "types of file" on send file dialog, edit the following line in the [Tera Term] section of the setup file like the following:

FileSendFilter=*.txt;a.log

default:
FileSendFilter=

Confirmation of File Transfer by Drag & Drop

Tera Term displays a message box to confirm the file transfer operation when a file is dragged and dropped in a window as a default. If ConfirmFileDragAndDrop line in "Tera Term" section of setup file is modified as follows, a file transfer will be started without a confirmation.

ConfirmFileDragAndDrop=off

default:
ConfirmFileDragAndDrop=on

File Transfer Dialog is hidden

Basically, the transferring progress dialog is shown when a file is sent. If a user wants to hide the dialog, please change the FTHideDialog entry of the [Tera Term] section in the following:

FTHideDialog=on

default:
FTHideDialog=off

High Speed File Transfer on Serial Connection

Basically, the file content is sent as one byte at a time.
However, the transfer speed will be slow because of byte by byte.
The file content is sent as 8KB at at time on the special condition to resolve the performance problem.

Condition:
Serial connection
Binary flag on
Not Bracketed Paste Mode
Telnet flag off
LocalEcho off
Speed 115200 over

If this feature is always disabled, please change the FileSendHighSpeedMode entry of the [Tera Term] section in the teraterm.ini file.

FileSendHighSpeedMode=off

This feature applies to the file transfer by the [File]-[Send file...].
Also, the feature does not apply to the [File]-[Transfer] and the SSH SCP.

default:
FileSendHighSpeedMode=on


Window (Tera Term setup file)

Disabling auto text copying

If you select text by mouse, it is copied to the clipboard at the same time. To disable the auto text copying, edit the AutoTextCopy line in the [Tera Term] section of the setup file like the following:

AutoTextCopy=off

Default:
AutoTextCopy=on

Delimiters of a word selected by double clicking

You can select a word by double clicking it with the left mouse button. You can specify delimiter characters for the word selection by editing the DelimList line in the [Tera Term] section of the setup file like the following:

DelimList=<delimiter characters>

For example:

DelimList=<>()[]

specifies 6 delimiter characters "<", ">", "(", ")", "[" and "]". Note that the space and "$" characters should be specified as "$20" and "$24":

DelimList=$20    ; space character

Default:
DelimList=$20!"#$24%&'()*+,-./:;<=>?@[\]^`{|}~

In the DelimList line, only singe-byte code characters can be specified. Double-byte code characters (Japanese kanji) are regarded as delimiters. You can make them be non-delimiters by editing the DelimDBCS line like the following:

DelimDBCS=off

Default:
DelimDBCS=on

If you prefer the word selection behavior of earlier Tera Term versions, specify like the following:

DelimList=$20
DelimDBCS=off

Disabling the pop-up menu

When the menu bar is hidden, clicking the left mouse button while pressing the Ctrl key causes the pop-up menu to appear. To disable the pop-up menu, edit the EnablePopupMenu line in the [Tera Term] section of the setup file like the following:

EnablePopupMenu=off

Default:
EnablePopupMenu=on

Hiding the "Show menu bar" command

When the menu bar is hidden, the "Show menu bar" command appears in the system menu. To hide the "Show menu bar" command, edit the EnableShowMenu line in the [Tera Term] section of the setup file like the following:

EnableShowMenu=off

Default:
EnableShowMenu=on

Disabling the language mode selection

To disable the language mode selection in the [Setup] General dialog box, edit the LanguageSelection line in the [Tera Term] section of the setup file like the following:

LanguageSelection=off

Default:
LanguageSelection=on

Maximum scroll buffer size

You can change the maximum scroll buffer size, which can be specified in the [Setup] Window dialog box, by editing the MaxBuffSize line in the [Tera Term] section of the setup file like the following:

MaxBuffSize=<number of lines>
    (should be less than or equal to 500000)

Note: Tera Term consumes <scroll buffer size> * <terminal width> * 5 bytes of memory for the scroll buffer.

Default:
MaxBuffSize=10000

Nonblinking cursor

You can make the cursor nonblinking by editing the NonblinkingCursor line in the [Tera Term] section of the setup file like the following:

NonblinkingCursor=on

Default:
NonblinkingCursor=off

Maximum number of lines to move in a jump scrolling

To change the maximum number of lines to move in a jump scrolling, edit the ScrollThreshold line in the [Tera Term] section of the setup file like the following:

ScrollThreshold=<number of lines>

Default:
ScrollThreshold=12

Disabling text selection when the window is activated by mouse

When the window is inactive, you can activate the window by clicking the text area of window. In the default setup, the text selection is started by this mouse clicking at the same time. To disable the text selection when the window is activated by mouse, edit the SelectOnActivate line in the [Tera Term] section of the setup file like the following:

SelectOnActivate=off

Default:
SelectOnActivate=on

Title format

To change the title format, edit the TitleFormat line in the [Tera Term] section of the setup file like the following:

You can change the key code for the left mouse button by editing the TEKGINMouseCode line in the [Tera Term] section of the setup file like the following:

TitleFormat=<format ID>

<format ID> is an integer value. It is treated as bit string.

1st bit (1) | Displays tcp hostname or serial port number
2nd bit (2) | Displays session No.
3rd bit (4) | Displays VT/TEK
4th bit (8) | Displays <host/port> first
5th bit (16) | Displays TCP port number
6th bit (32) | Displays the speed of serial port

Examples of <format ID> are shown as follows.

Format ID   Title format
0           <title>
1           <title> - <host/port>
2           <title> (session no.)
3           <title> - <host/port> (session no.)
4           <title> VT/TEK
5           <title> - <host/port> VT/TEK
6           <title> (session no.) VT/TEK
7           <title> - <host/port> (session no.) VT/TEK
13          <host/port> - <title> VT/TEK
29          <host:tcpport/port> - <title> VT/TEK
45          <host/port:bps> - <title> VT/TEK
61          <host:tcpport/port:bps> - <title> VT/TEK

Default:
TitleFormat=5

Actual colors of "white" and "black" colored text

The escape sequences "<ESC>[37m" and "<ESC>[30m" make the text color white and black, respectively. Similarly, the escape sequences "<ESC>[47m" and "<ESC>[40m" make the background color white and black, respectively.

Some applications assume that the screen background is black (like real VT100 terminal), and expect that white colored text is visible. However, when the background color of Tera Term is white, therefore white colored text is invisible.

If you edit the UseTextColor line in the [Tera Term] section of the setup file like the following:

UseTextColor=on

the actual color of "white" colored text (background) becomes a color for "Text" specified in the [Setup] Window dialog box. Similarly, the actual colors for "black" text (background) becomes a color for "Background".

Default:
UseTextColor=off

Space between characters (lines)

To change space between characters (lines), edit the VTFontSpace line in the [Tera Term] section of the setup file like the following:

VTFontSpace=<dx1>,<dx2>,<dy1>,<dy2>

Where:
  <dx1>  Left side space for each character in pixels.
  <dx2>  Right side space for each character in pixels.
  <dy1>  Space above each line in pixels.
  <dy2>  Space below each line in pixels.

Example:
VTFontSpace=0,1,0,0    1 pixel of right side space for each character.
VTFontSpace=0,0,1,0    1 pixel of space above each line.

Default:
VTFontSpace=0,0,0,0

Hiding the [Window] menu

To hide the [Window] menu, edit the WindowMenu line in the [Tera Term] section of the setup file like the following:

WindowMenu=off

Default:
WindowMenu=on

Eterm lookfeel window

To specify the detailed settings for Eterm lookfeel window, edit the [BG] section of the setup file like the following:

BGSPIPath | folder name | This option can specify Susie plugin path to load the image. Susie is Japanese free software.
BGFastSizeMove | On / Off | This option enables Tera Term window moving and resizing to more faster. This feature is valid in Windows dragging mode.
BGFlickerlessMove | On / Off | This option can reduce the flicker of window moving.
BGUseAlphaBlendAPI | On / Off | For debug. Tera Term does not use AlphaBlend API when this option is off.
BGNoFrame | On / Off | Tera Term window is without frame when this option is on and HideTitle option is on. If so, you can resize window with Alt + Shift + LeftDrag.
BGThemeFile | file name | You can specify the theme file. Tera Term will randomly select one of files when the theme file is specify with wildcard.
Default:
BGUseAlphaBlendAPI = On
BGSPIPath = plugin
BGFastSizeMove = On
BGFlickerlessMove = On
BGNoFrame = Off
BGThemeFile = theme\*.ini

Configure of theme file

BGReverseTextTone | 0 - 255 | The transparency value of the reverse text.
BGPictureFile | file name | You can specify the image file name merging with the wall paper. Tera Term will randomly select one of files when the wild card is specified. Please specify the relative path from the theme file when you want to use the relative path. The kind of file that Tera Term can load is depend the plugin stored in BGSPIPath. Tera Term can load the bitmap file when there is not plugin.
BGPicturePattern | Stretch Tile Center FitWidth FitHeight AutoFit | You can specify the painting method of the image file. Both FitWidth and FitHeight can expand or reduce the image while the aspect ratio of the image preserves. AutoFit can exchange FitWidth for FitHeight not to generate the space between the window and the image.
BGPictureBaseColor | R, G, B | This color can paint between the image file and the window.
BGPictureTone | 0 - 255 | The transparency value of the image file.
BGFadeTone | 0 - 255 | This option can enable the whole background to fade.
BGFadeColor | R, G, B | This option can configure the fade color.
VTFore, Red ... | R, G, B | This option can configure the text color.

Extension of theme file

A user can configure the extension of the theme file based on the theme\Advanced.sample file.
For example, an image file(sample.jpg) can be drawn in the Tera Term background. Please specify the .ini file at the BGThemeFile entry of the teraterm.ini file.

[BG]
; Advanced Setting
; Image source setting
; Type      : Color / Picture / Wallpaper
: Pattern   : Stretch / Tile / Center / FitWidth / FitHeight / AutoFit
; AntiAlias : On / Off
; Color     : R,G,B (0-255)
; Alpha     : 0-255
; File      : wildcard => random select
; Dest = (Src1  * Src1Alpha + Dest * (255 - Src1Alpha)) / 255
; Dest = (Src2  * Src2Alpha + Dest * (255 - Src2Alpha)) / 255
BGReverseTextAlpha = 192
;
BGDestType      = Picture
BGDestFile      = sample.jpg
BGDestPattern   = AutoFit
BGDestAntiAlias = On
BGDestColor     = 0,0,0
;
BGSrc1Type      = Color
BGSrc1File      =
BGSrc1Pattern   =
BGSrc1AntiAlias =
BGSrc1Color     = 32,32,32
BGSrc1Alpha     = 64
;
BGSrc2Type      = Color
BGSrc2File      =
BGSrc2Pattern   =
BGSrc2AntiAlias =
BGSrc2Color     = 32,32,32
BGSrc2Alpha     = 64

How to scroll the screen when the window size is maximized

The screen scrolling method can be specified when the window size is maximized.

When the window size is maximized, the screen will be corrupted while the screen is scrolling as same normal window. So, a user can change the method of scrolling method.

  • Method 0. Normal scrolling method is used. However, a part of character will be corrupted while scrolling.
  • Method 1. Scrolling method until Tera Term 4.94 is used. Character is not corrupted, however the screen flickers and the scrolling speed is slow.
  • Method 2. New method since Tera Term 4.95 is used. The screen does not flicker, however bottom line will remain garbage on scrolling back.

The default value is Method 2 when the window size is maximized. If you have a problem by using scrolling, the method can be changed another method.
For example, when the MaximizedBugTweak entry of [Tera Term] section is changed below setting, the Method 1 is used for scrolling.

MaximizedBugTweak=1

Default:
MaximizedBugTweak=2

Display the cursor even if the window comes out of focus

Tera Term will display the cursor even if the window comes out of focus.
If you want to disable this option, modify a line of KillFocusCursor in [Tera Term] section of setup file as follows.

KillFocusCursor=off

Default:
KillFocusCursor=on

Fix the initial window position

In order to change the default window position, change values of VTPos line(VT Window) and TEKPos line(TEK Window) at [Tera Term] section inside the setup file.
For example, if you want to set the default VT window position to 200 pixels from the left side of the screen and 100px from the top of the screen, change the setup file as follows.

VTPos=200,100

The initial position is not fixed and Windows can decide the position by changing the setup file as follows.

VTPos=-2147483648,-2147483648
TEKPos=-2147483648,-2147483648

Notice: As described below, if SaveVTPosWinPos is on and at the time of executing "Save setup" or closing VT window, VTPos setting will be overwritten by current window position setting.

Default:
VTPos=-2147483648,-2147483648
TEKPos=-2147483648,-2147483648

Save the window position

Tera Term does not save the window position when "Save setup" was called.
If you enable this position, current window position is saved to a specified setup file.

Also if this option is enabled, current window position and terminal size are saved to the current setup file when VT window was closed.

SaveVTWinPos=on

Default:
SaveVTWinPos=off

Change the window icon

Tera Term executable program includes "VT window" icon, "TEK window" icon, and some other icons. If you change the value of VTIcon or TEKIcon, the displaying icon of VT window or TEK window is changed.

For example, to use old icon for VT window, specify like the following:

VTIcon=VT_CLASSIC

Following icon names are available:

Icon name | Icon
TTERM | Icon of TTERM
VT | Icon of VT
TEK | Icon of TEK
TTERM_CLASSIC | Icon of TTERM_CLASSIC
VT_CLASSIC | Icon of VT_CLASSIC
TTERM_3D | Icon of TTERM_3D
VT_3D | Icon of VT_3D
CYGTERM | Icon of CYGTERM
Default | Default("VT" at VT window, "TEK" at TEK window)

Also, the icon of SSH connection can be changed. For example, when the yellow icon(TTSSH2.62 earlier) is specified, please change the SSHIcon entry in the [TTSSH] section in the following:

SSHIcon=yellow

The SSHIcon can be specified in the following names:

Name | Icon
flat | flat ttssh icon
green | green ttssh icon
yellow | yellow ttssh icon
Default | A default icon(equal to flat)
Default:
VTIcon=Default
TEKIcon=Default
SSHIcon=Default

Delay for stating of text selection

You can configure the delay for the start of text selection with the mouse and treat it as a click if the time you drag with the mouse is short.
For example, to handle as a click when the mouse drag time is shorter than 200 msecs, edit the MouseSelectStartDelay line in the [Tera Term] section of the setup file like the following:

MouseSelectStartDelay=200

Default:
MouseSelectStartDelay=0


TTXRecurringCommand (Recurring command)

Sending a command periodically

Feature

TTXRecurringCommand is plug-in module that can send a command periodically.
A specified string is sent at regular intervals while no key is input to Tera Term.

Menu items

When TTXRecurringCommand plug-in is installed, below menu items are added on Tera Term.

Setup - Recurring command
Setting dialog is opened.
Control - Recurring command
Switch plug-in to enabling or disabling.

Setting dialog

Enable
Switch plug-in to enabling or disabling.
Interval(sec)
Specify an interval sending a command. The command is sent at the interval while no key is input to Tera Term.
Command
Specify sending command(string). When the command includes below string, the string is replaced to corresponding character.
Sequence | Sending character
\\ \
\n | Line feed (LF)
\t | Horizontal tab (HT)
\a | Bell (BEL)
\b | Backspace (BS)
\f | Form feed (FF)
\r | Carriage return (CR)
\v | Vertical tab (VT)
\e | Escape (ESC)
\NNN | A character is represented by base 8 NNN
\xHH | A character is represented by base 16 HH
Add new line
A carriage return can be added at end of sending command when this option is checked.


TTY Recorder and Player

Terminal screen buffer is recorded and replayed.

Feature

The TTXttyrec plug-in records the screen buffer as a binary file. Select the TTY Record under File menu and the saving dialog is shown. Specify a file on the dialog and the recording will start. Again, select the TTY Record entry and the recording will stop.

This plug-in supports for recording the serial console. However, the Tera Term 4.60 or later needs to do it. So, the Tera Term before 4.60 supports this plug-in and only TCP connection.

The TTXttyplay plug-in replays the data recorded by the TTXttyrec plug-in. Select the TTY Replay under File menu and the opening dialog is shown. specify a recorded file and the recorded data will replay. The Tera Term 4.60 or later needs to use the TTXttyplay plug-in.

The data format is same as the ttyrec. The data recorded by the TTXttyrec plug-in can replay by using the ttyplay command. The data recorded by the ttyrec command can replay by using the TTXttyplay plug-in.

Description

This is a sample plug-in which can hook the communication of TCP connection. The Precv is hooked, the current time-stamp and the received data are saved to a file as the ttyrec format. The serial console uses the hook mechanism of the serial connection at the Tera Term 4.60.

The TTXttyplay plug-in uses the hook mechanism of the log replaying at the Tera Term 4.60. When the log is replayed, the wait time is inserted into the sequential reading by returning the ERROR_IO_PENDING.

The function is implemented because the gettimeofday() not exist on the Windows.

Bug

  • The accuracy in a delay time is not good.


Numeric keypad

In the default setup, Tera Term emulates VT100 keyboard. Therefore some numeric keys do not work like them in other applications. For example, the "Num Lock" key does not work as "Num Lock". To disable the emulation and use numeric keys in normal way, edit the keyboard setup file KEYBOARD.CNF to disable every items in the [VT numeric keypad] section by using the word "off", like the following (see also KEYCODE.TXT):

[VT numeric keypad]

Num0=off
Num1=off
Num2=off
Num3=off
Num4=off
Num5=off
Num6=off
Num7=off
Num8=off
Num9=off
NumMinus=off
NumComma=off
NumPeriod=off
NumEnter=off
PF1=off
PF2=off
PF3=off
PF4=off


Keypad mode

There are the numeric keypad mode and the application keypad mode at VT100 numeric keypad. The remote host can configure these keypad mode with sending the control sequence. These modes have in the following differences:

Numeric keypad mode
In normal mode, the keypad behaves like a normal Windows keypad: with NumLock on or off, the number keys generate numbers. This is the default mode.
Application keypad mode
In application mode, all the keypad keys send special control sequences, _including_ Num Lock. Num Lock stops behaving like Num Lock and becomes another function key. For example, if a user pushes 1 key, Tera Term will send <ESC>Oq sequence.
A user can use this mode to distinguish between full key numeric key and numeric keypad. Basically, an application will change to application keypad mode.

Cursor key mode

There are normal cursor mode and application cursor mode in VT100 cursor key definition. The remote application can change this cursor mode by sending the control sequence.

Normal cursor mode
In this mode, the arrow keys send the same key sequences. For example, UP ARROW sends <ESC>[A sequence.
Application cursor mode
In this mode, the arrow keys do not send the same key sequences. For example, UP ARROW sends <ESC>OA sequence.
Also, Tera Term would send UP ARROW or DOWN ARROW key sequence instead of scrolling through the window by rotating the mouse wheel. Refer to Mouse wheel action in application cursor mode.

Disabling application keypad/cursor mode

Perhaps a user does not want to use the application keypad and cursor mode function. For example, the vi editor switches to the application keypad mode during initial start. So, the numeric keys can be assigned to the special feature instead of not inputting a number with the numeric keys.
If a user does not want to use the application keypad/cursor mode, disable this mode on keyboard configuration dialog. So, a user can use the numeric keypad as numbering on vi editor. However, some problem may be occurred on this mode.

Here is Another method to disable the application keypad mode.


Tips on B-Plus

The B-Plus file transfer protocol does not support 7 bit communication lines. B-Plus, as implemented in Tera Term, does not support file transfers between two PC's. You should use the B-Plus protocol to transfer files between your PC and a BBS such as CompuServe.

For serial port connections, set the appropriate parameters in the [Setup] Serial port dialog box. Data must be 8 bit.

If file transfers fail, try to escape all control characters.

Setup item for B-Plus:
Auto activation of B-Plus Receive


Delimiter character of word selected by double-click

When a user double-clicks a word with the mouse, the word can be selected.
A delimiter character can be changed by using the DelimList entry in the [Tera Term] section of the teraterm.in file.

DelimList=<delimiter characters>

For example,

DelimList=<>()[]

can specify six delimiters("<", ">", "(", ")", "[", "]"). However, the space character and "$" character must be specified the "$20", "$24".

DelimList=$20 ; space character

Default value:
DelimList=$20!"#$24%&'()*+,-./:;<=>?@[\]^`{|}~

The "DelimList" entry can be specified only one-byte character(what is called half-size character). The two-bytes character(what is called double-byte character) is treated as the delimiter character.
If the two-bytes character is not treated as the delimiter, please configure the DelimDBCS entry in the following:

DelimDBCS=off

Default value:
DelimDBCS=on

For your reference, here is the older Tera Term configuration.

DelimList=$20
DelimDBCS=off


Transfer the file via the intermediate server

When a user logins to a remote host and continuously login to another host, a file transfer will be failure by using any method(Kermit, XMODEM, YMODEM, ZMODEM, B-PLUS and Quick-VAN).

Tera Term developer was never meant to support the file transfer on above situation. So, it is recommended other methods of directly connecting to the end-point server means 1, transferring to the intermediate server means 2, using the ftp protocol means 3.

If the transfer fails, it has many possible causes in the following:

1) The flow control between Tera Term and the intermediate server, or between the intermediate server and the remote host may not work well.

When the connection type is the TCP/IP and dial-up PPP, the flow control will work well. Otherwise when the type is the serial port and the modem port, the flow control will not work well. Setup the flow control correctly.

2) A part of the control code will lost between Tera Term and the intermediate server, or between the intermediate server and the remote host.

When the connection type is the TELNET, a user should connect by using the binary mode.

By using the kermit protocol, it has no problem. By using the B-Plus and ZMODEM protocol, it may have no problem when all control characters are escaped. By using the XMODEM, ZMODEM and Quick-VAN protocol, it has no problem when all 8bit characters can pass through.

When a user connects from the intermediate server to the remote host by using the telnet command, a part of the control characters Tera Term sending will lost. These characters will be assigned to the telnet features such as the "echo", "escape", "erase", "flushoutput", "interrupt", "kill", "quit" and "areyouthere". If a user can download the file from the remote server but can not upload the file to the server, it has the above possible cause. To resolve this problem, cancel the control character feature or escape all control characters by using the B-Plus and ZMODEM protocol. However, it will not work well by using the telnet protocol.

In each case, Tera Term can not configure the communication setting between the intermediate server and the remote host.
This transferring problem is difficult. Unfortunately, Tera Term developer team may not be able to resolve the problem.
The problem can not be resolved through a trial and error process, please give up your problem solving.


Log and replay functions

You can save the host data to the file if you use Tera Term logging function.

Log to the file

You can log characters received from the host. Execute the [File] Log command to start logging.

Do in the following commands:

  1. Do [File] Log command.
  2. "Tera Term: Log" dialog box will be shown.

    Input the saving file name to `File Name:'.
    All host data will be written to the file if you check `Binary' option.
    KANJI, CR and LF codes are converted to host character code, written to the file if you uncheck `Binary' option. However, the escape sequences are not written to the file.
    The host data will append the file if you check `Append' option.
    The host data will overwrite the file if you uncheck `Append' option.

  3. Push OK button, "Tera Term: Log" icon will be shown. And logging will start.
  4. Push Close or Pause button on the logging dialog box if you finish the logging or temporarily stop. Pause button will change into Start button if you push Pause button, the logging will restart.

To browse log files, which contain escape sequences, it is convenient to use the replay function of Tera Term. To replay a log file.

Replay the log file

Run Tera Term with command line in the following:

TTERMPRO /R=<log file name>

Tera Term analyzes the specified log file and understands the escape sequence data. If so, the contents of log file will be displayed in Tera Term window as if the characters were received from the host. We call this function 'replay log'.

And also, you can also use 'Host:' on the [File] New connection command.

/R=<log file name>


Named pipe

Tera Term can connect the serial console of the virtual machine by using the VMware and Hyper-V named pipe.

   +---------------+
   | Guest OS      |
   |               |
   +----[COM]------+
   | Hypervisor    |
   +------+--------+
          |
          |                              +-------------+
          |                              |             |
          +-------[Named pipe]-----------+  Tera Term  |
                                         |             |
                                         +-------------+

Linux on VMware

For example, the VMware Player 3.1.5 and Fedora 16 combination is described below.

The VMware Player 3 later can support the named pipe. Please upgrade your VMware Player if you use the older version. Next, call the Virtual machine configuration dialog - Hardware - Serial port, and select the use the named pipe. Please input as follows.

  • \\.\pipe\vmware-serial-port
  • This terminal is server.
  • The destination host is application.

Fedora 16 does not use the serial console by default. So, the boot loader, Linux boot message and the login prompt can output on the serial console by changing the GRUB2 configuration.
The GRUB2 configuration is described below. A user needs to edit the /etc/default/grub by using the superuser privilege.

GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Fedora"
GRUB_DEFAULT=saved
GRUB_CMDLINE_LINUX="rd.md=0 rd.dm=0 rd.lvm.lv=VolGroup/lv_swap quiet rhgb rd.lvm.lv=VolGroup/lv_root rd.luks=0 LANG=ja_JP.UTF-8  KEYTABLE=jp106"
GRUB_TERMINAL="serial console"
GRUB_SERIAL_COMMAND="serial --unit=0 --speed=38400"
GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,38400"
Next, please reflect the new configuration by using the grub2-mkconfig command.
# grub2-mkconfig -o /boot/grub2/grub.cfg

Thus, the named pipe(\\.\pipe\vmware-serial-port) will be created after the VMware launches the Fedora. So, Tera Term can connect to the virtual machine by using the named pipe. However, the Magic SysRq key can not be worked after doing "Send break" of Tera Term because the break signal is not be supported.

For your reference, the serial configuration is different from the GRUB2 because the Legacy GRUB is used at Fedora 15 before. A user needs to edit directly the /boot/grub/grub.conf by using the superuser privilege.

default=0
timeout=5
#splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
serial --unit=0 --speed=38400
terminal --timeout=5 serial console
title Fedora (2.6.38.6-26.rc1.fc15.i686.PAE)
        root (hd0,0)
        kernel /vmlinuz-2.6.38.6-26.rc1.fc15.i686.PAE ro root=/dev/mapper/VolGroup-lv_root rd_LVM_LV=VolGroup/lv_root rd_LVM_LV=VolGroup/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=ja_JP.UTF-8 KEYTABLE=jp106 selinux=0 rhgb quiet console=tty0 console=ttyS0,38400
        initrd /initramfs-2.6.38.6-26.rc1.fc15.i686.PAE.img

Windows Server on Hyper-V

For example, the Windows Server is working on the virtual machine by using the Hyper-V of the Windows Server 2008 R2.

Please specify the named pipe on the COM port configuration of the Hyper-V. The named pipe format is "\\.\pipe\". Tera Term can connect to the COM port of the Hyper-V by using the named pipe. Also, the SAC(Special Administration Console) can not be used when the guest OS is not Windows Server series. If a user uses the desktop version Windows, Tera Term can connect to the named pipe, however the user can not do anything because the Windows does not support the SAC.


Tips on TCP/IP connection with a port other than 23

Telnet port number

On the command line, or on the [File] New connection dialog box, you can specify the TCP port number (<TCP port#>) and telnet flag (<telnet flag>) for a TCP/IP connection. If these parameters are omitted in the command line, the default values are taken from the Tera Term setup file.

Only if <telnet flag> is 1 (on) and <TCP port#> is 23, Tera Term starts spontaneously sending telnet commands to the host for the option negotiation when the TCP/IP connection is established.

This particular port number for telnet, 23, can be changed by editing the TelPort line in the [Tera Term] section of setup file like the following:

TelPort=<telnet port#>

Default:
TelPort=23

Whatever <TCP port#> is and whatever <telnet flag> is, Tera Term can respond to telnet commands sent by the host.

Terminal setup for non-telnet TCP/IP connection

For a non-telnet TCP/IP connection (usually with a port other than 23), you may need to set the "local echo" option on, and the "new-line (transmit)" option to CR+LF. If you edit the TCPLocalEcho and TCPCRSend lines in the [Tera Term] section of the setup file like the following:

TCPLocalEcho=on
TCPCRSend=CRLF    (CR is also acceptable)

the "local echo" option is turned on and the "new-line (transmit)" option is set to CRLF automatically when the connection is established on condition that <telnet flag> is 0 (off), or <TCP port#> is not equal to <telnet port#>. Otherwise, setup values specified by [Setup] Terminal are used. By using these options, one setup file can support both the telnet connection and non-telnet connection.

Default:
TCPLocalEcho=off  (This option is disabled and the "local echo" option in the [Setup] Terminal dialog box is always used.)

TCPCRSend=        (This option is disabled and the "new-line (transmit)" option in the [Setup] Terminal dialog box is always used.)


PF1-PF4 keys of VT100

In the default setup, PF1-PF4 keys of VT100 are emulated by "Num Lock", "/", "*" and "-" keys of numeric keypad. To emulate PF1-PF4 keys by F1-F4 keys of PC keyboard, edit the keyboard setup file KEYBOARD.CNF like the following (see also KEYCODE.TXT):

[Numeric keypad]
PF1=59
PF2=60
PF3=61
PF4=62
; Key codes for F1-F4 keys are 59-62.

[X function keys]
XF1=off
XF2=off
XF3=off
XF4=off
; XF1-XF4 items should be disabled, because
; key codes 59-62 can not be used twice in the setup file.


Associate with TELNET protocol

Since Tera Term 4.59, you can associate with TELNET protocol with installer.

Specify Application like follows.

"C:\Program Files\teraterm\ttermpro.exe" /nossh /T=1 %1

If TTSSH is installed and SSH is enabled in TERATERM.ini, Tera Term starts SSH connection to the remote host.
Use TTSSH command line option "/nossh". It specify the connection protocol does not SSH.

Use ttermpro.exe command line option "/T=1". It explicitly specify the connection protocol is TELNET.


How to configure Tera Term

You can use commands in the [Setup] menu for normal setup.
Sometimes, you may want to edit the setup file directly for detailed customizing.

You can modify key assignments by editing the keyboard setup file.
See also KEYCODE.TXT.


User shortcut keys

You can define shortcut keys for the following functions by editing items in the [Shortcut keys] and [VT function keys] sections of the keyboard setup file see also KEYCODE.TXT):

[Shortcut keys]
Item in the         Function                                Default key

EditCopy            [Edit] Copy command *1)                 Ctrl+Insert
EditPaste           [Edit] Paste command *1)                Shift+Insert
EditPasteCR         [Edit] Paste<CR> command *1)            none
EditCLS             [Edit] Clear screen command             none
EditCLB             [Edit] Clear buffer command             none
ControlOpenTEK      [Control] Open TEK command              none
ControlCloseTEK     [Control] Close TEK command             none
LineUp              Scrolls up screen by 1 line             Ctrl+Up-arrow
LineDown            Scrolls down screen by 1 line           Ctrl+Down-arrow
PageUp              Scrolls up screen by 1 page             Ctrl+PageUp
PageDown            Scrolls down screen by 1 page           Ctrl+PageDown
BuffTop             Scrolls screen to buffer top            Ctrl+Home
BuffBottom          Scrolls screen to buffer bottom         Ctrl+End
NextWin             Moves to the next Tera Term window      Ctrl+Tab
PrevWin             Moves to the previous Tera Term window  Ctrl+Shift+Tab
NextShownWin        Moves to the next Tera Term window      none
            (except minimized window)
PrevShownWin        Moves to the previous Tera Term window  none
            (except minimized window)
LocalEcho           Toggles the local echo status           none

[VT function keys]
Item in the         Function                                Default key

Hold                Locks/unlocks the port for receiving    none
Print               [File] Print command *1)                none
Break               Sends a break signal *1)                none

*1) System shortcut keys are assigned for these functions.

If you want to assign Ctrl+V for the [Edit] Paste command, edit the EditPaste item in the [Shortcut keys] section of the keyboard setup file:

EditPaste=1071

(In the case of IBM PC/AT keyboard)

You can also define user shortcut keys for all menu commands by using user keys at the [User keys] section.


Vim Control Sequence Example

Vim Control Sequence Examples

When a user uses the control sequence, the remote host can control the Tera Term behavior. The Vim procedure for using the control sequence is described below.

Changing cursor shape on entering and leaving into insert mode

Tera Term can support below control sequence changing the cursor shape.

Abbreviation | Sequence | Function
DECTCEM | ESC [ ? 25 h | Makes the cursor visible
 | ESC [ ? 25 l | Makes the cursor invisible
DECSCUSR | ESC [ 0 SP q | Blink Block
 | ESC [ 1 SP q | Blink Block
 | ESC [ 2 SP q | Steady Block
 | ESC [ 3 SP q | Blink Underline
 | ESC [ 4 SP q | Steady Underline
 | ESC [ 5 SP q | Blink Vertical line
 | ESC [ 6 SP q | Steady Vertical line
WYSTCURM | ESC [ 33 h | Steady Wyse Cursor
 | ESC [ 33 l | Blink Wyse Cursor
WYULCURM | ESC [ 34 h | Steady Wyse underline cursor
 | ESC [ 34 l | Steady Wyse block cursor
(AT&T 610) | ESC [ ? 12 l | Steady Cursor
 | ESC [ ? 12 h | Blink Cursor

The vim cursor can be changed in the insert mode to output above control sequences when a user enters(t_SI) and leaves(t_EI).
For example, when below contents is added in the .vimrc file, the cursor style is vertical line and blinking in the insert mode, the cursor style is underline and blinking in the replace mode, and the cursor style is block and blinking in the normal mode.

let &t_SI .= "\e[5 q"
let &t_SR .= "\e[3 q"
let &t_EI .= "\e[1 q"

NOTICE: If a user uses the control sequence except the DECTCEM, turn on the Cursor control sequence of the Additional Settings dialog(The default value is off).

Auto indent can be disabled on pasting from clipboard

NOTE: When text is pasted by using Vim 8.0.0238 or later, auto indent and completion are disabled not below configuration because the vim editor supports Bracketed Paste Mode.
However, when tmux is used, below configuration is needed because Bracketed Paste Mode is not enabled.

Basically, the host application can not recognize the difference between the user input and pasting from clipboard. However, when a user uses the Bracketed Paste Mode as the xterm extension, the application can recognize its difference and a user can change the behavior of pasting from clipboard.

The vim configuration is described below. The following will use xterm's bracketed paste mode to make pasting automatically enable paste mode and insert mode. Also works fine in ~/.vimrc file.

if has("patch-8.0.0238")
    " When below configuration is not set by using Bracketed Paste Mode supporting version(8.0.0238 or later),
    " the Bracketed Paste Mode is used while TERM is xterm.
    " When tmux is used, below configuration is needed because TERM is screen.
    if &term =~ "screen"
        let &t_BE = "\e[?2004h"
        let &t_BD = "\e[?2004l"
        exec "set t_PS=\e[200~"
        exec "set t_PE=\e[201~"
    endif
else
    " The Bracketed Paste Mode motion of Vim core will not work well,
    " auto indent does not become to disabling, with Vim from 8.0.0210 to 8.0.0237 version.
    " So, Vim core function is disabled.
    if has("patch-8.0.0210")
        set t_BE=
    endif

    " When Vim core does not support Bracketed Paste Mode, below configuration works.
    if &term =~ "xterm" || &term =~ "screen"
        let &t_ti .= "\e[?2004h"
        let &t_te .= "\e[?2004l"

        function XTermPasteBegin(ret)
            set pastetoggle=<Esc>[201~
            set paste
            return a:ret
        endfunction

        noremap <special> <expr> <Esc>[200~ XTermPasteBegin("0i")
        inoremap <special> <expr> <Esc>[200~ XTermPasteBegin("")
        vnoremap <special> <expr> <Esc>[200~ XTermPasteBegin("c")
        cnoremap <special> <Esc>[200~ <nop>
        cnoremap <special> <Esc>[201~ <nop>
    endif
endif

When a user pastes at the normal mode by using the above configuration, the mode will be automatically changed to the insert mode and do the paste. If this behavior is denied, use the below configuration.
Also, refer to the GNU Screen Notice.

if &term =~ "xterm"
    let &t_SI .= "\e[?2004h"
    let &t_EI .= "\e[?2004l"

    function XTermPasteBegin(ret)
        set pastetoggle=<Esc>[201~
        set paste
        return a:ret
    endfunction

    inoremap <special> <expr> <Esc>[200~ XTermPasteBegin("")
endif

About Bracketed Paste mode

The bracketed paste mode is the xterm extension feature. When this feature is enabled, the pasted text is bracketed with control sequences so that the program can differentiate the pasted text from typed-in text.
The program will receive: ESC [ 200 ~, followed by the pasted text, followed by ESC [ 201 ~.

Controlling IME

Tera Term can support the original sequence to control the IME behavior. For example, A user can switch the IME status of enabling and disabling to use this control sequence.

When below contents is be added in the .vimrc file, the IME status is off after the insert mode exiting. Next, the IME status is on after the insert mode enabling.

let &t_SI .= "\e[<r"
let &t_EI .= "\e[<s\e[<0t"
let &t_te .= "\e[<0t\e[<s"

set timeoutlen=100

When the timeoutlen of the vim is enabled, the vim will wait until either the complete mapping or key sequence has been received. In other words, the timeoutlen is used to describe the time from IME on to off after the ESC key is pressed in the insert mode.
If the timeoutlen is the small value, a trouble may occur that the cursor and function key do not work well.
As an alternative, please use the Delete wait time after ESC key is pushed in insert mode.

Delete wait time after ESC key is pushed in insert mode

When the ESC key is pressed, Tera Term, xterm and other terminal emulator send the ESC(0x1b) key code. Also, when the cursor key and the function key is pushed, Tera Term sends the ESC key code. Therefore, the host application can not recognize whether the ESC key is pressed.
So, the vim waits for one second when the ESC key code is received to recognize what key is pressed. As a result, when a user presses the ESC key, the time for the insert mode exiting will be late for 1 second. This behavior can not be affected by enabling Changing cursor shape on entering and leaving into insert mode and Controlling IME.

Please use the Application Escape Mode to resolve this problem. When below contents is added in the .vimrc file, the insert mode is quickly exited after the ESC key is pressed.

let &t_SI .= "\e[?7727h"
let &t_EI .= "\e[?7727l"
inoremap <special> <Esc>O[ <Esc>

Save and Restore Window Title

NOTE: Since Vim 8.1.0253, Vim supports save and restore window title feature, and following setting isn't necessary.

Tera Term can support the xterm control sequence changing the window title. For example, in case of vim, when the "set title" is executed, the window title will be displayed at the current file name.
However, the vim can change the window title, the vim can not know the old title. So, the vim can not restore the old title, and then the vim will display the "Thanks for flying Vim".

To solve this problem, use the Save and Restore Window Title function. When below configuration is added in the .vimrc file, the vim can save the window title on launching the vim, and then restore the window title on existing the vim.

if !has("patch-8.1.0253")
    let &t_ti .= "\e[22;0t"
    let &t_te .= "\e[23;0t"
endif

Speed up vsplit scrolling

The vim will slow down by using the vsplit function for a reason of the VT100 and VT200 series specification based on many terminal emulators.

The VT100 specification has the scroll range function(scroll region and vertical margin). For example, when the upper margin is fifth line and the lower margin is twentyth line, the scroll region will be set from fifth to twentyth line. So, a user can not specify the digit unit of the vertical direction.
As a result, the scroll speed will be slow down because the scroll range needs to re-paint all region.

However, the VT400 series specification has the scroll range function(horizontal margin), and then Tera Term 4.79 later has supported this function. When a user configures below settings in the .vimrc file, the vsplit scroll will be speed up.

if &term =~ "xterm"
    let &t_ti .= "\e[?69h"
    let &t_te .= "\e[?69l"
    let &t_CV = "\e[%i%p1%d;%p2%ds"
endif

NOTE: The terminal emulators not supporting the horizontal margin can not work the vsplit function by using this configuration. For example, the xterm, mlterm, RLogin, tanasinn and pangoterm terminal emulator can support this function, but other terminal emulators can not support its.

GNU Screen Notice

When the GNU Screen is used, an application on the screen sends the control sequence and the sequence will be abandoned because the screen can not support the sequence.

if &term == "screen"
    let &t_SI .= "\eP\e[3 q\e\\"
    let &t_EI .= "\eP\e[1 q\e\\"
else
    let &t_SI .= "\e[3 q"
    let &t_EI .= "\e[1 q"
endif

Use the above configuration to resolve this problem. When the terminal type is `screen', the vim entry sandwiches in the sequence between the "\eP" and "\e\\".
However, the screen can not work to switch the window because the sequence can not be managed by the screen.

Vim Configuration

Background color

The vim editor can automatically recognize the terminal color number, namely the 256 color supporting because the Tera Term 4.83 or later supports the Termcap String Query of xterm. So, a user must properly configure the background setting to draw the highlight color regarding the vim background color.
When the background color is the dark color(i.e, black), specify the dark setting. Also, when the background color is the bright color(i.e, white), specify the light setting.

set background=dark

With above setting, the vim can know the terminal background color. So, if the configuration is mistaken, the highlight color will be indistinct because the text and the background color is almost same.
If the vim automatic recognition of color is stopped, add the set t_RV= entry in the .vimrc file. However, the automatic recognition of mouse type is stopped.

Also, refer to the :help 'background' on the vim editor for details.


Virtual Store

File Virtualization on Vista later

When a user writes the data to special file and registry on the Windows Vista later,
the data will be automatically redirected to another path. This feature is the "Virtual Store" called.
The feature is enabled when the User Account Control(UAC) function of the operating system is enabled
and Tera Term is not executed as the Administrator privilege.

When the "Virtual Store" function is enabled, the file stored into the "%ProgramFiles(x86)%\teraterm"
path will be redirected to the "%LOCALAPPDATA%\VirtualStore\Program Files (x86)\teraterm" path.
Target file are teraterm.ini, log file and ssh_known_hosts file.


Tips on XMODEM

The XMODEM file transfer protocol requires the communication lines to be transparent to all 8 bit characters, from $00 to $FF.

For serial port:

Set the appropriate parameters in the [Setup] Serial port dialog box. Data must be 8 bit, and Flow control must be hard (CTS/RTS) or none.

For telnet:

If file transfers fail, try connecting to the host with the binary option. To connect with the binary option:

  • Specify the /B option on the command line, or
  • Edit the setup file.
    Telnet binary option


Tips on ZMODEM

The ZMODEM protocol implemented in Tera Term does not support 7 bit communication lines.

For serial port:

Set the appropriate parameters in the [Setup] Serial port dialog box. Data must be 8 bit.

For telnet:

If file transfers fail, try to escape all control characters. If that does not work, try connecting to the host with the binary option. To connect with the binary option:

  • Specify the /B option on the command line, or
  • Edit the setup file.
    Telnet binary option

Setup items for ZMODEM:

  • Auto activation of ZMODEM Receive
  • ZMODEM parameters for sending

Reference: Transfer the file via the intermediate server

Communication software

The ZMODEM file transfer will work well for the lrzsz package on the Red Hat Linux(e.g., Fedora, CentOS). The transfer may not work well for the zmtx-zmrx package.
When a user uses the com0com software, Tera Term can use loopback test with another Tera Term and Hypter terminal.

Modem communication program

  • lrzsz
  • zmtx-zmrx
  • Null-modem emulator(com0com)