Utility Software

GoTTy – turn CLI tools into web applications

In Operation

Here’s a very short video offering a demo of GoTTy in action.

Here we’re sharing a terminal session in which we start the program BpyTOP with GoTTy. BpyTOP is a resource monitor that shows usage and stats for processor, memory, disks, network and processes. As its name suggests, its written in Python.

What’s happening? When we launch GoTTY, it starts a web server on port 8080. With our web browser, we point it to this port at localhost i.e. address: 127.0.0.1:8080. We then see BpyTOP running in our web browser as if it was running in the terminal. We can change the IP address and the port number.

GoTTY is using xterm.js and hterm to run a JavaScript based terminal in the web browser. xterm.js is a front-end component written in TypeScript that lets applications bring fully-featured terminals to their users in the browser. hterm is a JavaScript library that provides a terminal emulator.

What are the use cases for GoTTy?

  • Allow users to run command-line programs of their choice without allowing them to log into the system via ssh.
  • Demonstrate command-line software to family, friends, and colleagues non-interactively.
  • Allow friends, friends and colleagues access to a  terminal under your supervision without them having to install any new software on their machine. By default, GoTTy doesn’t permit clients to send keystrokes or commands except terminal resizing. But running the program with the -w flag allows input from remote clients. This offers supervised instruction irrespective of the operating system / web browser the users are running.
  • Share a single process with multiple browsers using a terminal multiplexer.

When sharing (interactively or non-interactively), we strongly recommend using authentication, as by default GoTTy doesn’t encrypt traffic between the server and clients. Authentication can be basic, but we recommend using  SSL/TLS client certificate authentication at all times. This requires setting up certificates, but that’s a simple task.

Next page: Page 3 – Summary

Pages in this article:
Page 1 – Introduction / Installation
Page 2 – In Operation
Page 3 – Summary

Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Please read our Comment FAQ before posting a comment.

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments