FIM - Fbi IMproved README document.


FIM (Fbi IMproved) is a highly customizable and scriptable image viewer targeted at the users who are comfortable with software like the Vim text editor or the Mutt mail user agent, or keyboard oriented, full screen programs. FIM aims to be a "Swiss Army knife" for viewing images.

FIM is multidevice: it has X11/Wayland support (via the SDL and GTK libraries), it supports ASCII art output (via the aalib and libcaca libraries), and because it derives from the Fbi image viewer (by Gerd Hoffmann), it can display images in the Linux framebuffer console, too.

FIM is free software, distributed under the terms of the GPL software license.


2 Description


FIM invocation is documented in `man fim` (doc/fim.man.html). The FIM language (syntax, commands, variables, key bindings) is documented in `man fimrc` (doc/fimrc.man.html).

FIM offers many ways for scaling, orienting, listing or rearranging the ordering of images.
FIM is capable of regular expressions based (on filename) vim-like autocommands, comment-based search and filtering, display of EXIF tags, customizable command lines, and use a custom font (from console fonts). FIM offers GNU `readline` command line autocompletion and history, completely customizable key bindings, internal/external scriptability (through return codes, standard input/output, commands given at invocation time, and an initialization file), internal filename-based image search, and more. Each documentation item is accessible via the internal `help` command.


3 Features, comparison to other image viewers


Features

The next table is a comparison (very outdated...) of popular image viewers available on Linux, focusing on FIM-like free software ones.

| Program: |kuickshow|eog|xz|gv|fbi|FIM|GQview|dfbsee|pv|qiv| |--------------------------------|-----|---|--|--|---|---|------|------|--|---| |status:(a)lpha/(m)ature | m | m | m| | a | m| m | |m | m | |X=X,f=framebuffer,s=SVGA,a=ascii| X | X |Xs| X| f |fXa| X | ? |f | X |

|linux specific                  |     |   | ?|  | * |  |      |      | | ? |
|key rebindings                  |   * |   |  |  |   |  *|   *  |      |  | ? |
|external scriptability          |     |   |  |  | ~ |  *|      |      |  | ? |
|internal scriptability          |     |   |  |  |   |  *|      |      |  | ? |
|internal scriptability          |     |   |  |  |   |  *|      |      |  | ? |
|printing support                |   * | * | ?|  |   |   |   *  |      |  | ? |
|slideshow                       |   * | * |  |  | * |  *|     |      | | * |
|caching                         |   * | ? |  |  |   |  *|   *  |      |  | ? |
|preview browser                 |   * |   |  |  |   |   |   *  |      |  | ? |
|EXIF tag display                |   * |   |  |  | * |  *|   *  |      |  | ? |
|internal windowing              |     |   |  |  |   |  X|      |      |  | ? |
|internal image search           |     |   |  |  |   |  *|      |      |  | ? |
|external image search           |     |   |  |  |   |   |   *  |      |  | ? |
|'pan views' ('rich' views)      |     |   |  |  |   |   |   *  |      |  | ? |
|system interaction              |   * |   |  |  |   |  *|   *  |      |  | ? |
|system interaction safe         |   * |   |  |  |   |   |      |      |  | ? |
|remote commands                 |     |   |  |  |   |   |   *  |      |  | ? |
|saves last folder               |   * |   |  |  |   |   |   *  |      |  | ? |
|runs under screen               |     |   |  |  |   |  *|      |      |  | ? |
|standard input interaction      |     |   |  |  |   |  *|      |      |  | ? |
|rotation                        |   * | ? | ?|  | ? |  |   ?  |  ?   | | * |
|history                         |     |   |  |  |   |  *|      |      |  |   |
|multi-device                    |     |   |  |  |   |  *|      |      |  |   |
|mirroring                       |     |   |  |  |   |  *|      |      |  | * |
|description files               |     |   |  |  |   |  *|      |      |  |   |

Other nice command line picture viewers: pv (http://www.trashmail.net/pv/), zgv, feh, sxiv, mirage...



4 Build, test, example


Requirements are:

Libraries originally required by Fbi-1.31 but not by FIM:

libFS, libCURL, libLIRC

Usually, building and installing FIM proceeds like:

        ./configure --help # get options you may pass to configure
        ./configure
        make
        make test
        sudo make install

If you wish to run `./configure` again with different options, it is recommended to `make clean` before that.


4.1 Test

        # run fim in interactive mode (press q to quit)
        make test

        # run the test suite
        make tests

You can also run separately parts of `make tests`:

        # run only -o fbdev tests (if disabled, fail)
        make fbtests

        # run only -o gtk tests (if disabled, fail)
        make gtktests

        # run only -o sdl tests (if disabled, fail)
        make sdltests

        # run only -o aa tests (if disabled, fail)
        make aatests

        # run only -o ca tests (if disabled, fail)
        make cacatests

4.2 Example on Debian

        sudo apt install subversion
        sudo apt install flex libfl-dev bison
        sudo apt install automake autoconf libtool # to generate configure, etc
        sudo apt install pkg-config                # to generate configure
        sudo apt install libreadline-dev libexif-dev
        sudo apt install libjpeg-dev libpng-dev libtiff-dev libgif-dev
        sudo apt install libsdl2-dev libaa1-dev libcaca-dev libgtk-3-dev
        # the following are experimental, less recommended:
        sudo apt install libpoppler-cpp-dev libpoppler-dev libpoppler-private-dev
        sudo apt install libdjvulibre-dev libspectre-dev
        sudo apt install libqoi-dev libwebp-dev libavif-dev
        sudo apt install libarchive-dev
        svn co http://svn.savannah.nongnu.org/svn/fbi-improved/trunk/ fim
        cd fim
        autoreconf -i
        ./configure --enable-aa --enable-caca --enable-sdl --enable-gtk
        make
        sudo make install

5 Run time requirements



6 Original Idea


FIM derives from the wonderful fbi-1.31, written by Gerd Hoffmann/Knorr: ( Fbi can be obtained at https://www.kraxel.org/blog/linux/fbida/ ).

It all started in 2005, developing a small 'vim-like fbi patch', and following features to enrich Fbi with a command line and more customizations.

FIM is a significant reorganization and expansion of the Fbi code, and aims at obtaining the most scriptable and configurable image viewer ever.


7 Notes for patch writers


To run, FIM requires a Linux box with X, or the framebuffer device enabled in the kernel, and some popular image file decoding libraries.

Information about the framebuffer can be found under the directory "./Documentation/fb"
inside the kernel tree
(usually "/usr/src/linux/Documentation/fb" ).

The file decoding libraries are listed in an earlier section. Tested and working with library SDL-1.2.12 through SDL-1.2.15. Experimental support for SDL-2.0 and GTK-3.0.

From the original Fbi README, it reads that Gerd himself wrote FBI hacking "a svgalib PhotoCD viewer", so regard this software as a big, dirty code potpourri :) .
For the sake of completeness, FIM started as a fork of version 1.31 of fbi, available from http://dl.bytesex.org/releases/fbida/fbi_1.31.tar.gz .

Useful documents I've read and consulted during the coding of Fim, and useful for hacking it:

Further useful documents:

Useful URLs:

Platforms tested in the past versions (fim-0.3...):

If you intend to write patches or contribute to the code, be sure of reading all of the documentation and write me an email first (I will give you some advice).


7.1 Hacking, maintenance guidelines

If you hack FIM in an interesting way, consider submitting your changes as a patch.


8 Availability in Linux distributions



8.1 Debian, Ubuntu

You should find fim in Debian and Ubuntu, and install it with:

sudo apt install fim

But beware: the deb packages may be outdated.

In order to build from repository, you are advised to install packages from the following (overly complete) list:

autoconf autoconf-archive autoheader automake autotools-dev bison ctags flex groff g++ libaa1-dev libcaca-dev libdjvulibre-dev libgif4 libgif-dev libjpeg-dev libncurses5-dev libpng-dev libtiff-dev libexif-dev libpoppler-cpp-dev libpoppler-dev libpoppler-private-dev libreadline-dev libsdl2-dev libspectre-dev libtool m4 make svn txt2html

The above list was valid on a Debian Jessie installation; it's possible that these packages names change with time.


9 License


FIM is free software, and is licensed under the GPLv2 or later. FIM has been written by Michele Martone.

FIM started as a fork of fbi-1.31 by Gerd Hoffmann, which is "GPLv2 or later". FIM uses the PCX reading code contributed by Mohammed Isam. FIM also uses a regex.c file from the GNU Regular Expressions library, distributed on http://directory.fsf.org/regex.html, in the version shipped with the Mutt mail user agent ( http://www.mutt.org ). It also uses scripts shipped with the Vim text editor (http://www.vim.org), which is licensed compatibly with the GPL. The FIM source code package includes the Lat15-Terminus16.psf file, originally from the GPL licensed Terminus Font package, version 4.30 authored by Dimitar Toshkov Zhekov.


10 Contacts, mailing lists, URLs


FIM is (C) 2007-2024 Michele Martone.

Email: "dezperado_FOobAr_autistici_Baz_org", just care replacing

FOobAr with a '@' and Baz with a '.'. GPG Key: 0xE0E669C8EF1258B8
GitHub: https://github.com/michelemartone

If it is for a bug report or installation help, be sure of reading the documentation and the BUGS file first.
FIM is not perfect: a number of weaknesses are summarized in the man pages, the TODO file, and the BUGS file.

Homepage : https://www.nongnu.org/fbi-improved/

Savannah Page: http://savannah.nongnu.org/projects/fbi-improved/

Announcements: http://freecode.com/projects/fbi-improved/

Mailing List : http://savannah.nongnu.org/mail/?group=fbi-improved

(or http://lists.nongnu.org/mailman/listinfo/fbi-improved-devel)

Releases : http://download.savannah.nongnu.org/releases/fbi-improved

Repository : http://svn.savannah.nongnu.org/svn/fbi-improved

Off. Mirror : http://www.autistici.org/dezperado/fim/

ChangeLog : http://svn.savannah.nongnu.org/svn/fbi-improved/trunk/ChangeLog

Bugs (official) : http://savannah.nongnu.org/bugs/?group=fbi-improved

$Id: README.html,v 1.57 2024/05/22 22:22:50 dezperado Exp $ vim:tw=78:fo=tcq2:isk=!-~,^*,^\|,^\":ts=8:ft=markdown:norl: