Downloading and building

Getting the DomTerm source code

The sources are in a GitHub repository. To download the sources do:

git clone

Building from source

The core part of DomTerm is the JavaScript code terminal.js, which defines the DomTerm class. 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 combineation of libwebsockets with Google-Chrome in “app” mode.

Another good application is qtdomterm. It uses the C++-based Qt toolkit including QtWebEngine. 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 git respository, first do:


This runs the GNU autotools (aclocal, autoconf, and automake).

Then run the configure script:

./configure configure-options

where configure-options can be:


Build the C application ldomterm, which uses libwebsockets.

On Fedora, you need to first:

sudo dnf install libwebsockets libwebsockets-devel json-c json-c-devel vim-common

(You need vim-common for the xxd tool, only used at build time.)

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 java_websocket.jar to domterm.jar.


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. The library-name 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 jfxrt.jar, or (for convenience if using Java SE 7) the JAVA_HOME.


Disable building anything that depends on Java.


Use Qt and QtWebEngine to build 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.


Use Google Closure Compiler to minimize the size of the JavaScript. (Current only the “simple optimizations” are done. Using the “advanced optimizations” would reduce the JavaScript file siew further, but causes some not-yet-resolved problems.)


This feature causes the html, JavaScript and css files needed by DomTerm to be compiled into the executable. Otherwise, they are served from the compressed domterm.jar.


This is an experimental feature to preload a library to interpose some system functions. Most importantly it overrides tcgetattr so that DomTerm gets notified on term terminal mode changes.

Then just:


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 of the bash shell. The latter (obviously) runs qtdomterm.

The qtdomterm executable has no external dependencies (besides the Qt libraries), and you can copy to wherever you want it.