It’s only been in the last couple of years that I’ve begun to dig deep into the inner workings of how terminal emulators, and the applications that run inside of them, really work. I’ve learned that there is a lot of innovation and creative problem solving happening in this space, even though the underlying technology is over half a century old.
I’ve also found that many people who use terminal based tools (including shells like Bash and editors like Vim) know very little about terminals themselves, or some of the modern features and capabilities they can support.
In this article, we’ll discuss some of the problems that terminal based applications have historically had to deal with (and what the modern solutions are) as well as some features that modern terminal emulators support that you may not be aware of.
↫ Gregory Anders
I don’t use the terminal much – usually just to update my systems – but on occasion I’ve had to really sit down and explore them more than usual, especially now that my workstation runs OpenBSD, and the depth and breadth of features, options, and clever tricks they possess is amazing. Over the past half century they’ve accumulated a lot of features along the way, and even though its unlikely to ever be for me, I can somewhat begin to appreciate why some people just tile a bunch of terminals on their screens and do all their computing that way.
I grew up with MS-DOS and Windows 3.x and later, so I’m just too attached to my mouse and pretty icons to switch to a terminal lifestyle, but over the years I’ve seen some pretty amazing terminal applications, from Mastodon clients to complex mail applications and web browsers, and you can be sure none of them steal your data or show you ads.
Maybe the terminal people are right after all.
Thom Holwerda,
When DOS demos were popular, I do seem to recall exit screen ads inviting users to buy the full products. Although I don’t consider these in the same class as the 3rd party advertising networks that are infiltrating our computers today.
Oh, man. Please send $5 and a SASE to this address to get the full version on a floppy disk.
I’m back in a job working with Windows, and it’s the first time I haven’t logged in and fired up a terminal in a decade. It’s weird.
With my personal stuff, I still use a terminal daily. Using SSH to access a remote dev box is still ridiculously effective.
Back in the mid-90’s, a couple of us system admins at our company did an entire MCSE course on Windows NT administration using command line, just because we could. It was a blast to figure out how to do it all from a terminal, and it drove the course instructor up-the-wall.
LOL That’s cool.
I remember unearthing little tools for automation in batch scripts, but I never tried to manage a full windows install via the command line.
Supposedly, Powershell has improved the situation, and I’m going to find out if that’s the case.
You can absolutely use your mouse in a terminal window. Programs like “links” include mouse support so you can click on links, or click around menus (click near the top of the terminal window to open the menu bar).
http://elinks.or.cz/documentation/manual.html#CONFIG-MOUSE
tmux offers mouse support as well for selecting the active window and resizing windows:
https://github.com/tmux/tmux/wiki/Getting-Started#using-the-mouse
You can absolutely have “icons” and full graphics in the terminal as well:
The fast but less-pretty option is libcaca:
http://caca.zoy.org/wiki/libcaca
For slower performance but full quality graphics, sixel has been around for decades, and works with xterm and others:
https://www.illusioni.de/~phrank/shell/sixel.png
Or try a faster, shiny new protocol:
https://sw.kovidgoyal.net/kitty/graphics-protocol/
And programs that support it:
https://github.com/atanunq/viu
https://github.com/ranger/ranger/pull/1077
You can even play video in a terminal:
https://github.com/omduggineni/termvideo
https://justine.lol/printvideo.html
https://github.com/TheRealOrange/terminalvideoplayer
A surprising amount of TUIs do have mouse support. I have my local vim/neovim and tmux setup to recognize mouse clicks.
Nice, thanks for the link! A full TUI setup been a project I’d like to tackle for a while, but you know, time.
Flatland_Spider,
The mouse works fine under terminal, but I always end up turning off VIM’s mouse support because it interferes with the terminal’s copy & paste functionality that I need lot more frequently than point and click inside of VIM.
Also I also delete all of VIM’s auto indentation rules, I personally find it so annoying when editors do what they want rather than what you tell them to do.
stanf,
There are a lot of projects rendering “graphics” in text modes. Extended ASCII characters included blocks that let you output rudimentary block graphics. In the distant past I wrote a program to stream a live webcam feed onto an IBM PS/2 laptop in text mode.
https://www.wikiwand.com/en/IBM_PS/2_Model_L40_SX
It was dumb and pointless but at the same time it was pretty cool to see yourself moving in text mode, haha.