Viewing Images With Elinks
Posted 07-30-2010 at 01:33 PM by uxrs75
Tags browser, cli, elinks, framebuffer
Programmes: elinks, fbida
Files to edit: ~/.elinks/elinks.conf
Start by installing a suitable image viewer. I use fbida, as it provides both a framebuffer-, and X-based image viewer (fbi and ida respectively).
Next, add some MIME types to elinks.conf.
Now add the following handlers:
The unix entry defines elinks' behaviour in the console, while the unix-xwin entry defines its behaviour under X. 1 = yes, 0 = no. In the last two entries, elinks is being told to use fbi to display images in the console, and ida in X.
Lastly, the image types need to be associated with the image viewer. Be sure that you have one entry for each of the previously defined mime.extension entries from above.
Once done, save, exit, and start elinks. Find a page that you know has images and move the cursor to one. Hit Enter. If you're in X, ida will automatically display the image in a separate window. If you're in the console, fbi will open the image in the frame buffer. To exit fbi, hit q, and you're back in elinks.
Just a note, if you're running elinks under screen, you won't be able to display images using fbi, but aside from that, you'll be able to view any statically linked image on the internet. Enjoy.
Files to edit: ~/.elinks/elinks.conf
Start by installing a suitable image viewer. I use fbida, as it provides both a framebuffer-, and X-based image viewer (fbi and ida respectively).
Next, add some MIME types to elinks.conf.
Code:
set mime.extension.jpg="image/jpeg" set mime.extension.jpeg="image/jpeg" set mime.extension.png="image/png" set mime.extension.gif="image/gif" set mime.extension.bmp="image/bmp"
Code:
set mime.handler.image_viewer.unix.ask = 1 set mime.handler.image_viewer.unix-xwin.ask = 0 set mime.handler.image_viewer.unix.block = 1 set mime.handler.image_viewer.unix-xwin.block = 0 set mime.handler.image_viewer.unix.program = "fbi %" set mime.handler.image_viewer.unix-xwin.program = "ida %"
Lastly, the image types need to be associated with the image viewer. Be sure that you have one entry for each of the previously defined mime.extension entries from above.
Code:
set mime.type.image.jpg = "image_viewer" set mime.type.image.jpeg = "image_viewer" set mime.type.image.png = "image_viewer" set mime.type.image.gif = "image_viewer" set mime.type.image.bmp = "image_viewer"
Just a note, if you're running elinks under screen, you won't be able to display images using fbi, but aside from that, you'll be able to view any statically linked image on the internet. Enjoy.
Total Comments 0




