Some notes on how sessions and windows are named and identified.
The session name is an optional user-specified name for a terminal session.
It is recommended that this be unique, but that is not enforced.
The session name can be specified with the
--sn) option in the
domterm new command.
You can also dynamically change the session name with an escape sequence:
echo -en "\e]30;
It is recommended (but not required) that a session name have the format of an “identifier”: The first character should be a letter, and the rest should be letters, digits, hyphen, or underscore.
The session number is a positive integer associated with a terminal session. It is unique within a domterm server.
domterm attach command requires a session specifier,
which can be any one of:
A session name.
A colon followed by a session number.
A process number (pid).
Each DomTerm instance in a browser has a corresponding
<div> element which has
domterm in its
<div class="domterm"> element also has the following
identifying attributes, which can be used for session-specific styling:
(but only if the
session-name has been set).
The window name is a short name displayed for each terminal in the window title or tab. It is constructed from up to 3 parts:
The session name, or
DomTerm if the session name is not specified.
If the session name is unset or not unique, we add a colon and the session number.
If there is more than one window attached to the same terminal, then we add a period followed by window number.
The window and icon titles are strings sent by the application.
The escape sequences are those of xterm.
They are commonly sent by shells (for example using bash’s
PROMPT_COMMAND) and may include the current directory and maybe
Most terminal emulators include the window title string
in the window title bar.
When tabs are used, DomTerm displays the window name in each tab. For active tabs, DomTerm displays both the window name (normally the session name) and the window title (typically the current directory). This information may be shown in the main window title bar as well as the currently active tab.