Hacker News new | ask | show | jobs
by new299 4450 days ago
Yes, it would be better to use escape sequences. If I remember correctly there were issues with terminal multiplexers stuffing data into the stream. So you'd need something smart serverside to escape each chunk.

In the current implementation, the server can be pretty dumb (i.e. all you need is a bash script). This was a requirement for me, because I spend a lot of time jumping between different Linux boxes which aren't configured as I might like them to be (in particular I wanted something that work when bouncing though odd ssh gateways etc).

So overall, the png rendering is intended as a quick hack, for when you want to render data quickly. As a proper inline rendering solution, it would be nice to add support for Sixels (http://en.wikipedia.org/wiki/Sixel) or something similar. If you google around I think there are a few terminals that support that, but none of them suited my requirements.

Overall, I was kind of happy with the code as a proof of concept, and still use the iOS version every day (it's a free iOS ssh client and does all the graphical support stuff). There's a lot that could be done though. Ideally I'd like to abstract out the ReGIS code, add Sixels support and then integrate that code into existing Linux and OSX terminal apps.