A graphical terminal requiring no serverside support. Available for MacOS X, Linux and iOS.
It's not well known, but graphical terminals have been around for more than 25 years. One of the earliest implementations was in the VK100 (or “GIGI”) terminal, released in the early 1980s, it used a graphics drawing langauge called ReGIS. Lucky Gnuplot still supports ReGIS, and we can use this capability to render simple graphics simply and quickly in the terminal. See the examples sections for a quick walkthrough.
However a lot of the time you want more than just a quick plot. A common usecase might be checking the contents of an image on a webserver or viewing an image attached to an email. Without inline image rendering your stuck trying to find a back-channel to transfer the file across. Not always easy if you're bouncing through multiple servers. For this reason hterm supports inline rendering of PNG files, with almost no serverside support requirements. All you have to do is:
echo HTERMFILEXFER;base64 myimage.pngThe terminal client will decode and render the PNG file as it streams into your terminal. Check below for more examples.
1 10 2 20 3 40 4 80 5 160 6 320 7 640Now create another file called data.gnuplot with the following contents:
set size square set ylabel "Pageviews" set xlabel "Time" set terminal regis plot "data.dat" using 1:2 with linesThe run gnuplot:
echo HTERMFILEXFER;base64 image.pngIf you use a terminal based mail reader like mutt or pine you can setup your mailcap to automatically view PNG files. Just add the following line to ~/.mailcap:
image/png; echo HTERMFILEXFER && base64 %s && read v && clear