What's a good browser-based terminal emulator?

Castor picture Castor · Dec 22, 2009 · Viewed 13.3k times · Source

We have several curses style applications which we'd like to provide access to through a browser-based interface.

We have an application from another vendor which ostensibly provides this based on an old version of the JTA (Java Telnet App) but that applet doesn't handle things like resizing well, and has relatively poor support for scroll-back buffers and copy/paste.

In this day of Ajax-based interfaces, I'm curious if there are any good, free solutions.

Thanks to this web site, I saw references to Reflection's web-based terminal emulator, but that's probably too expensive for our needs.

Some of the potential candidates I've seen include

  1. anyterm
  2. ajaxterm

    No scrollback bar

but I haven't had a chance to do a detailed evaluation.

Answer

Daniel Cassidy picture Daniel Cassidy · Dec 22, 2009

I use Ajaxterm frequently as a handy way to administer a web server from anywhere. It worked well for me until I switched to Chrome as my primary browser. Ajaxterm works great with Firefox and IE8, but is unusable with Chrome, Safari and Opera.

I found that on Chrome, Safari and Opera, many ‘special’ keys don’t get passed through to Ajaxterm, including backspace, the arrow keys, ctrl+c, ctrl+h, home, end, etc. Opera is even worse: when you press shift, the keypress gets translated into ^P, so you can’t type capitals. These things are showstoppers for me; they are probably showstoppers for you too.

Anyterm worked fine for me in all browsers I tried, including IE6.

Other things to bear in mind:

  • Anyterm keeps a connection open constantly while it is running, and uses a second connection for keypresses. All browsers have a limit on the number of concurrent connections to a single host. IE 7 and below have a limit of two concurrent connections (as required by the HTTP spec), so a single instance of Anyterm could max out connections to that host much of the time. However this is reasonably easy to work round by simply using a separate hostname for Anyterm.
  • Ajaxterm polls for updates, so it does not keep a connection open constantly. It uses the same connection for keypresses and screen updates. On the other hand the screen does not always update as soon as it could, and the network overhead per screen update is greater.
  • Ajaxterm updates the whole screen in one go, even to change a single character. Anyterm updates only the portion of the screen that has changed. It is debatable which is faster; a whole screen can usually fit in a single packet anyway, and Anyterm’s approach has greater processing overhead, both on the server and client side.

Note: My comments on Ajaxterm are based on Ajaxterm 0.10. I haven’t tried 0.11, which apparently includes ‘minor patches’. My comments on Anyterm are based on the demos available on their site. I haven’t actually used it in anger.