12 comments

[ 0.17 ms ] story [ 39.2 ms ] thread
This is cool. I am tired of switching between my browser and terminals.
I've always wonder if the reverse could exist, i.e. an xterm that could render html?
When I read this, the things that came to mind were elinks, lynx, w3m and the browser that lives in emacs. But maybe that's not what you mean - could you distinguish what you're describing from these?
(comment deleted)
In its simpliest form extending/replacing escape characters with html codes and having the terminal render all these; images, colours, canvas, whatever. Alowing cli apps to do their work but enjoy the fruits of modern graphics. My thinking is quite niave as i expect the cheif issue is that so much modern html is persistent (videos playing etc) and the terminal world is more linear. Perhaps making it useless to connect these concerns in all but trivial cases. I tend to use the command line a lot and like browsers such as uzbl.
w3m can display images in a X terminal (rxvt, xterm). It renders html as terminal text too of course. I suppose you could imagine rendering the whole thing (including fonts and text and whatnot) in a PixBuf and then display that in the X term but I fail to see why you would do that instead of having it done directly on X.
There's been a number of augmented terminal programs, such as Mozilla's ancient XMLterm: http://www.xml.com/pub/a/2000/06/07/xmlterm/index.html

I think the big problem is none of them have got the balance right between offering more capabilities that are actually useful vs. how intrusive they are.

Had exactly the same idea a few months ago, which resulted in 'Schirm': https://bitbucket.org/hoeck/schirm, screenshots: http://imgur.com/a/N84aw.

Its a VT100 (+colors) compatible terminal emulator (pyte) hacked to render into an HTML document, displayed using Webkit (pywebkitgtk). Currently requires python2.7, gtk, webkitgtk (only tested on Ubuntu 11.04 so far). Html output is done by using escape sequences to mark beginning and end of html strings or base64 encoded resources (js, images ...). You can even use js frameworks (used jQuery + d3.js to generate the circular tree in the 2nd screenshot). Communication between the terminal emulator and the client can be achieved by using console.log messages or some kind of HTTP (over stdin/stdout). Would love to get some feedback.