The sources are in a GitHub repository. To download the sources do:
git clone https://github.com/PerBothner/DomTerm
which defines the
You can use
terminal.js in your own application.
However, there is also some utility code, include standalone
terminal emulator applications.
The best terminal emulator experience at this time is probably the combination of libwebsockets 2.2 with the Electron front-end.
Another good application is
It uses the C++-based Qt toolkit
Needed packages are included with Fedora 24.
(Reports of attempt to build or use qtdomterm on other platforms
would be welcome.)
Building the sample applications and libraries is a two-part process:
If building from the
This runs the GNU autotools (
Then run the
configure-options can be:
Build the C application
which uses libwebsockets.
lws-build is specified, it should be the path
build subdirectory of the libwebsockets compiled source tree.
While using libwebsockets version 2.2 or newer is strongly recommended. (Older versions do not support flow control or paging.)
On Fedora, you need to first:
sudo dnf install libwebsockets libwebsockets-devel json-c json-c-devel openssl-devel
This is the recommended “backend” and the default.
Build a WebSocket server, using Java WebSockets, which allows using any modern browser as a front-end. This server is no longer recommended or enabled by default.
This options adds the classes in
Compile support for PTYs (pseudo-teletypes). This allows character mode: sending individual characters (rather than lines) from the front-end to the back-end. This is the default, except on Windows (which doesn’t support PTYs).
Use JavaFX to run standalone applications.
does not need to be specified if using Java SE 8.
It may be needed for OpenJDK or Java SE 7,
in which case it is either a path to
or (for convenience if using Java SE 7) the
Disable building anything that depends on Java.
Use Qt and QtWebEngine
qtdomterm, an advanced front-end that
supports multiple tabs, screen re-sizing, and other nice features.
For this you need the Qt development tools including QtWebEngine installed.
For Fedora, you also need:
sudo dnf install qt5-qtbase-devel qt5-qtwebchannel-devel qt5-qtwebengine-devel
to be compiled into the executable.
Otherwise, they are served from the compressed
This is an experimental feature to preload a library to interpose
some system functions. Most importantly it overrides
so that DomTerm gets notified on term terminal mode changes.
To test it, you can try either:
Either starts up a useable terminal emulator in a fresh window.
The former starts up a
bash shell, running in a PTY,
with a libwebsockets server. It also starts a stripped-down browser window,
using that for the input and output
The latter (obviously) runs qtdomterm.
qtdomterm executable has no external dependencies
(besides the Qt libraries), and you can copy to wherever you want it.