Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This is a quick mockup I copy and pasted together. I imagine this being super cool and useful.

Does something like this exist already?

http://imgur.com/Z3DbS

share|improve this question

7 Answers 7

You cant do so in a terminal, but you can do so in a tty using fbi. You need a framebuffer to allow this to work

sudo apt-get install fbi

Go to a virtualterminal(TTY) and enter fbi <filname>

It should show your image

share|improve this answer

There's actually such a project named TermKit, if you'd like to test it - check out http://blog.easytech.com.ar/2011/05/21/playing-with-termkit-with-chrome/ but it's quite unfinished (since you seem to have a Mac, you should try the Mac-version since it's "the original")

So yes, it's an idea worth exploring, however - the switch between graphical and text-only mode must be quick since I don't always need the images viewed. Also - it needs to be fully compatible with e.g. Vim..

share|improve this answer
    
I read about this project once before on Slashdot. Sounds intriguing! Too bad you need Google Chrome to use it...well, okay, it's not too bad if you use Chrome to begin with, but it seems like an unnecessary dependency. –  WarriorIng64 Jan 22 '12 at 10:58
    
@WarriorIng64 Yeah, I it could work if you hack a bit with Qt's WebKit - but fortunately we have the chromium-browser in the repos, so that it's quite easy to install something Chromelike - I haven't really tried TermKit on my computer (w/ Chromium installed, but using Fx as main) since I'm quite dependent on Vim, and can't really use a terminal that won't give me my beloved text editor ;) –  sakjur Jan 22 '12 at 11:01

Maybe caca is what you want. For images:

sudo apt-get install caca-utils
cacaview /PATH/TO/image.jpg

Make sure your terminal window is big enough.

I sometimes used it for fun to watch videos as ASCII in mplayer :) Like this:

mplayer -vo caca /PATH/TO/video.mpg
share|improve this answer
    
Very helpful - a command from caca-utils that should display images inline in the terminal is img2txt –  Wilf Jul 18 at 21:02

This does not exist; gnome-terminal is only capable of diplaying text, at least as far as I know.

However, you can call an image viewer from the commandline to see your pictures in a particular folder. So, going off of your mockup above showing you listing all .jpg pictures in the current folder, you can use Eye of GNOME (Ubuntu's default image viewer) from the commandline for something similar:

eog *.jpg &

Note that the window which comes up will only show one image at a time, though you can use the provided arrow buttons to cycle between them.

share|improve this answer
    
if running from a terminal, eog *.jpg & disown is better as otherwise the EOG will likely exit when the terminal closes. N.B. I wish EOG was still Ubuntu's defualt image viewer - shotwell is good, but tries to index my 30GB+ of pictures.... and is slow and annoying anyway –  Wilf Jul 18 at 21:13

I wrote a tool to do this. I named mine Show Image In Terminal ("shit"). It assumes you have a 256 color term and UTF8 support, and it's written in perl. I drop it in my ~/bin. It assumes you have Image::Magick, Term::Size, Getopt::Long and Time:HiRes, which should all be available in your distro's repositories, or CPAN. My intent was to ssh into my house, and quickly view images without launching a display over X. Script scales to appropriate width/height for the terminal you are in. I used UTF8 characters to effectively double the vertical resolution of your terminal, which really helps clarity. YMMV.

Sample shots here

Source code here

share|improve this answer

Another alternative is terminology:

enter image description here https://www.youtube.com/watch?feature=player_embedded&v=ibPziLRGvkg

You can install it on ubuntu by adding Hannes Janetze e17 repository:

sudo add-apt-repository ppa:hannes-janetzek/enlightenment-svn
sudo apt-get update && sudo apt-get terminology
share|improve this answer

Here are some solutions in node.js (Installation instructions here).

  1. picture-tube

  2. imaging

To install either, type npm install -g <package_name> where package_name is either of picture-tube or imaging.

share|improve this answer

protected by Braiam Feb 26 at 23:17

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

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