Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there any way to display an image over SSH? There is not need for good quality, I just need an idea of what is in the images. Mostly these are icon files for websites and such. Sometimes I can just forward X over SSH and use display but sometimes I can't. I don't mind working in a non-X tty for applications such as fbi.

I have tried jp2a but most of the images are in .png format and it is cumbersome to convert each one to check what is in them. Also, by using only the ASCII characters the display is very very limited. Perhaps if it could use arbitrary UTF-8 characters this could be better.

I have tried fbi but it complains ioctl VT_GETSTATE: Invalid argument (not a linux console?) even when I'm SSHing in through a non-graphical tty. I did try the -T 2 option which doesn't throw any errors but I don't see the image. I suspect that the image is being 'displayed' on tty2 of the server, which I have no way to see (I could not get to it with chvt 2 even though I have root access).

I have tried links, w3c, and other console browsers but the best that I've gotten out of them is to see the image file displayed as if it were run through cat.

I have tried mplayer's console output options but those only support video, as they are in fact video codecs.

I have tried zgv however as a normal user it complains you must be the owner of the current console to run zgv and as root it just hangs, no output.

share|improve this question
add comment

2 Answers

up vote 5 down vote accepted

Try 'img2txt'. For Ubuntu it can be found in 'caca-utils' packet.

'caca-utils' seems to be also available as rpm.

share|improve this answer
    
I never heard of it before, but it seems perfect. +1 –  Hennes Jan 25 '13 at 12:22
    
Thanks, this works for colour as well. –  dotancohen Jan 25 '13 at 13:25
    
It works fantastically well. But I still can't make sense of the images, lol. –  Camilo Martin 2 days ago
add comment

Oneway to display an 'image' with a text screen is via aalib.

That will use ASCII chars to render an image, and if you have a large enough text area (sort of resolution) then you can recognise what is being shown.

You would run the conversion to ASCII-art/movies on the remote side of the SSH link.

Link: aalib demo on youtube.

Also, by using only the ASCII characters the display is very very limited.

Aye. Which means that unless you have a large terminal to play with you will barely recognisabnle images. If you can use a large terminal on a high density display (with sharp letters even when you use a tiny font) then it is useable.

share|improve this answer
    
Thanks. To use aalib, one must install (in Ubuntu) aalib1 and run it with asciiview file.jpg. That last command took me a while to figure out. –  dotancohen Jan 25 '13 at 13:25
1  
Revisiting this one year later, now to use asciiview one must install the aview package. –  dotancohen Jan 16 at 7:50
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.