:experimental:
= SyncTERM v1.4b Manual
Stephen Hurd <shurd@sasktel.net>
:toc:

SyncTERM is a terminal program written specifically for connecting to
Bulleten Board Systems (BBSs). Despite the name, SyncTERM is in no way
Synchronet specific, it just happens to share a large portion of code
with the rest of the Synchronet project, and live in the same git
repository.

== Getting Support
If you need help with SyncTERM, the best places are:

IRC::
Connect to irc.synchro.net and find Deuce in #Synchronet. Ask your
question, then idle. I can take hours to respond. Do not give up,
this is the quickest way to get a response.

SourceForge::
The official http://www.sf.net/projects/syncterm[SyncTERM project page]
has a bug tracker and other features that will email me and provide
tracking for issues that are filed.

E-Mail::
I am usually fairly responsive to emails sent to me at
mailto:shurd@sasktel.net[shurd@sasktel.net]. Please describe your issue
as clearly as possible.

Dove-Net::
While I no longer read Dove-Net regularly, many other users can often
help with support issues. Ask questions in the Hardware/Software Help
sub. If your local BBS does not carry Dove-Net, you can telnet to
vert.synchro.net and leave messages there.

Throughout this document, I will mention things which are not supported.
These are things which I don't normally test, and are unlikely to work
at any given time. If you ask for support on one of these issues, I may
help out, or I may not. It doesn't bother me if you ask for help on
these things, but if you continue to ask for help after I refuse, it will
make it less likely I'll work on it in the future.

== History
I started writing SyncTERM in June of 2004. There weren't any good BBS
clients available for FreeBSD at the time, so I started writing one.
Initially, it was RLogin only and no file transfer support existed or
was planned. since RLogin supports auto-login with user ID and password
on Synchronet systems, and RLogin is a much simpler protocol than telnet,
no telnet support was planned. Digital Man (authour of Synchronet) added
telnet and ZModem support a year later, and SyncTERM became a generally
usable BBS client. New features continued to be added slowly over the
years.

== Getting SyncTERM

Releases of SyncTERM are available on the
http://www.sf.net/projects/syncterm[SourceForge project page]. Nightly
builds and source bundles are also available at
http://syncterm.bbsdev.net/[the SyncTERM website] for the more adventurous.


== Compiling SyncTERM from Source

Windows users should not need to build SyncTERM from source. Windows
specifically is not an easy build to do. The Windows builds are done on
a FreeBSD system using MinGW, and this is the only supported build method
currently.  There is a Visual Studio project for building SyncTERM, but
this is not supported.

For *nix systems (Linux, FreeBSD, macOS, and others), a GNU make based
build system is used. There are a number of optional dependencies, and
a large number of supported compile flags (many of which are shared with
Synchronet).

The biggest optional dependency is http://libsdl.org[SDL 2].
SyncTERM can use SDL for both graphics and sound. X11 can also be used
for graphics, and OSS, ALSA, or Portaudio can also provide sound. These
use run-time linking, so at compile time, only the headers are needed.
Static linking with SDL is also supported.

For SSH, a copy of Peter Gutmann's
https://cryptlib.com/security-software/about-cryptlib[Cryptlib] is
provided along with a set of patches. This is still an optional
dependency, so if Cryptlib doesn't build on your platform, you can still
use SyncTERM's other connection options. Cryptlib must be statically
linked if it is used.

Other optional dependencies (such as Portaudio) can not be statically
linked, and are only supported with static linking.

Once you have the desired dependencies installed, change to the syncterm
directory in the source tree (ie: syncterm-YYYYMMDD/src/syncterm) and
run the `make RELEASE=1` command. This will generate the binary in a
subdirectory with the following name format:
 [compiler].[os].[arch].exe.[build]

[compiler]::
is likely either gcc or clang depending on the system compiler.
[os]::
is the OS name reported by uname.
[arch]::
is the architecture reported by uname unless it is x86 compatible in
which case it is forced to x86 for historical reasons.
[build]::
is "release" for release builds and "debug" for debug builds.

SyncTERM can be installed with `make RELEASE=1 install`

== Running SyncTERM

SyncTERM supports many command-line options to control behaviour. Options
begin with a - followed by one or more other characters. The following
options are supported (options are not case sensitive unless
specifically noted):

-6::
Specifying -6 forces SyncTERM to use IPv6 addresses when possible.

-4::
Specifying -4 forces SyncTERM to use IPv4 addresses when possible.

-B/path/to/bbs/list.lst::
Loads the user BBS list from the specified file instead of the default.

-C::
Changes the default to no status line.

-E##::
Specifies the escape delay in ANSI on Curses modes. The escape delay
is how long SyncTERM will wait after an escape key is received from the
user to see if it's a control sequence or a bare kbd:[Escape] press. The units
are millisecods, and the default is 25.

-H::
Use SSH mode when connecting.

-I[ACFXWS[WF]O[WF]]::
Selects the output mode. Not all modes are available in all builds or
on all platforms. Legal values are:
+
--
	A:::
	ANSI output mode. This mode outputs ANSI control sequences to
	stdout.

	C:::
	Curses output mode. For use in *nix terminals.

	F:::
	Curses with forced IBM character set.  Limited usefulness.

	G[WF]:::
	Windows GDI output mode. Uses the Win32 API directly, and is
	the default for Windows. Additionally, a 'W' or 'F' can be
	specified to force windowed or full-screen mode respectively.

	I:::
	Curses in ASCII mode.

	S[WF]:::
	SDL window output mode. Uses the SDL library for output. 
	Additionally, a 'W' or 'F' can be specified to
	force windowed or full-screen mode respectively.

	W:::
	Windows console mode. Windows only mode which uses the system
	console APIs for output.

	X[WF]:::
	X11 output mode. UNIX only mode which directly uses the X11
	libraries for drawing. The default where supported. Additionally,
	a 'W' or 'F' can be specified to force windowed or full-screen
	mode respectively.
--
+
Refer to the <<_output_modes>> section for more details.

-L##::
Specifies the number of lines on the "screen". Supported values are:
14, 21, 25 (default), 28, 43, 50, and 60. If an unsupported value
is used, it will default use 50.

-pns_*::
Only "supported" on macOS.  Ignored.

-N/path/to/config.ini::
Loads the configuration from the specified file instead of the default.

-Q::
Quiet mode, doesn't show popups by default.

-R::
Use RLogin mode when connecting.

-T::
Use Telnet mode when connecting.  If an upper-case -T is the only
argument passed to SyncTERM however, SyncTERM will output a terminfo
entry on stdout then exit.  See <<_installing_terminfo_entry>> for more
details.

-S::
Use "safe" mode.  This mode attempts to restrict the ability of the user
to modify the local drive contents.  This has not been exhaustively
audited, and should therefore not be trusted.

-v::
This option is case sensitive and must the be only option passed to
SyncTERM.  Causes syncterm to output the version on stdout then exit.

After the options, a full URI, hostname, or dialing directory entry may be
specified.  Supported URI schemes are:
rlogin://, ssh://, telnet://, raw://, shell://, ghost://.

If there is an entry matching the URI, hostname, or entry name, the
settings will be loaded from the BBS list, then modified per the
command-line arguments.

== Advanced Keyboard Controls

The conio library directly implements some advanced keyboard controls.
While these are not available in all output modes, they are available
everywhere and not just in the menus or in the connected state.

Keyboard Controls::

	kbd:[Alt+→]:::
	Snap the window size to the next smaller integer zoom level

	kbd:[Alt+←]:::
	Snap the window size to the next larger smaller integer zoom
	level

In addition, you can directly enter characters either by their "codepage"
value or their unicode value.  A "codepage" value is an 8-bit value that
indicates a character in the current codepage (such as the default CP437).

To enter a codepage value, ensure kbd:[NumLock] is on, and hold down an
kbd:[Alt] key, then enter the decimal value on the numeric keypad. Do
not enter leading zeros, as that would indicate a unicode value.  Once
the value is entered, release the kbd:[Alt] key.

A unicode value is the Unicode codepoint number. Only unicode values that
map to the current codepage can be passed through, so the majority of
values can't be entered in a given mode.

To enter a unicode value, ensure kbd:[NumLock] is on, and hold down an
kbd:[Alt] key, press the kbd:[0] key on the numeric keypad, then enter
the decimal value on the numeric keypad. Once the value is entered,
release the kbd:[Alt] key.

== The User InterFaCe

Menus in SyncTERM use a common user interface library named UIFC.  This
library was originally developed for Synchronet.

The following is the general behaviour of UIFC menus.

Mouse controls::

	Right-click:::
	Same as pressing ESC (ie: exit menu).

	Left-click:::
	Select an item in a menu.
+
If there is a blank line at the end of the menu, you can select
it to insert a new item.
+
Menus have a standard set of mouse controls. If you click outside of a
menu, that menu is usually closed, but in some cases, it may simply
become inactive. At the top of each menu is a block which is used to
close the menu. If there is help for the menu, there is also a ? button
to bring up the help.
+
If there are more options than fit in the window, there is a scrollbar
on the left side.

	Left-Drag:::
	Select and copy a region (the copy is made when the button is
	released).

	Middle-click:::
	Paste from PRIMARY selection or clipboard.

Keyboard Controls::

	kbd:[Return]:::
	Select the currently highlighted option.  If there is a blank
	line at the end of the menu, you can select it to insert a new
	item.

	kbd:[Escape]:::
	Exit the current menu.

	kbd:[Backspace]::: An alias for kbd:[Escape].

	kbd:[Ctrl+C]::: An alias for kbd:[Escape].

	kbd:[Home]:::
	Jump to the beginning of the menu

	kbd:[↑]:::
	Move to the previous item in the list

	kbd:[Page Up]:::
	Jump up in the menu by one screen.

	kbd:[Page Down]:::
	Jump down in the menu by one screen.

	kbd:[End]:::
	Jump to the end of the menu

	kbd:[↓]:::
	Move to the next item in the list.

	kbd:[F1]:::
	Help

	kbd:[F2]:::
	Edit

	kbd:[F5]:::
	Copy

	kbd:[Ctrl+Insert]:::
	An alias for kbd:[F5]

	kbd:[Shift+Delete]:::
	Cut

	kbd:[F6]:::
	Paste

	kbd:[Shift+Insert]:::
	An alias for kbd:[F6]

	kbd:[Insert]:::
	Inserts a new item.

	kbd:[+]:::
	An alias for kbd:[Insert]

	kbd:[Delete]:::
	Delete item at current location

	kbd:[-]:::
	An alias for kbd:[Delete]

	Any letter or number:::
	Jumps to the next item that has that character
	earliest in it's name.

	kbd:[Ctrl+F]:::
	Find text in options

	kbd:[Ctrl+G]:::
	Repeat last find


== The Dialing Directory

This is the default startup screen if no BBS is specified on the
command-line. At the top is the program name and version, a build date,
the current output mode, and the current date and time.

With version numbers, trailing letters indicate pre-release versions. 'a'
indicates an alpha build which will have known bugs and/or incomplete
features. 'b' indicates a beta build which indicates there are expected
to be no known bugs, but it has not received testing. "rcX" is a release
candidate where X is a number.  These indicate that after some period
(usually one to two weeks) of no newly reported bugs, a release will be
made.

The output mode is important to make note of when reporting issues,
since many bugs only impact one or two output modes.  It's after the
build date.

The bottom-most line contains help on the current menu, indicating what
options are available in the most recent menu.

There are three areas the user can interact with in the dialing
directory. The <<_the_directory,Directory>> menu, the <<_syncterm_settings,SyncTERM Settings>> menu, and the
comment line.

The comment line is directly above the help line at the bottom, and
allows a per-BBS comment to be entered.


=== The Directory

This menu lists all the entries in the two dialing directory files.  If
you move the bar over one and press <Enter>, it will connect you to the
highlighted system as configured in the entry.

In addition to the standard controls, this menu also has some extra
keyboard shortcuts.

kbd:[Ctrl+D]::
Quick-connect to a URL

kbd:[Ctrl+E]::
Edit the selected entry (Alias for kbd:[F2])

kbd:[Ctrl+S]::
<<_modifying_the_sort_order,Modify the sort order>>

kbd:[Alt+B]::
View the scrollback of the last session

kbd:[Tab]::
Move to the comment field for the current entry, or the settings
menu if there is no current entry.

kbd:[Back Tab] (kbd:[Shift+Tab])::
Move to <<_syncterm_settings>>.

To add a new entry, go to the bottom of the list (by pressing end) and
select the blank entry at the bottom.  A window will pop up asking for
the Name of the entry.  This name must not already exist in the personal
dialing directory.

Next you will be prompted for the protocol to use.  Options include:

[[protocols]]
RLogin::
Uses the historic RFC1282 RLogin protocol without OOB data.  This
is an obsolete, unencrypted protocol that can allow auto-login, and
is 8-bit clean (unlike telnet).  It is very simple.  Instead of the
local username, the users password is sent.

RLogin Reversed::
Some RLogin servers that support password auto-login have
reversed the remote and local username fields.  This allows connecting
to these servers.

Telnet::
Uses the historic and highly complex telnet protocol.  This is an
obsolete, unencrypted protocol and is not 8-bit clean and predates
TCP/IP.  It has been the source of many security vulnerabilities over
the fifty years or so it has existed.  Historically, it has been the
most common way to connect to a remote system as a terminal, so is
widely supported.

Raw::
A raw 8-bit clean TCP connection.  This is often what retro BBSs
actually support when they say they support telnet.

SSH::
The Secure Shell v2 protocol.  This is the modern replacement for both
telnet and rlogin, and is widely supported.  This is encrypted and
performs user and server authentication as part of the protocol instead
of inline.  SyncTERM supports authenticating with both a password and
a public key.

SSH (no auth)::
The SSH protocol, but will not send a password or public
key.  Used for auto-login systems where the user name by itself is
sufficient.

Modem::
SyncTERM can directly control a modem for making outgoing calls.

Serial::
Direct communication with a serial port.

3-wire::
Serial, but with only transmit and receive.  In this mode, there
is no way to detect if the remote has hung up and there is no flow
control, so bytes can easily be lost.  This is primarily used for
communicating with embedded hardware, and not BBSs.

Shell::
Runs a shell in the terminal.

MBBS GHost::
The <<_mbbs_ghost,MajorBBS 'GHost' protocol>>.

TelnetS::
Telnet over TLS.  All the drawbacks of the telnet protocol, but
at least it's encrypted.

Finally, you will be promted for the "address".  This is the DNS addres,
IP address, serial port, or command to connect to.  If the connection will
be made over the network, and the name is a valid hostname, it will be
auto-filled in this field.  To overwrite it, simply start typeing.

Once these three pieces of information are entered, the entry is created
and you are returned to the Directory.  To further modify the settings,
you can press kbd:[F2] to enter the <<_edit_directory_entry>> menu.


==== Edit Directory Entry

In this menu, you can modify all the connection settings for an entry.
The exact contents of this menu will vary a bit by connection type, but
most of the options are the same or silimar.

Name::
The name of the entry.

Phone Number (Modem only):: The phone number to dial.

Device Name (Serial and 3-wire only):: The device name to open.

Command (Shell only)::
The command to run (usually a shell such as /bin/sh)

Address::
IP address or host name

Connection Type::
Protocol to use.  See <<protocols>>.  When you change the protocol, the
port number value will be updated as well.

Flow Control (Modem, Serial, and 3-wire)::
The type of flow control
to use. RTC/CTS, XON/XOFF, Both, or None

TCP Port:: The TCP port to connect to.

SSH Username (SSH no auth only)::
The username to send for the SSH protocol.  Some BBSs have everyone log
in to SSH with the same username, then log into the BBS with their
name.  This allows setting the first username.

BBS Username (SSH no auth only)::
The username to send when kbd:[Alt+L] is entered.

BBS Password (SSH no auth only)::
The password to send on kbd:[Alt+L].

Username::
The user name to send.  Used by SSH, RLogin, and GHost.
For other protocols, send when kbd:[Alt+L] is pressed.

Password::
The password to send.

GHost Program (GHost)::
The program name to send to the remote.

System Password::
An additional password that can be sent after the
first kbd:[Alt+L] using successive kbd:[Alt+L]s.

Screen Mode::
Selects the format of the window when connected.
A mode specifies the number of columns, the number of rows,
the aspect ratio, and the font size.  Some modes such as the
Commodore and Atari modes will also change the selected font.
If the current font is a mode-specific one (such as C64 or Atari),
Changing from that mode to a standard one will change the font
to Codepage 437 English.  See
<<_current_screen_mode,Current Screen Mode>> and
<<custom_screen_mode,Custom Screen Mode>> for additional information.

Hide Status Line::
Indicates that the "status line" at the bottom of
the window when connected should not be displayed.  This allows
for an extra line of text from the remote to be shown.

Download Path::
The location to save downloaded files.

Upload Path::
The location to start at when browsing for files to upload.

Log Configuration::
This brings up a sub-menu to control a debug log.
There are four options in this sub-menu:
Log Filename:::
	If this is not blank, specifies the file to write
	the log data to.  When this is blank, disable logging.
File Transfer Log Level:::
	May be one of None, Alerts, Critical Errors,
	Errors, Warnings, Notices, Normal, or Debug.
Telnet Command Log Level:::
	Chosen from the same list as above.
Append Log File::: If set you Yes, the log file retains old information
	and will keep growing.  If set to No, the log file is emptied
	for each new connection.

Comm Rate::
For networked modes, specifies the sharacter pacing speed.
For serial and modem types, specifies the speed to open the port at.

ANSI Music::
There are three options in this sub-menu.
ESC [ | only:::
	With this setting, ANSI music is fully compliant with
	the standards (ECMA-48, ANSI, etc), but almost no software
	works with this.
BANSI Style:::
	Supports both the SyncTERM (CSI |) and BananaCom (CSI N)
	ANSI music styles.  Support is still very rare, but slightly
	more common than the first.
All ANSI Music Enabled:::
	In addition to the previous two, also
	supports CSI M for ANSI music.  This is by far the most common
	sequence used by software that supports ANSI music.
	Unfortunately, this prevents the ANSI Delete Line sequence from
	working correctly.

Address Family::
Selected IP address family for network connections.
As per DNS:::
	Uses the first address returned by getaddrinfo()
IPv4 only:::
	Will only connect over an IPv4 address.  If none is
	available, the connection will fail.
IPv6 only:::
	Will only connect over an IPv6 address.  If none is
	available, the connection will fail.
 
Font::
Choses a font (and by implication, a codepage) for the connection.
Custom fonts are also listed in this menu.

Hide Popups::
Do not show status and progress popups.

RIP::
Selects the version for Remote Imaging Protocol ("RIP").
RIP allows graphics and mouse usage, and was used by doors and
BBSs starting in the early 90s.  The RIP support in SyncTERM is
not complete, and may not be compatible with other terminals.
RIPv1 is the one most commonly used by old BBS software, and it
requires that the Screen Mode be set to an EGA mode.  RIPv3
is an updated version that is not backward compatible, but can
be used in any mode.

Force LCF Mode::
This setting will force the DEC terminal
"Last Column Flag" mode to always be enabled.  This mode is almost
always used in modern terminal emulators, which are almost all
VT-102 emulators at least.  LCF controls the wrapping behaviour
when the cursor is on the last column of a line.  The specific
rules used are complex and not implemented the same in all terminal
emulators even today.

Yellow is Yellow::
By default, SyncTERM displays low-intensity yellow
as brown.  This originated in the IBM CGA monitors, and was carried
forward to EGA and even most VGA modes.  Some digital monitors that
were CGA compatible did not have the brown hack.  While the vast
majority of software will assume that low-intensity yellow should
be brown, this allows strict standard compliance.

SFTP Public Key::
For SSH connections, SyncTERM can open another SSH
channel and write the public key to .ssh/authorized_keys on the
remote, which will enable authentication using the private key on
at least OpenSSH and new versions of Synchronet.  This option
requires SFTP support from the remote side, and may cause connection
stability issues if SFTP is not available or does not work correctly.


==== Modifying the Sort Order

You can change the order that entries appear in the Directory via the
kbd:[Ctrl+S] key.  This brings up a menu where you can add entries by either
pressing Insert to add before the current item, or by pressing Return on
the enpty line at the end.  This will bring up a list of fields that can
be sorted on.

Pressing enter on a field will toggle if it's reversed (highest to
lowest) or not.


==== Viewing the Scrollback

When viewing the scrollback, the following keys are supported:

kbd:[↑]::
Move up one line

kbd:[J]::
Move up one line

kbd:[↓]::
Move down on line

kbd:[K]::
Move down one line

kbd:[Page Up]::
Move up one screen

kbd:[H]::
Move up one screen

kbd:[Page Down]::
Move down on screen

kbd:[L]::
Move down one screen

kbd:[Escape]::
Exit scrollback mode


=== SyncTERM Settings

The SyncTERM Settings menu has the following options:

Default Connection Settings::
Set the default values for a new directory
entry.  See Edit Directory Entry for details on these options.

Current Screen Mode::
Changes the current screen mode.  For directory
entries where the screen mode is "Current", will be used during the
connection.  This setting is not saved across program restarts.
To change the startup screen mode, see
<<_syncterm_settings>> →
<<_program_settings>> →
Startup Screen Mode.

Font Management::
Allows setting up custom font files.

Program Settings::
Allows changing settings that are preserved across
reboots.  Refer to the <<_program_settings>> section for details.

File Locations::
Shows the paths to the various files and directories
that SyncTERM will access.

Build Options::
Shows which optional components SyncTERM was built to support.


==== Current Screen Mode

This temporarily sets the screen mode.  A screen mode defines the number
of rows and columns in the window, which font size to use (8x8, 8x14, or
8x16), and the aspect ratio to scale pixels to.  The majority of these
modes are based on historical analog hardware modes, so most of them do
not use square pixels.  The main exceptions are LCD80x25, which is an
80x25 mode that uses square pixels and the 8x16 font, and VGA80x25, which
is an 80x25 mode that uses square pixels, the 8x16 font, and performs the
VGA column expansion to use 9 pixel wide cells.  For further details,
see the <<_text_modes>> section of the ciolib chapter.


==== Font Management

The Font Management menu allows you to add and remove fonts.  Each font
should have a unique name, and at least one file for 8x8, 8x14, or 8x16
fonts.  The font format is the one used by "DOS fonts".  You can insert
and delete items using normal UIFC commands.


==== Program Settings

Confirm Program Exit::
Asks if you are sure you want to quit when pressing
ESC or right-clicking in the main SyncTERM screen.

Prompt To Save::
If enabled, when SyncTERM is started with a URI that is
not in a dialing directory, asks if you want to add the entry to the
directory.

Startup Screen Mode::
The screen mode that is used when SyncTERM starts.

Video Output Mode::
The method of displaying SyncTERM output.  The options
will vary by OS, compile-time options, and installed libraries.  See
the -I option to SyncTERM for details on the various modes.

Scrollback Buffer Lines::
The maximum number of lines to keep in the
scrollback.  Once this number is reached, the oldest lines are
removed to make room for new lines.

Modem/Comm Device::
The device name for the Modem device.  For UNIX-like
systems, this will be something like "/dev/ttyd0".  For Windows, this
will be "COM1" to "COM9".  If it's COM10 or higher, it needs to be
specified as "\\.\COM10".

Modem/Comm Rate::
Specifies the speed to communicate with the modem at.
If set to 0, the speed is not set by SyncTERM, and the default is
used.

Modem Init String::
The string to send to the modem when the device is
first opened to prepare it to be used.

Modem Dial String::
A string that is sent immediately before the phone
number to cause the modem to dial.

List Path::
The path to load the personal dialing directory from.

TERM For Shell::
The value that the TERM variable is set to for shell
type connections.

Scaling::
Select to cycle through the values "Blocky", "Pointy", and
"External".  Blocky scales each pixel to a rectangle, and Pointy
will use 45° angles.  External will use hardware scaling if possible.
The quality of External scaling varies wildly based on OS, device
drivers, and output mode.

[[custom_screen_mode]]
Custom Screen Mode::
Allows defining the Rows, Columns, Font Size, and
Aspect Ratio of the "Custom" screen mode.


== Connected State

When you are connected to a system, there are a number of controls
available that are not sent to the remote.

For Curses and ANSI modes, only two controls are avilable, and they
are not available in other modes.  This is because these two modes
don't have access to keys that could not potentially be sent to the
remote.  To help avoid conflict with remote systems, the XON (kbd:[Ctrl+Q])
and XOFF (kbd:[Ctrl+S]) codes that are used for software flow control are
used.

kbd:[Ctrl+Q]::
Disconnects from the current session.

kbd:[Ctrl+S]::
Brings up the Online Menu (see below)

For all other modes, the ALT key is used for SyncTERM commands, and
the following combinations are supported:

kbd:[Shift+Insert]::
Pastes the current PRIMARY selection or clipboard
contents to the remote.

kbd:[Alt+B]::
View scrollback (See "Viewing The Scrollback")

kbd:[Alt+C]::
Capture Control.  Allows starting and stopping capturing the
session to a file.  Useful for stealing ANSIs and debugging
emulation issues.

kbd:[Alt+D]::
Begins a download from the remote system.

kbd:[Alt+E]::
Brings up the Dialing Directory

kbd:[Alt+F]::
Allows selecting a different font.  In some output modes, the
selected font will change text that is already on the screen.
In most modes however, only newly displayed text will be in the
new font.

kbd:[Alt+H]::
Hangup and return to the main menu.

kbd:[Alt+L]::
Send auto-login information.  For protocols that allow auto-
login, only the system password is sent.  For all others, the
username is sent followed by a carriage return, then the password
followed by a CR, then the system password followed by the CR.
If any of these are not configured for the current entry, neither
them, nor the CR are sent for that item.

kbd:[Alt+M]::
Changes the currently supported "ANSI" Music prefix.

kbd:[Alt+O]::
Toggles remote mouse support.  With the remote capturing mouse
events, it can be difficult to select text to copy.  kbd:[Alt+O] allows
taking the mouse away from the remote.

kbd:[Alt+U]::
Upload a file to the remote.

kbd:[Alt+X]::
Disconnect and exit SyncTERM.  Does not return to the main
menu.

kbd:[Alt+Z]::
Brings up the Online Menu (see below)

kbd:[Alt+↑]::
Selects the next fastest character pacing speed.  If the
fastest speed is currently selected, disables character pacing.
If pacing is currently disabled, selects the slowest pacing speed.

kbd:[Alt+↓]::
Selects the next slowest character pacing speed.  If
the slowest speed is currently selected, disables character pacing.
If pacing is currently disabled, selects the fastest pacing speed.


=== Online Menu

Allows menu-based selection of some of the above options, as well as
some less-common operations that don't have a keyboard shortcut.

Scrollback::
Same as kbd:[Alt+B]

Disconnect::
Same as kbd:[Alt+H]

Send Login::
Same as kbd:[Alt+L]

Upload::
Same as kbd:[Alt+U]

Download::
Same as kbd:[Alt+D]

Change Output Rate::
Allows selecting a specific character pacing to use.

Change Log Level::
Temporarily changes the file transfer log level

Capture Control::
Same as kbd:[Alt+C]

ANSI Music Control::
Same as kbd:[Alt+M]

Font Setup::
Same as kbd:[Alt+F]

Toggle Doorway Mode::
Turns on or off Doorway mode without the host
specifying it.  Can be used to recover from broken remote software.

Toggle Remote Mouse::
Same as kbd:[Alt+O]

Toggle Operation Overkill ][ Mode::
Turns on or off OO][ mode.
Can be used to recover from broken remote software.

Exit::
Same as kbd:[Alt+X]

Edit Dialing Directory::
Same as kbd:[Alt+E]


== Techical Details

The following sections delve deeper into technical details, and should
not be required for normal use.

=== Persistant State

SyncTERM will preserve a very small amount of state when exited normally
and restore it when the program is restarted.  At present, this state
is limited to the scaling factor applied to the window.  The scaling
factor is a floating-point value that indicates the largest value which
both the width and height can be multiplied by and still fit inside the
current window size.  If you manually resize the window only making it
wider for example, the additional width will not be saved as the height
will control the size the next time SyncTERM is started.

This state is only saved under two specific circumstances.  Either the
current text mode at exit is the same as the configured Startup Screen
Mode, or the Startup Screen Mode is "Current" and the current text mode
is "80x25".  In all other cases (such as after the Current Screen Mode
is changed), it will not be saved.  Also, it's only saved when the
program exits normally.  In the case of a crash, the setting will not be
updated.


=== Installing Terminfo Entry

When using *nix software through SyncTERM either locally via the shell
protocol, or remotely via SSH or as a door on a BBS, it helps immensely
if the remote has a terminfo entry for SyncTERM installed.  To install
the terminfo entry, follow the following steps:

1. Write the terminfo entry to a file +
`syncterm -T > syncterm.terminfo`
2. Compile the entry and install it +
`tic -sx syncterm.terminfo` +
By default, it is only installed for the current user.

Once the terminfo entries are installed, you can use them by setting the
`TERM` environment variable to `syncterm`.  In Bourne shells, this is
usually accomplished with the command `export TERM=syncterm`.

=== MBBS GHost

"GHost" in SyncTERM refers to the "Galacticomm Host Program" (called Ghost)
that was included in Major BBS and Worldgroup (MBBS/WG) that allowed a Sysop
to connect another (DOS-based) PC to the BBS by use of a null modem cable.
This was a way for a MBBS/WG Sysop to offer DOS doors, something that wasn't
normally possible.

The functions of the Ghost software itself are beyond the scope of SyncTERM,
and you should consult the MBBS/WG Ghost documentation for operation details.
However, broadly speaking, it worked like this:

1) MBBS/WG would send a signal down the null modem cable to alert the DOS PC
    (running Ghost) that it wanted to run a door.
2) Using a simple protocol, MBBS/WG would transmit information required to
    run the door (username, time remaining, whether ANSI-BBS graphics were
    supported, etc) to Ghost.
3) Ghost would then launch the door in DOS, using a batch file to call Ghost
    back once the door exited to wait for the next request.

While few people are connecting DOS-based PC's to anything by null modem
cables anymore, the Ghost protocol (as offered in SyncTERM) is still useful
because it's a way to run DOS doors inside a virtual machine and expose them
outside of that virtual machine.  The idea being that the VM would configure
a serial port as some kind of network passthrough, so when SyncTERM connects,
it's passed through to the VM and then Ghost.

One use case for this is to offer DOS doors in environments where it would
normally be difficult or impossible.  For example, a UNIX user could run
SyncTERM on a remote system in curses mode, where it would then connect to
a VM and launch a DOS door via Ghost.  This would all be presented to the
end UNIX user in a seamless way, so all they would see is the door startup.

The Ghost protocol consists of a single line starting with 'MBBS:',
terminated with \r\n, and contains five parameters:

MBBS: PROGRAM PROTOCOL 'USER' TIME GR

You don't need to worry about sending this since SyncTERM will format it
for you based on the SyncTERM configuration options.  But it is helpful
to understand how various SyncTERM options will translate to the Ghost
protocol parameters:

PROGRAM: The name of the DOS door/software to ask the Ghost side to run.
Configured in SyncTERM in the 'GHost Program' field of a directory entry,
or after the final slash in a ghost:// style URL.
For example: ghost://user@203.0.113.64/program

PROTOCOL: Always set to 2.  Not configurable in SyncTERM.

USER: Username of the person connecting.  Configured in SyncTERM in the
'username' field of a directory entry, or before the '@' in a ghost://
style URL.  For example: ghost://user@203.0.113.64/program

TIME: Amount of time the user has remaining.  Always set to 999.  Not
configurable in SyncTERM.

GR: Set to GR (for "GRaphics", meaning ANSI-BBS support) or NG
(for "No Graphics").  Always set to GR.  Not configurable in SyncTERM.

include::../conio/cterm.adoc[leveloffset=+2]
include::../conio/ciolib.adoc[leveloffset=+2]
