I often work via SSH - in fact, I do this a LOT. When you do this you have no GUI apps - this works fine for a lot of things but sucks for viewing images and at times you’re gonna ask yourself “Hmm, this file called mainimage.png - what does it look like?”

~$ gimp: command not found
~$ eog: command not found
~$ nautilus: command not found

This is not helping! You can find out some information about the file with the identify command (and probably others):

~$ identify mainimage.png</span></li>
mainimage.png PNG 1600x1200 1600x1200+0+0 8-bit DirectClass 1.893MB 0.000u 0:00.000

… but you still don’t know what it looks like. Enter “shit” - [sh]ow [i]mage in [t]erminal (a perl script by Tom Allen). This script is a great addition to the tools of a terminal worker.

You simply specify the file you want to display, e.g.:

~$ shit RagingUbuntu.png

Screenshot #1

It’s even clever enough to inspect your terminal metrics meaning that if the terminal is larger you will see more pixels in the terminal:

Screenshot #2

And if you need heaps more detail just make your terminal font smaller…

Screenshot #3

Clever Shit

By using 0x2584 - the Unicode character “Lower half block - with different foreground and background colours the terminal resolution can be doubled. I love that it does this!

shit uses unicode characters to improve resolution

Where to get shit

As far as I can tell this is the current official home of shit:

http://antipathy.nonserviam.net/utilities/shit

On a standard Ubuntu system you will need to install the following packages also:

sudo apt-get install perlmagick libterm-size-perl