Quick Hack: Terminal apps in your browser

about | archive

[ 2017-March-04 10:38 ]

Google Cloud Shell and the SSH button in the Cloud Platform console are pretty handy: Click a button and you get a terminal prompt in your browser, logged in to the correct server. I find this more convenient than finding the IP and copy-and-pasting into my terminal (although it can be a bit slow, so I still often use a "real" shell). At some point I discovered that this uses hterm, Chrome OS's terminal. I wondered if I could make my own web menu, with links to get a MySQL prompt connected to various database instances. I created a hacky server that hterm can connect to, which I've put on Github. I'm not sure anyone will find it useful. However, it should be easy to customize the demo if you want to build your own web-based terminal menus. Here is what the example demo looks like if you run it. The menu shows a list of hard coded choices (ls, vi, and man bash). Clicking on a choice launches that application. The example here shows vim.

demo menu vim launch from menu