FIM(1)

πŸ’… FIM(1) β€” General Commands Manual πŸ’…

okay bestie, buckle up, because this is fim β€” the Fbi (linux framebuffer imageviewer) IMproved, aka an universal image viewer πŸ¦‹. it's giving swiss army knife energy and honestly? she ate.


✨ NAME ✨

fim β€” Fbi (linux framebuffer imageviewer) IMproved, an universal image viewer πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

no cap, here's how you call her:

fim [{options}] [--] {imagepath} [{imagepaths}]
fim --output-device [fb|sdl|gtk|ca|aa|dumb][={gfxopts}]
... | fim [{options}] [--] [{imagepaths}] -
fim [{options}] [--] [{files}] - < {file_name_list_text_file}
fim --image-from-stdin [{options}] < {imagefile}
fim --script-from-stdin [{options}] < {scriptfile}
fim --help[=s|d|l|m] [{help-item} ...]

like, pick your fighter πŸŽ€


πŸ’– DESCRIPTION πŸ’–

so fim is a 'swiss army knife' for displaying image files. literally. she can display image files using different graphical devices while still offering a uniform look and feel β€” iconic behavior honestly. ✨

the key bindings? customizable, and specified in an initialization file. interacting with standard input and output is possible too, especially in shell scripts (iykyk). there's an internal scripting language specialized for image viewing that lets you do image navigation, scaling, manipulation of internal variables, command aliases, and Vim-like autocommands. and that internal language can be interacted with via a command line mode capable of autocompletion and history (the readline mode). further features are display of EXIF tags, JPEG comments, EXIF rotation/orientation, load of "description files", faster load via image caching, command recording, and much more. πŸ’…

okay so that's a LOT of features and every single one of them is real, bestie, not me exaggerating for the group chat.

as a default, fim displays the specified file(s) on the detected, most convenient graphical device. this can be with SDL if running under X, an ASCII-art driver (aalib or libcaca) if running behind ssh without X forwarding, or the linux framebuffer device. πŸ–ΌοΈ

graphical file formats BMP, PCX are supported natively, while JPEG, PNG, GIF, TIFF, PPM, PGM, PBM, QOI, AVIF, WEBP are supported via third party libraries. further formats are supported via external converters:

  • for XCF (Gimp's) images, xcftopnm or xcf2pnm is used.
  • for FIG vectorial images, fig2dev is used.
  • for DIA vectorial images, dia is used.
  • for NEF raw camera images, dcraw is used.
  • for SVG vectorial images, inkscape is used.
  • for other formats, ImageMagick's convert is used.
⏰ and heads up: the converter is given 15 seconds for the conversion before a timeout. no dawdling. periodt.

if {imagepath} is a file, its format is guessed not by its name but by its contents. πŸ•΅οΈβ€β™€οΈ see the _file_loader variable to change this default.

if {imagepath} is a directory, load files of supported formats contained there. if {imagepath} contains a trailing slash (/), it is treated as a directory; otherwise that is checked via stat(2). to change this default, see description of the _pushdir_re variable and the --no-stat-push and --recursive options. πŸ“

this man page describes fim command line options and usage. see man fimrc(5) for a full specification of the fim language, commands, keysyms, autocommands, variables, aliases, examples for a configuration file and readline usage samples. (yes, there's a whole other manual. she's thorough. πŸ’–)


🌸 USAGE 🌸

you may invoke fim from an interactive shell and control it with the keyboard, as you would do with any image viewer with reasonable key bindings. ⌨️

fim is keyboard oriented: there are no user menus or buttons available. if you need some feature or setting which is not accessible from the default keyboard configuration, you probably need a custom configuration or simply need to type a custom command. for these, you can use the internal command and configuration language. ✨

see options --read-from-stdin, --script-from-stdin, and --image-from-stdin for more script-oriented usages.

the full commands specification is also accessible at runtime using the internal help system (typing :help). 🫢


πŸ’… OPTIONS πŸ’…

accepted command line {options}, bestie, and there are a LOT so hydrate first:

  • -- β€” treat arguments after -- as filenames. treat arguments before -- as command line options if these begin with -, and as filenames otherwise. classic separator move, we love her.
  • -a, --autozoom β€” enable autozoom. automagically pick a reasonable zoom factor when displaying a new image (as in fbi). ✨ automagically. that's the technical term, we don't make the rules.
  • -b[24|1], --binary[=24|1] β€” display contents of binary files (of any filetype) as these were raw 24 or 1 bits per pixel pixelmaps. the width of this image will not exceed the value of the _preferred_rendering_width variable. regard this as an easter bunny option. 🐰
  • --as-text β€” display contents of files (of any filetype) as these were text. the width of this image will not exceed the value of the _preferred_rendering_width variable. non-printable characters are then displayed as " ". regard this as another easter bunny option. πŸ‡
  • --cd-and-readdir β€” step in the directory of the first file to be loaded, push other files from that directory, and jump back to the first file. useful when invoking from a desktop environment. πŸ–₯️
  • -c {commands}, --execute-commands {commands} β€” execute {commands} after reading the initialization file, just before entering the interactive mode. no semicolon (;) is required at the end of {commands}. do not forget quoting {commands} in a manner suitable to your shell. so -c next is fine as it is. a more complicated example, with quotings:
-c '*2;2pan_up;display;while(1){align "bottom";sleep "1" ; align "top"}'

(with the single quotes) tells fim to: double the displayed image size, pan twice up, display the image, and finally do an endless loop consisting of bottom and top aligning, alternated. iconic. πŸ”₯

  • -C {commands}, --execute-commands-early {commands} β€” similar to the --execute-commands option, but execute {commands} earlier, just before reading the initialization file. if {commands} takes the special 'early' form =var=val, it assigns value val to variable var immediately, before the interpreter is started, and with no value quoting needed. for example, -C '_scale_style=" "' starts fim no auto-scaling; the equivalent early form is: -C '=_scale_style= '. 🀯
  • -d {fbdev}, --device {fbdev} β€” framebuffer device to use. default is the one your vc is mapped to (as in fbi).
  • --dump-reference-help[=man] β€” dump to stdout language reference help and quit. πŸ“€
  • --dump-default-fimrc β€” dump default configuration (the one hardcoded in the fim executable) to standard output and quit.
  • -E {scriptfile}, --execute-script {scriptfile} β€” execute {scriptfile} after the default initialization file is read, and before executing --execute-commands commands. πŸ“œ
  • -f {fimrc}, --etc-fimrc {fimrc} β€” specify an alternative system-wide initialization file (default: /usr/local/etc/fimrc), to be read prior to any other configuration file. see also --no-etc-fimrc-file.
  • -F {commands}, --final-commands {commands} β€” similar to the --execute-commands option, but execute {commands} after exiting the interactive mode, just before terminating the program. the ✨farewell tour✨ option.
  • -h[s|d|l|m], --help[=s|d|l|m] β€” print program invocation help, and exit. depending on the option, output can be: short, descriptive, long from man, or complete man. for each further argument {help-item} passed to fim, an individual help message is shown. if {help-item} starts with a /, it is treated as a search string (not a regexp, though). πŸ”
  • -k {keysym}, --keysym-press {keysym} β€” execute any command bound (via the bind command) to a specified keysym at startup. a keysym can be prefixed by a repetition count number. you can specify the option multiple times to simulate multiple keystrokes. presses entered via --keysym-press are processed with the same priority as those entered via --chars-press, that is, as they appear. see man fimrc(5) for a list of keysyms and the use of bind. ⌨️✨
  • -K {chars}, --chars-press {chars} β€” input one or more keyboard characters at program startup (simulate keyboard presses). this option can be specified multiple times. each additional time (or if the string is empty), a press of Enter (ASCII code 0x0D) key is prepended. examples, bestie, pay attention:
    • -K '' simulates press of an Enter;
    • -K ':next;' activates the command line and enter "next;" without executing it;
    • -K ":next;" -K "next" executes "next", stays in the command line and enter keys "next";
    • -K ":next;" -K "" -K "next" executes "next", leaves the command line, and executes in sequence any command bound to keys 'n', 'e', 'x', 't'.

presses entered via --chars-press are processed with the same priority as those entered via --keysym-press, that is, as they appear. 🎹

  • -D {filename}, --load-image-descriptions-file {filename} β€” loads image descriptions from {filename}. So each line starts with the basename of an image file, then a Tab character (or a different character if you set it with --image-descriptions-file-separator), then the description text. That description text gets copied into the i:_comment variable of the image at load time, and it overrides any comment that might have come along from the file itself (think JPEG, PNG or TIFF comment). If a '@' followed by an identifier {identifier} shows up, and i:{var} is set, its value gets substituted right there. If "@#" shows up, everything after it on that description line is ignored. Special comment lines like "#!fim:{var}={val}" make i:{var} get assigned the value {val} (unquoted) at image loading time (that's a cached variable, bestie), unless {var} starts with an underscore ('_'). Special comment lines like "#!fim:@{var}={val}" create a variable {var} that's only valid for expanding @{var} in comments. Special comment lines like "#!fim:{var}@={val}" or "#!fim:@{var}@={val} (notice the @ before =) also expand whatever @{identifier} they encounter in {val}. Special comment lines like "#!fim:+={val}" add {val} to the current description. Special comment lines like "#!fim:^={val}" set {val} as the base of each description. Special comment lines like "#!fim:!=" reset all cached variables. Special comment lines like "#!fim:/={dir}" prepend {dir} to each file's basename. Special comment lines like "#!fim:\={dir}" prepend {dir} to each file's name. Special description text (the stuff that gets associated to an image) begins with markers: with "#!fim:=", the last description line is reused; with "#!fim:+", what follows gets appended to the last description line; with "#!fim:^", what follows gets prepended to the last description line; with "#!fim:s/{f}/{t}", the last description line is used and substring {t} is substituted for occurrences of substring {f} ({f} and {t} can't contain newlines or a /). If {val} is empty, that variable is unset. These variables are also stored in an internal index used by the limit command. Heads up: this option sets _caption_over_image=2, so a caption is displayed over the image. And a description file beginning with "#!fim:desc" can be loaded without specifying this switch at all. ✨
  • -S {sepchar}, --image-descriptions-file-separator {sepchar} β€” a character to be used as the separator between the filename and the description part of lines, for the lines specified just before a --load-image-descriptions-file. πŸ’«
  • -i, --image-from-stdin β€” reads one single image from standard input (the image data, not the filename, okay?). May not work with all supported file formats. In the image list, this image takes the special name "<STDIN>". 🫢
  • --mark-from-image-descriptions-file {filename} β€” sets those files specified in {filename} (peep --load-image-descriptions-file for the file format) as marked (see the list command). πŸ”₯
  • -m {vmode}, --mode {vmode} β€” name of the video mode to use (and it must be listed in /etc/fb.modes). Default is not to change the video mode. Back in the day, the XF86 config file (/etc/X11/XF86Config) used to contain Modeline information, which could be fed to the modeline2fb perl script (distributed with fbset). On many modern xorg based systems, there's no direct way to obtain a fb.modes file from the xorg.conf file. So instead, one could obtain useful fb.modes info by using the (fbmodes (no man page AFAIK)) tool, written by bisqwit. An unsupported mode should make fim exit with failure. But it is possible the kernel could trick fim and set a supported mode automatically, thus ignoring the user set mode. 😭
  • -N, --no-rc-file β€” no personal initialization file is read (default is ~/.fimrc) at startup. πŸ™ˆ
  • --no-etc-fimrc-file β€” no system-wide initialization file is read (default is /usr/local/etc/fimrc) at startup. See also --etc-fimrc. πŸ’œ
  • --no-internal-config β€” no internal default configuration at startup (uses internal variable _no_default_configuration). Will only provide a minimal working configuration. 🧚
  • --no-commandline β€” with internal command line mode disabled.
  • --no-history-save β€” do not save execution history at finalization (uses internal variable _save_fim_history).
  • --no-history-load β€” do not load execution history at startup.
  • --no-history β€” do not load or save execution history at startup. Two birds, one stone, periodt. πŸŽ€
  • -p, --script-from-stdin β€” read commands from stdin before entering in interactive mode.
  • -o [fb|sdl|gtk|ca|aa|dumb][={gfxopts}], --output-device [fb|sdl|gtk|ca|aa|dumb][={gfxopts}] β€” use the specified device (one among fb|sdl|gtk|ca|aa|dumb) as the fim video output device, overriding the automatic checks. If the device is empty and followed by {gfxopts}, it will be selected automatically. The available devices depend on the current environment and on the configuration and compilation options. You can get the list of available output devices by issuing fim --version. The possible values to {gfxopts} that we describe here can also be passed as "display 'reinit' {gfxopts}" β€” see man fimrc for this. The device name with options (perhaps with modifications due to auto-detection) is stored in variable _device_string. 🌈

The fb option selects the Linux framebuffer. Presence of {gfxopts} with value 'S' (e.g. 'fb=S') makes framebuffer initialization more picky: it does not tolerate running in a screen session. The ca option (coloured ASCII-art) can be specified as ca[={['w']['h']['H']['d:'DITHERMODE]}] ; if supplied, 'w' selects windowed mode, provided libcaca is running under X; by default (or with 'W'), windowed mode is being turned off internally during initialization by unsetting the DISPLAY environment variable. If 'd:' is present, the DITHERMODE following it will be passed as dither algorithm string (alternatively, it can be a non-negative number, too). The aa (monochrome ASCII-art) option can be specified as aa[={['w'|'W']}]; if supplied, 'w' selects windowed mode, provided aalib is running under X; by default (or with 'W'), windowed mode is being turned off internally during initialization by unsetting the DISPLAY environment variable. Please note that the readline (internal command line) functionality in ca and aa modes is limited. If the graphical windowed mode is sdl or gtk it can be followed by ={['w']['m']['r']['h']['W']['M']['R']['H'][width[:height]]['%']}, where width and height are integer numbers specifying the desired resolution (if height not specified, it takes the value of width); the 'w' character requests windowed mode (instead of 'W' for fullscreen); the 'm' character requests mouse pointer display; the 'h' character requests help grid map draw (can be repeated for variants); the 'r' character requests support for window resize; the '%' character requests to treat width and height as percentage of possible window resolution. The same letters uppercase request explicit negation of the mentioned features. Additionally, in gtk mode: 'b' hides the menu bar, 'e' starts with empty menus, 'f' rebuilds the menus, and 'D' removes the menus. Note: the gtk mode is a recent addition and may have defects. The sdl mode works best with libsdl-2; libsdl-1.2 support is being discontinued. πŸ’…

The imlib2 option requests imlib2 and is unfinished: do not use it. 🚫

The dumb test mode is there only for test purposes and is not interactive.

  • --offset {bytes-offset[{:upper-offset}|{+offset-range}]} β€” use the specified offset (in bytes) for opening the specified files. If :upper-offset is specified, further bytes until upper-offset are probed. If +offset-range is specified instead, that many additional bytes are to be probed. Use this option to search damaged file systems for image files. Appending a modifier among 'K','M','G' (case irrelevant) to an offset number changes the unit to be respectively 2^10, 2^20, or 2^30 bytes. πŸ•΅οΈ
  • --pread-cmd {cmd-filter-pipeline} β€” specify a shell command with {cmd-filter-pipeline}. If the current filename matches "^[/A-Za-z0-9_.][/A-Za-z0-9_.-]*$", it is be substituted to any occurrence of '{}'. The resulting command output is assumed to be file data, which is read, decoded, and displayed. This works by setting the internal _pread_cmd variable (empty by default).
  • -P, --text-reading β€” enable textreading mode. This has the effect that fim displays images scaled to the width of the screen, and aligned to the top. If the images you're watching are text pages, all you have to do to get the next piece of text is press space (in the default key configuration, of course). πŸ“–
  • -s {value}, --scroll {value} β€” set scroll steps for internal variable _steps (default is "20%").
  • --slideshow {number} β€” interruptible slideshow mode. Wait for {number} of seconds (can have a decimal part, and is assigned to the _slideshow_sleep_time variable) after each image. Implemented by executing
reload; i:fresh=1; while(_fileindex <= _filelistlen-_loop_only_once){sleep _slideshow_sleep_time; next;} _loop_only_once=0; sleep _slideshow_sleep_time;

as a first command. Can be interrupted by : or Esc. The other keys execute accordingly to their function but do not interrupt the slideshow. Like in fbi, this cycles forever, unless --once is specified. πŸ”

  • --sanity-check β€” perform a quick sanity check, just after the initialization, and terminate. ✨
  • -t, --no-framebuffer β€” fim use an ASCII Art driver. If present, use either of libcaca (coloured), or aalib (monochrome). For more, see (man fimrc), (info aalib) or (apropos caca). If no ASCII Art driver had been enabled at compile time, fim does not display any image at all. πŸ’€
  • -T {terminal}, --vt {terminal} β€” the {terminal} is to be used as virtual terminal device file (as in fbi). See (chvt (1)), (openvt (1)) for more info about this. Use (con2fb (1)) to map a terminal to a framebuffer device. πŸ–₯️

  • --reverse β€” flips your whole files list backwards before browsing starts πŸ’… and yes, bestie, you can combo it with the other sorting options.
  • --sort β€” sorts the files list before browsing, according to the full filename.
  • --sort-basename β€” sorts the files list before browsing according to the file's basename.
  • --sort-mtime β€” sorts the files list before browsing by file modification time.
  • --sort-fsize β€” sorts the files list before browsing by file size.
  • -u, --random β€” randomly shuffles the files list before browsing (the seed depends on the time() function, so it's giving chaos-on-a-timer ✨).
  • --random-no-seed β€” pseudo-randomly shuffles the files list before browsing, no seeding involved.
  • -v, --verbose β€” be verbose: show that status bar, queen πŸ‘‘
  • --verbose-load β€” load files verbosely. Repeat the option to crank the verbosity up even more.
  • --verbose-font-load β€” load the font verbosely (this one sets _fbfont_verbosity).
  • --verbose-interpreter β€” execute the interpreter verbosely. It sets _debug_commands="ackCm" if you specify it once, and _debug_commands="ackCmmi" if you specify it twice.
  • -V, --version β€” prints to stdout the program version, compile flags, enabled features, linked libraries information, supported filetypes/file loaders, and then dips out. Like a lil rΓ©sumΓ© moment πŸ“‹
  • -w, --autowidth β€” scales the image according to the screen width.
  • -=, --no-auto-scale β€” does NOT scale the images after loading (it sets _scale_style=" ";). Raw image, no edits, we respect it.
  • --autowindow β€” resizes the window size (if the video mode supports it) to the image size. Do not use this with other image scaling options, fr fr, pick a lane.
  • --no-stat-push β€” sets _push_checks=0 before initialization, which disables the file/dir existence checks with stat(2) at push time (and speeds up startup as a lil treat ⚑).
  • -H, --autoheight β€” scales the image according to the screen height.
  • -W {scriptfile}, --write-scriptout {scriptfile} β€” every character you type gets recorded into the file {scriptfile} until you exit fim. Super useful if you wanna make a script file to use with fim -c or :exec (it's analogous to Vim's -s and :source!). And if the {scriptfile} already exists, it is not touched (same energy as Vim's -w).
  • -L {fileslistfile}, --read-from-file {fileslistfile} β€” reads a file list from a file: each line is one file to load (similar to --read-from-stdin; use --read-from-stdin-elds to control the line breaking).
  • -, --read-from-stdin β€” reads the file list from stdin: each line is one file to load; use it with --read-from-stdin-elds to control line breaking.
Heads up bestie 🚨 these three standard input reading functionalities β€” -i, -p and - β€” conflict. If two or more of them show up in the same fim invocation, fim exits with an error and warns you about the ambiguity. No mixing, it's not that kind of party.
Also go peek at the INVOCATION EXAMPLES section below for some genuinely useful (and unique) ways of employing fim ✨
  • --read-from-stdin-elds {delimiter-char} β€” specifies an endline delimiter character for breaking lines read via -/--read-from-stdin/--read-from-file (and it has to be specified after this one). The line text before the delimiter gets treated as names of files to load; the text after it is ignored. This is also handy e.g. to load description files (see --load-image-descriptions-file) as filename list files. Default is the newline character (0x0A); to specify an ASCII NUL byte (0x00) use ''.
  • -A, --autotop β€” aligns images to the top border (by setting _autotop=1 after initialization).
  • -q, --quiet β€” quiet execution mode. Sets _display_status=0;_display_busy=0;. Shhh 🀫
  • -r {{width:height}|'fullscreen'}, --resolution {{width:height}|'fullscreen'} β€” sets the resolution specification in pixels dimensions. Supported only by GTK and SDL. It gets appended to the argument to --output-device. The shorthand value 'fullscreen' is translated as 'W'.
  • -R[{exp}], --recursive[={exp}] β€” pushes files/directories to the files list recursively. The expression in the variable _pushdir_re (default: ".(JPG|PNG|GIF|BMP|TIFF|TIF|JPEG|JFIF|PPM|PGM|PBM|PCX|QOI|AVIF|WEBP)$") lists the extensions of filenames which get loaded into the list. You can overwrite its value by optionally passing an expression {exp} right here as an argument. And if it starts with '+' or '|', the expression that follows gets appended to it.
  • -X, --no-pipe-load β€” do not load via external converter programs: built-in file decoders only, periodt.
  • -B, --background-recursive β€” pushes files/directories to the files list recursively, in the background during program execution. Any sorting options are ignored. Experimental feature, unfinished β€” so like, it's giving beta, be nice to it πŸ™ˆ
  • --load-shadow-directory {dirname} β€” adds {dirname} to the shadow directory list. After that, scale "shadow" temporarily substitutes the image being displayed with that of the first same-named file located under a shadow directory. Useful to browse low-res images while still being able to quickly view the hi-res original chilling in a shadow directory. This works as intended as long as unique filenames are involved.
  • -/ {pattern}, --/ {pattern} β€” after startup, jump to pattern; it's short for -c '/' {pattern}.
  • --// {pattern} β€” after startup, jump to pattern; same as -c '/'{pattern} but with the search running on the full path (with _re_search_opts="f").
  • -1, --once β€” if you're running --slideshow, loop only once (just like in fbi).

🎬 PROGRAM RETURN STATUS 🎬

The program return status is 0 on correct operation; 252 on unsupported device specification; 248 on bad input; 255 on a generic error; 42 on a signal-triggered program exit; or a different value in case of another error. Slay, a whole mood ring of exit codes 🌈

The return status may be controlled by the use of the quit command.


⌨️ COMMON KEYS AND COMMANDS ⌨️

The following keys and commands are default hardcoded in the minimal configuration. These are working by default before any configuration file loading, and before the hardcoded config loading (see the variable _fim_default_config_file_contents).

 n    goto '+1f'
 p    goto '-1f'
 +    scale '+'
 -    scale '-'
 h    pan 'left'
 l    pan 'right'
 k    pan 'up-'
 j    pan 'down+'
 q    quit

And here's the lil glow-up: you can type a number before a command binding to iterate the assigned command. Like so:

3k    3pan 'up-'

Now the : family β€” command line mode goes hard:

:       enter command line mode (here one can use readline bindings as C-r, C-s, M-b, M-f, ...)
:{number}       jump to {number}^th image in the list
:^           jump to first image in the list
:$           jump to last image in the list
:*{factor}      scale the image by {factor}
:{scale}%       scale the image to the desired {scale}
:+{scale}%       scale the image up to the desired percentage {scale} (relatively to the original)
:-{scale}%       scale the image down to the desired percentage {scale} (relatively to the original)

And the searching, my beloved πŸ”:

/{regexp}       entering the pattern {regexp} (with '/') makes fim jump to the next image whose filename matches {regexp}
/*.png$         entering this pattern (with '/') makes fim jump to the next image whose filename ends with 'png'
/png       a shortcut for '/.*png.*'

Couple more icons:

  • 2,4 stdout '{}' β€” print three filenames to standard output.
  • !{syscmd} β€” executes the {syscmd} quoted string as an argument to the "system" fim command.

You can visualize all of the default bindings by invoking fim --dump-default-fimrc | grep bind .

You can visualize all of the default aliases by invoking fim --dump-default-fimrc | grep alias .

The Return vs. Space key thing can be used to create a file list while you're reviewing the images, and then use that list for batch processing later on. Very main character workflow energy πŸ‘‘

All of the key bindings are reconfigurable; see the default fimrc file for examples on this, or read the complete manual: the FIM.TXT file distributed with fim.


🌱 AFFECTING ENVIRONMENT VARIABLES 🌱

  • FBFONT β€” (just like in fbi) a Linux consolefont font file. If you're using a gzipped font file, the zcat program is used to uncompress it (via execvp(3)). If FBFONT is unset, the following files are probed and the first existing one is selected:
/usr/share/kbd/consolefonts/cp866-8x16.psf.gz
/usr/share/consolefonts/Uni3-TerminusBoldVGA14.psf.gz
/usr/lib/kbd/consolefonts/lat9-16.psf.gz
/usr/share/consolefonts/lat1-16.psf
/usr/share/consolefonts/lat1-16.psf.gz
/usr/share/consolefonts/lat1-16.psfu.gz
/usr/share/kbd/consolefonts/lat1-16.psf
/usr/share/kbd/consolefonts/lat1-16.psf.gz
/usr/share/kbd/consolefonts/lat1-16.psfu.gz
/usr/lib/kbd/consolefonts/lat1-16.psf
/usr/lib/kbd/consolefonts/lat1-16.psf.gz
/usr/lib/kbd/consolefonts/lat1-16.psfu.gz
/lib/kbd/consolefonts/lat1-16.psf
/lib/kbd/consolefonts/lat1-16.psf.gz
/lib/kbd/consolefonts/lat1-16.psfu.gz
/lib/kbd/consolefonts/Lat2-VGA14.psf.gz
/lib/kbd/consolefonts/Lat2-VGA16.psf.gz
/lib/kbd/consolefonts/Lat2-VGA8.psf.gz
/lib/kbd/consolefonts/Uni2-VGA16.psf.gz
/usr/share/consolefonts/default8x16.psf.gz
/usr/share/consolefonts/default8x9.psf.gz
/usr/share/consolefonts/Lat15-Fixed16.psf.gz
/usr/share/consolefonts/default.psf.gz
fim://

If the special fim:// string is specified, a hardcoded font is used. Iconic πŸ’…

  • FBGAMMA β€” (just like in fbi) gamma correction (applies to dithered 8 bit mode only). Default is 1.0.
  • FRAMEBUFFER β€” (just like in fbi) a user set framebuffer device file (applies only to the fb mode). If unset, fim probes for /dev/fb0.
  • TERM β€” (only in fim) influences the output device selection algorithm, especially if $TERM=="screen".
  • SSH_TTY β€” if set and no output device specified, assume we're over ssh, and give precedence to ca, then aa (if present).
  • TERMUX_VERSION β€” if set and no output device specified, assume we're over termux, and give precedence to ca, then aa (if present).
  • WAYLAND_DISPLAY β€” if set and no output device specified, assume we're over Wayland, and give precedence to gtk, then sdl, then ca, then aa (if present).
  • DISPLAY β€” if this variable is set, then the gtk driver has precedence, then sdl.

🫢 COMMON PROBLEMS 🫢

okay bestie, gather round, this is the ✨ troubleshooting section ✨ and it's lowkey the most important one if fim is acting up on you. πŸ’…

fim -o fb needs read-write access to the framebuffer devices (/dev/fbN or /dev/fb/N). Translation: you (or your admin, no pressure 🫠) have to make sure fim can open those devices in rw mode. The IMHO most elegant way is to use pam_console (see /etc/security/console.perms) to chown the devices to the user logged in on the console. Another way is to create some group, chown the special files to that group, and put the users which are allowed to use the framebuffer device into the group. You can also make the special files world writable, but bestie, be aware of the security implications this has. 😭 On a private box it might be fine to handle it this way through.

If using udev, you can edit: /etc/udev/permissions.d/50-udev.permissions and set these lines like here:

 # fb devices
 fb:root:root:0600
 fb[0-9]*:root:root:0600
 fb/*:root:root:0600

fim -o fb also needs access to the linux console (i.e. /dev/ttyN) for sane console switch handling. That is obviously no problem for console logins, but any kind of pseudo tty (xterm, ssh, screen, ...) will not work. not me finding that out the hard way πŸ’€


🌈 INVOCATION EXAMPLES 🌈

these are the vibes, the receipts, the "copy-paste and go" moments. every single one, no skips. πŸŽ€

fim --help -R -B
# get help for options -R and -B
fim media/
# load files from the directory media/
fim -R media/ --sort
# open files found by recursive traversal of directory media, then
sorting the list
find /mnt/media/ -name *.jpg | fim -
# read input files list from standard input
find /mnt/media/ -name *.jpg | shuf | fim -
# read input files list from standard input, randomly shuffled
cat script.fim | fim -p images/*
# read a script file script.fim from standard input before displaying
files in the directory images
scanimage ... | tee scan.ppm | fim -i
# read the image scanned from a flatbed scanner as soon as it is read
h5topng -x 1 -y 2 dataset.hdf -o /dev/stdout | fim -i
# visualize a slice from an HDF5 dataset file
fim * > selection.txt
# output the file names marked interactively with the 'list "mark"'
command in fim to a file
fim * | fim -
# output the file names marked with 'm' in fim to a second instance of
fim, in which these could be marked again
fim -c 'pread "vgrabbj -d /dev/video0 -o png";reload'
# display an image grabbed from a webcam
fim -o aa -c 'pread "vgrabbj -d /dev/video0 -o png";reload;system
"fbgrab" "asciime.png"'
# if running in framebuffer mode, saves a png screenshot with an ASCII
rendering of an image grabbed from a webcam
fim -c 'while(1){pread "vgrabbj -d /dev/video0 -o png";reload;sleep
1;};'

# display a sequence of images grabbed from a webcam; circa 1 per second

πŸ¦‹ NOTES πŸ¦‹

keeping it a hundred with you: this manual page is neither accurate nor complete. 😭 In particular, issues related to driver selection shall be described more accurately. Also the accurate sequence of autocommands execution, variables application is critical to understanding fim, and should be documented.

The filename <STDIN> is reserved for images read from standard input (view this as a limitation), and thus handling files with such name may incur in limitations. noted. ✍️


πŸ’€ BUGS πŸ’€

fim has bugs. πŸ’… (iconic honesty honestly.) Please read the BUGS file shipped in the documentation directory to discover the known ones.

There are also inconsistencies in the way the internal command line works across the different graphical devices. yeah. it's giving "it depends". πŸ™ˆ


πŸŽ€ FILES πŸŽ€

  • /usr/local/share/doc/fim β€” The directory with fim documentation files. πŸ“š
  • /usr/local/etc/fimrc β€” The system-wide fim initialization file (executed at startup, after executing the hardcoded configuration).
  • ~/.fimrc β€” The personal fim initialization file (executed at startup, after the system-wide initialization file).
  • ~/.fim_history β€” File where to load from or save command history. See (man fimrc(5), man readline(3)).
  • ~/.inputrc β€” If fim is built with GNU readline support, it is susceptible to changes in the user set ~/.inputrc configuration file contents. For details, see (man readline(3)).

πŸ‘‘ SEE ALSO πŸ‘‘

Other fim man pages: fimgs(1), fimrc(1).

Conversion programs: convert(1), dia(1), xcftopnm(1), fig2dev(1), inkscape(1).

Related programs: fbset(1), con2fb(1), vim(1), mutt(1), exiftool(1), exiftags(1), exiftime(1), exifcom(1), fbi(1), fbida(1), feh(1), qiv(1), sxiv(1), fbgrab(1).

Related documentation: fbdev(4), vcs(4), fb.modes(8), fbset(8), setfont(8).


✨ AUTHOR ✨

Michele Martone <dezperado _CUT_ autistici _CUT_ org> is the author of fim, "Fbi IMproved". πŸ‘‘


Copyright (C) 2007-2024 Michele Martone <dezperado _CUT_ autistici _CUT_ org> (author of fim)

Copyright (C) 1999-2004 Gerd Hoffmann <kraxel _CUT_ bytesex.org> is the author of "fbi", upon which fim was originally based.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.


and that's the whole page bestie!! 🫢 you made it to the end, main character energy fr fr. this whole thing is (c) 2007-2024 Michele Martone and you just read the FIM(1) man page top to bottom. slay. now go look at some pictures. πŸŒΈπŸ¦‹βœ¨

πŸ“¦ where this page comes from