Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
oterm is a web browser unix terminal. It serves a console so you can access your server from anywhere in the world where you have an Internet connection. It effectively is an xterm in a browser.
- Standalone Just the executable contains everything you need to serve the terminal.
- Secure It uses SSL to ensure you use a secure channel.
- Authenticated It uses PAM to check user authentication, so its easily extensible to use passwd, LDAP, htpasswd files...
- Session management It exports as many sessions as wanted, per user. So its also a screen replacement.
- AGPL license.
As an example of what is possible, vi, vim, emacs, zile, htop, top... all work perfectly.
As its over HTTP, there is no connection session, so user can disconnect and come back whenever they feel is necessary, with no need to close the sessions.
- Some escape codes There are still some escape codes that are not implemented.
- Better line handling. Currently there is no automatic new line when line overflow, which results on something weird.
- On reconnect, there is no buffer of current state of the terminal, so a terminal redraw has to be requested. Normally that's just a Control-L.
- some more session management: close terminals, some signal when terminal process finishes.
The handler itself creates the pty (forkpty, set permissions...) and stores all that on the user session.
The input of data is made at oterm/PID/in, and it is a POST with the data at the parameter data. The output is in another channel, oterm/PID/out, and it blocks until there is some data available, then it reads as much as possible and sends it. The AJAX client when receives that data processes it, and asks for new data. With this simple in/out trick we can have the same functionality as WebSockets, but asynchronously.
Its recommended that you download libonion and compile oterm yourself, anyway here are statically linked binaries that should work on a proper Linux environment. They are compiled with Ubuntu 11.04, but should work on any other environment.