What's a good browser-based terminal emulator? [closed]

自闭症网瘾萝莉.ら 提交于 2019-12-02 22:12:01

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.

I tried https://github.com/chjj/tty.js/ today and it works well, you can have a try.

Wondering how come nobody mentioned about http://shellinabox.com . I evaluated shellinabox & ajaxterm. Shellinabox is faster than ajaxterm (I do not know the internal details). Also, shellinabox can login a user without needing to give the user explicit ssh access (not sure if it is a great plus).

Shellinabox has issues running inside an iframe though. But if you are looking to run something standalone to access your server, guess shellinabox is the best bet.


I have been running Rails Tutorial site for sometime now. I eventually deployed Gateone - https://github.com/liftoff/GateOne‎ but it had quite a few issues with browser + OS combinations. Finally we created our own pseudo terminal (it does not support vim etc). Check https://github.com/pocha/terminal-codelearn .

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!