1FIM(1)                      General Commands Manual                     FIM(1)
2
3
4

NAME

6       fim  - Fbi (linux framebuffer imageviewer) IMproved, an universal image
7       viewer
8

SYNOPSIS

10       fim [{options}] [--] {imagepath} [{imagepaths}]
11       fim --output-device {fb|sdl|ca|aa|imlib2|dumb} ...
12       ... | fim [{options}] [--] [{imagepaths}] -
13       fim [{options}] [--] [{files}] - < {file_name_list_text_file}
14       fim --image-from-stdin [{options}] < {imagefile}
15       fim --script-from-stdin [{options}] < {scriptfile}
16       fim --help[=s|d|l|m] [{help-item} ...]
17
18

DESCRIPTION

20       fim is a `swiss army knife' for displaying image files.  It is  capable
21       of  displaying  image files using different graphical devices while of‐
22       fering a uniform look and feel.   Key  bindings  are  customizable  and
23       specified  in  an initialization file.  Interaction with standard input
24       and output is possible (especially  in  shell  scripts).   An  internal
25       scripting  language  specialized for image viewing allows image naviga‐
26       tion, scaling, manipulation of internal variables, command aliases, and
27       vim-like  autocommands.   The  internal language can be interacted with
28       via a command line mode capable  of  autocompletion  and  history  (the
29       readline  mode).   Further features are display of EXIF tags, JPEG com‐
30       ments, EXIF rotation/orientation, load of "description  files",  faster
31       load via image caching, command recording, and much more.
32
33       As  a default, fim displays the specified file(s) on the detected, most
34       convenient graphical device. This can be with SDL if running  under  X,
35       an  Ascii Art driver (aalib or libcaca) if running behind ssh without X
36       forwarding, or the linux framebuffer  device.  Graphical  file  formats
37       BMP,  PCX are supported natively, while JPEG, PNG, GIF, TIFF, PPM, PGM,
38       PBM are supported via third party libraries.  Further formats are  sup‐
39       ported  via  external converters.  For XCF (Gimp's) images, will try to
40       use 'xcftopnm'.  For FIG vectorial images, will try to  use  'fig2dev'.
41       For DIA vectorial images, will try to use 'dia'.  For SVG vectorial im‐
42       ages, will try to use 'inkscape'.  For other formats will  try  to  use
43       ImageMagick's  'convert' executable.  The converter is given 15 seconds
44       for the conversion before a timeout.
45
46
47       If {imagepath} is a file, its format is guessed not by its name but  by
48       its contents. See the _file_loader variable to change this default.
49
50
51       If  {imagepath}  is  a  directory, therein contained files of supported
52       formats will be loaded. If {imagepath} contains a trailing  slash  (/),
53       it  will  be treated as a directory; otherwise this will be checked via
54       stat(2). To change this default, see  description  of  the  _pushdir_re
55       variable and the --no-stat-push and --recursive options.
56
57       This  man  page  describes fim command line options and usage.  See man
58       fimrc(5) for a  full  specification  of  the  fim  language,  commands,
59       keysyms, autocommands, variables, aliases, examples for a configuration
60       file and readline usage samples.
61
62

USAGE

64       You may invoke fim from an interactive shell and control  it  with  the
65       keyboard,  as  you  would  do with any image viewer with reasonable key
66       bindings.
67
68       fim is keyboard oriented: there are no user menus or buttons available.
69       If  you  need  some feature or setting which is not accessible from the
70       default keyboard configuration, you probably need a  custom  configura‐
71       tion  or  simply  need to type a custom command. For these, you can use
72       the internal command and configuration language.
73
74       See   options   --read-from-stdin,   --script-from-stdin,   and   --im‐
75       age-from-stdin for more script-oriented usages.
76
77       The full commands specification is also accessible at runtime using the
78       internal help system (typing :help).
79
80
81

OPTIONS

83       Accepted command line {options}:
84
85       --     Treat arguments after -- as filenames.  Treat  arguments  before
86              --  as  command line options if these begin with -, and as file‐
87              names otherwise.
88
89
90       -a, --autozoom
91              Enable autozoom. fim will automagically pick a  reasonable  zoom
92              factor when displaying a new image (as in fbi).
93
94       -b[24|1], --binary[=24|1]
95              Display contents of binary files (of any filetype) as these were
96              raw 24 or 1 bits per pixel pixelmaps.  Image width will not  ex‐
97              ceed  the value of the _preferred_rendering_width variable.  Re‐
98              gard this as an easter bunny option.
99
100
101       --as-text
102              Display contents of files (of any filetype) as these were  text.
103              Image  width will not exceed the value of the _preferred_render‐
104              ing_width variable.  Non-printable characters will be  displayed
105              as " ".  Regard this as another easter bunny option.
106
107
108       --cd-and-readdir
109              Step in the directory of the first file to be loaded, push other
110              files from that directory, and jump  back  to  the  first  file.
111              Useful when invoking from a desktop environment.
112
113       -c {commands}, --execute-commands {commands}
114              Execute commands after reading the initialization file, just be‐
115              fore entering the interactive mode.  No  semicolon  (;)  is  re‐
116              quired  at  the end of commands.  Do not forget quoting commands
117              in a manner suitable to your shell.  So  -c next  is fine as  it
118              is.    A   more   complicated   example,   with   quotings:   -c
119              '*2;2pan_up;display;while(1){align "bottom";sleep  "1"  ;  align
120              "top"}'  (with  the single quotes) tells fim to: double the dis‐
121              played image size, pan twice up, display the image, and  finally
122              do an endless loop consisting of bottom and top aligning, alter‐
123              nated.
124
125
126       -C {commands}, --execute-commands-early {commands}
127              Similar to the --execute-commands option, but  execute  commands
128              earlier,  just before reading the initialization file.  The spe‐
129              cial 'early' form =var=val will assign var to  val  immediately,
130              before the interpreter is started.
131
132              For  example,  -C '_scale_style=" "' starts fim no auto-scaling;
133              the equivalent early form is: -C '=_scale_style= '.
134
135
136
137       -d {framebuffer device}, --device {framebuffer device}
138              Framebuffer device to use. Default is the one your vc is  mapped
139              to (as in fbi).
140
141       --dump-reference-help[=man]
142              Dump to stdout language reference help and quit.
143
144       --dump-default-fimrc
145              Dump  default  configuration  (the one hardcoded in the fim exe‐
146              cutable) to standard output and quit.
147
148       -E {scriptfile}, --execute-script {scriptfile}
149              Execute scriptfile after  the  default  initialization  file  is
150              read, and before executing --execute-commands commands.
151
152       -f {fimrc}, --etc-fimrc {fimrc}
153              Specify an alternative system-wide initialization file (default:
154              /usr/local/etc/fimrc), to be read prior to any other  configura‐
155              tion file. See also --no-etc-fimrc-file.
156
157
158       -F {commands}, --final-commands {commands}
159              Similar  to  the --execute-commands option, but execute commands
160              after exiting the interactive mode, just before terminating  the
161              program.
162
163       -h[s|d|l|m], --help[=s|d|l|m]
164              Print  program  invocation  help, and exit. Depending on the op‐
165              tion, output can be: short, descriptive, long from man, or  com‐
166              plete man. If further arguments follow, individual help messages
167              will be shown instead.
168
169       -k {keysym}, --keysym-press {keysym}
170              Execute any command bound (via the bind command) to a  specified
171              keysym  at  startup.  A  keysym  can be prefixed by a repetition
172              count number. You can specify the option multiple times to simu‐
173              late multiple keystrokes. Presses entered via --keysym-press are
174              processed before presses  entered  via  --chars-press.  See  man
175              fimrc(5) for a list of keysyms and the use of bind.
176
177       -K {chars}, --chars-press {chars}
178              Input  one or more keyboard characters at program startup (simu‐
179              late keyboard presses). This option can  be  specified  multiple
180              times. Each additional time (or if the string is empty), a press
181              of Enter (ASCII code 0x0D) key is  prepended.  Examples:  -K  ''
182              simulates  press of an Enter;  -K ':next;' activates the command
183              line and enter "next;" without executing  it;   -K  ":next;"  -K
184              "next" executes "next", stays in the command line and enter keys
185              "next";  -K ":next;" -K "" -K "next" executes "next", leaves the
186              command line, and executes in sequence any command bound to keys
187              'n', 'e', 'x', 't'. Presses entered via --chars-press  are  pro‐
188              cessed after presses entered via --keysym-press.
189
190       -D {filename}, --load-image-descriptions-file {filename}
191              Load  image  descriptions  from  file filename. Each line begins
192              with the basename of an image file, followed by a Tab  character
193              (or  a  different  character  if  specified via --image-descrip‐
194              tions-file-separator), then the description text.  The  descrip‐
195              tion text is copied into the i:_comment variable of the image at
196              load time, overriding the comment possibly loaded from the  file
197              (e.g. JPEG, PNG or TIFF comment). If a '@' followed by and iden‐
198              tifier {var} is encountered, and i:{var} is set,  its  value  is
199              substituted  here.  If "@#" is encountered, the remainder of the
200              description  line  is  ignored.  Special  comment   lines   like
201              "#!fim:var=val"  lead  i:var to be assigned value val (unquoted)
202              at image loading time (cached variable); i:var will not  be  as‐
203              signed  if  var starts with an underscore ('_'). Special comment
204              lines like "#!fim:+=val" add val to current description. Special
205              comment  lines like "#!fim:^=val" set val to be the base of each
206              description. Special comment lines  like  "#!fim:!="  reset  all
207              cached  variables.  Special  comment  lines  like  "#!fim:/=dir"
208              prepend dir to each file's basename. Special comment lines  like
209              "#!fim:\=dir"  prepend dir to each file's name. Special descrip‐
210              tion text (to be associated to an image)  begins  with  markers:
211              with  "#!fim:=",  the  last  description  line  is  reused; with
212              "#!fim:+", what follows is  appended  to  the  last  description
213              line;  with "#!fim:^", what follows is prepended to the last de‐
214              scription line; with "#!fim:s/f/t", the  last  description  line
215              will  be  used  after substitution of occurrences of substring f
216              with string t (f and t cannot contain newlines or a '/'). If val
217              is empty that variable is unset. These variables are stored also
218              in an internal index used by the limit command. This option sets
219              _caption_over_image=2,  so  that a caption is displayed over the
220              image. A description file beginning  with  "#!fim:desc"  can  be
221              loaded without specifying this switch.
222
223       -S {sepchar}, --image-descriptions-file-separator {sepchar}
224              A  character  to be used as a separator between the filename and
225              the description part of lines specified just before a --load-im‐
226              age-descriptions-file.
227
228       -i, --image-from-stdin
229              Read  one  single image from the standard input (the image data,
230              not the filename).  May not work with all  supported  file  for‐
231              mats.   In  the  image  list,  this image takes the special name
232              "<STDIN>".
233
234
235       --mark-from-image-descriptions-file {filename}
236              Set those files specified in filename (see --load-image-descrip‐
237              tions-file  for  the  file  format) as marked (see the list com‐
238              mand).
239
240
241       -m {vmode}, --mode {vmode}
242              Name of the video mode to use video  mode  (must  be  listed  in
243              /etc/fb.modes).   Default  is  not to change the video mode.  In
244              the past, the XF86 config  file  (/etc/X11/XF86Config)  used  to
245              contain  Modeline  information,  which could be fed to the mode‐
246              line2fb perl script (distributed with fbset).   On  many  modern
247              xorg  based systems, there is no direct way to obtain a fb.modes
248              file from the xorg.conf file.  So instead one could obtain  use‐
249              ful  fb.modes  info  by  using the (fbmodes (no man page AFAIK))
250              tool, written by bisqwit.  An unsupported mode should  make  fim
251              exit  with  failure.   But it is possible the kernel could trick
252              fim and set a supported mode automatically,  thus  ignoring  the
253              user set mode.
254
255       -N, --no-rc-file
256              No  personal  initialization  file  will  be  read  (default  is
257              ~/.fimrc) at startup.
258
259       --no-etc-fimrc-file
260              No system-wide initialization file  will  be  read  (default  is
261              /usr/local/etc/fimrc) at startup. See also --etc-fimrc.
262
263
264       --no-internal-config
265              No  internal  default  configuration  at  startup (uses internal
266              variable _no_default_configuration). Will only provide a minimal
267              working configuration.
268
269       --no-commandline
270              With internal command line mode disabled.
271
272       --no-history-save
273              Do  not  save  execution  history at finalization (uses internal
274              variable _save_fim_history).
275
276       --no-history-load
277              Do not load execution history at startup.
278
279       --no-history
280              Do not load or save execution history at startup.
281
282       -p, --script-from-stdin
283              Read commands from stdin before entering in interactive mode.
284
285       -o   [fb|sdl|ca|aa|imlib2|dumb],   --output-device    [fb|sdl|ca|aa|im‐
286       lib2|dumb]
287              Will  use the specified device as fim video output device, over‐
288              riding automatic checks.  The available devices  depend  on  the
289              original  configuration/compilation  options,  so you should get
290              the list of available output devices issuing fim --version.  The
291              fb  option  selects  the Linux framebuffer. Presence of option S
292              (e.g. fb=S) makes framebuffer initialization more picky: it will
293              not  tolerate  running  in  a  screen  session.   The  ca option
294              (coloured Ascii Art) can be specified as ca[={['w']}] ; if  sup‐
295              plied,  'w'  selects  windowed mode, provided libcaca is running
296              under X; by default (or with 'W'), windowed mode is being turned
297              off  internally  during  initialization by unsetting the DISPLAY
298              environment variable.  The aa (monochrome Ascii Art) option  can
299              be  specified as aa[={['w'|'W']}]; if supplied, 'w' selects win‐
300              dowed mode, provided aalib is running under X;  by  default  (or
301              with  'W'),  windowed mode is being turned off internally during
302              initialization by unsetting the  DISPLAY  environment  variable.
303              Please  note that the readline (internal command line) function‐
304              ality in ca and aa modes is limited.  The sdl option  (graphical
305              windowed      mode)     may     be     specified     as      sdl
306              ={['w']['m']['r']['h']['W']['M']['R']['H'][width[:height]]['%']},
307              where  width  and  height are integer numbers specifying the de‐
308              sired resolution  (if height not specified, it takes  the  value
309              of  width); the 'w' character requests windowed mode (instead of
310              'W' for fullscreen); the 'm' character  requests  mouse  pointer
311              display;  the  'h' character requests help grid map draw (can be
312              repeated for variants); the 'r' character requests  support  for
313              window  resize;  the  '%'  character requests to treat width and
314              height as percentage of possible  window  resolution.  The  same
315              letters  uppercase  request  explicit  negation of the mentioned
316              features.  The imlib2 option requests imlib2 and  is  unfinished
317              -- do not use it.  The dumb test mode is not interactive.
318
319
320       --offset {bytes-offset[{:upper-offset}|{+offset-range}]}
321              Use  the  specified  offset (in bytes) for opening the specified
322              files. If :upper-offset is specified, further  bytes  until  up‐
323              per-offset  will  be  probed.  If +offset-range is specified in‐
324              stead, that many additional bytes will be probed.  Use this  op‐
325              tion to search damaged file systems for image files. Appending a
326              modifier among K,M,G  (case  irrelevant)  to  an  offset  number
327              changes the unit to be respectively 2^10, 2^20, or 2^30 bytes.
328
329       --pread-cmd {cmd-filter-pipeline}
330              Specify  a shell command with {cmd-filter-pipeline}. If the cur‐
331              rent  filename  matches  "^[/A-Za-z0-9_.][/A-Za-z0-9_.-]*$",  it
332              will  be  substituted  to  any occurrence of '{}'. The resulting
333              command output is assumed to be file data, which  will  be  read
334              and  displayed.   This  works by setting the internal _pread_cmd
335              variable (empty by default).
336
337       -P, --text-reading
338              Enable textreading mode.  This has the effect that fim will dis‐
339              play  images  scaled  to the width of the screen, and aligned to
340              the top.  If the images you are watching are text pages, all you
341              have  to  do to get the next piece of text is to press space (in
342              the default key configuration, of course).
343
344       -s {value}, --scroll {value}
345              Set scroll steps for internal variable _steps (default is 20%).
346
347       --slideshow {number}
348              Interruptible slideshow mode. Wait for {number} of seconds  (as‐
349              signed  to  the  _want_sleep_seconds variable) after each image.
350              Implemented by executing reload; i:fresh=1; while(_fileindex  <=
351              _filelistlen-_loop_only_once){sleep  _want_sleep_seconds; next;}
352              sleep _want_sleep_seconds;  as a first command.  Can  be  inter‐
353              rupted  by  : or Esc. The other keys will execute accordingly to
354              their function but will not interrupt  the  slideshow.  Like  in
355              fbi, this will cycle forever, unless --once is specified.
356
357       --sanity-check
358              Perform a quick sanity check, just after the initialization, and
359              terminate.
360
361       -t, --no-framebuffer
362              fim Use an ASCII Art driver. If present, use either  of  libcaca
363              (coloured),  or  aalib  (monochrome). For more, see (man fimrc),
364              (info aalib) or (apropos caca)).  If no ASCII Art driver was en‐
365              abled at compile time, fim will not display any image at all.
366
367       -T {terminal}, --vt {terminal}
368              The terminal will be used as virtual terminal device file (as in
369              fbi).  See (chvt (1)), (openvt (1)) for more  info  about  this.
370              Use (con2fb (1)) to map a terminal to a framebuffer device.
371
372
373       --reverse
374              Reverse  files  list  before  browsing (can be combined with the
375              other sorting options).
376
377       --sort Sort files list before browsing according to full filename.
378
379       --sort-basename
380              Sort files list before browsing according to file basename's.
381
382       --sort-mtime
383              Sort files list before browsing according to  file  modification
384              time.
385
386       --sort-fsize
387              Sort files list before browsing according to file size.
388
389       -u, --random
390              Randomly  shuffle the files list before browsing (seed depending
391              on time() function).
392
393       --random-no-seed
394              Pseudo-random shuffle the files list before browsing  (no  seed‐
395              ing).
396
397       -v, --verbose
398              Be verbose: show status bar.
399
400       --verbose-load
401              Load files verbosely (repeat option to increase verbosity).
402
403       --verbose-font-load
404              Load font verbosely (sets _fbfont_verbosity).
405
406       --verbose-interpreter
407              Execute  interpreter  verbosely  (Sets  immediately  _debug_com‐
408              mands="ackC" if specified once, _debug_commands="ackCi" if spec‐
409              ified  twice).
410
411       -V, --version
412              Print  to  stdout  program  version, compile flags, enabled fea‐
413              tures, linked libraries  information,  supported  filetypes/file
414              loaders, and then exit.
415
416       -w, --autowidth
417              Scale the image according to the screen width.
418
419       -=, --no-auto-scale
420              Do  not scale the images after loading (will set '_scale_style="
421              "';).
422
423       --autowindow
424              Resize the window size (if supported by the video mode)  to  the
425              image size. Don't use this with other image scaling options.
426
427       --no-stat-push
428              Sets   _push_checks=0   before  initialization,  thus  disabling
429              file/dir existence checks with stat(2) at push  push  time  (and
430              speeding up startup).
431
432       -H, --autoheight
433              Scale the image according to the screen height.
434
435       -W {scriptfile}, --write-scriptout {scriptfile}
436              All  the  characters  that  you  type  are  recorded in the file
437              {scriptout}, until you exit fim.  This is useful if you want  to
438              create a script file to be used with "fim -c" or ":exec" (analo‐
439              gous to Vim's -s and ":source!").  If the {scriptout}  file  ex‐
440              ists, it will be not touched (as in Vim's -w).
441
442       -L {fileslistfile}, --read-from-file {fileslistfile}
443              Read  file list from a file: each line one file to load (similar
444              to --read-from-stdin; use --read-from-stdin-elds to control line
445              breaking).
446
447
448
449        -, --read-from-stdin
450              Read  file list from stdin: each line one file to load; use with
451              --read-from-stdin-elds to control line breaking).
452
453              Note that these the three standard input reading functionalities
454              (-i,-p and -) conflict : if two or more of them occur in fim in‐
455              vocation, fim will exit with an error and warn about the ambigu‐
456              ity.
457
458              See  the  section  INVOCATION EXAMPLES below to read some useful
459              (and unique) ways of employing fim.
460
461
462       --read-from-stdin-elds {delimiter-char}
463              Specify an endline delimiter character for breaking  lines  read
464              via  -/--read-from-stdin/--read-from-file (which shall be speci‐
465              fied after this). Line text before the delimiter will be treated
466              as  names of files to load; the text after will be ignored. This
467              is also useful e.g. to load description  files  (see  --load-im‐
468              age-descriptions-file)  as  filename  list files. Default is the
469              newline character (0x0A); to specify an ASCII  NUL  byte  (0x00)
470              use ''.
471
472
473       -A, --autotop
474              Align  images  to  the top border (by setting '_autotop=1' after
475              initialization).
476
477       -q, --quiet
478              Quiet execution mode. Sets _display_status=0;_display_busy=0;.
479
480
481       -r {width:height}, --resolution {width:height}
482              Set resolution specification in pixels. Supported by  SDL  only.
483              Will  be  appended to the argument to --output-device. Shorthand
484              value 'fullscreen' will be translated into 'W'.
485
486       -R[{exp}], --recursive[={exp}]
487              Push files/directories to the files list  recursively.  The  ex‐
488              pression       in       variable      _pushdir_re      (default:
489              ".(JPG|PNG|GIF|BMP|TIFF|TIF|JPEG|JFIF|PPM|PGM|PBM|PCX|WEBP)$")
490              lists  extensions of filenames which will be loaded in the list.
491              You can overwrite its value by optionally passing an  expression
492              {exp} here as argument. If starting with '+' or '|', the expres‐
493              sion following will be appended to it.
494
495       -X, --no-pipe-load
496              Do not load via external converter programs: only  use  built-in
497              file decoders.
498
499       -B, --background-recursive
500              Push  files/directories  to the files list recursively, in back‐
501              ground during program execution. Any sorting options will be ig‐
502              nored. Experimental feature, unfinished.
503
504       --load-shadow-directory {dir}
505              Add  {dir}  to  the shadow directory list. Then 'scale "shadow"'
506              will temporarily substitute the image being displayed with  that
507              of  the  first same-named file located under a shadow directory.
508              Useful to browse low-res images, but still being able to quickly
509              view  the  hi-res  original residing in a shadow directory. This
510              works as intended as long as unique filenames are involved.
511
512       -/ {pattern}, --/ {pattern}
513              After startup jump to pattern; short for -c '/'.
514
515       --// {pattern}
516              After startup jump to pattern; as -c '/' but with search on  the
517              full path (with _re_search_opts="f").
518
519       -1, --once
520              If running --slideshow, loop only once (as in fbi).
521
522

PROGRAM RETURN STATUS

524       The program return status is 0 on correct operation; 252 on unsupported
525       device specification; 248 on bad input; 255 on a generic error; 42 on a
526       signal-triggered  program exit;  or a different value in case of an an‐
527       other error.
528        The return status may be controlled by the use of the quit command.
529

COMMON KEYS AND COMMANDS

531       The following keys and commands are hardcoded in the minimal configuration. These are working by default before any config loading, and before the hardcoded config loading (see variable _fim_default_config_file_contents).
532
533        n    goto '+1f'
534        p    goto '-1f'
535        +    magnify
536        -    reduce
537        h    pan 'left'
538        l    pan 'right'
539        k    pan 'up-'
540        j    pan 'down+'
541        q    quit
542       You can type a number before a command binding to iterate the assigned command:
543       3k    3pan 'up-'
544
545       :       enter command line mode
546       :{number}       jump to {number}^th image in the list
547       :^           jump to first image in the list
548       :$           jump to last image in the list
549       :*{factor}      scale the image by {factor}
550       :{scale}%       scale the image to the desired {scale}
551       :+{scale}%       scale the image up to the desired percentage {scale} (relatively to the original)
552       :-{scale}%       scale the image down to the desired percentage {scale} (relatively to the original)
553
554       /{regexp}       entering the pattern {regexp} (with /) makes fim jump to the next image whose filename matches {regexp}
555       /*.png$         entering this pattern (with /) makes fim jump to the next image whose filename ends with 'png'
556       /png       a shortcut for /.*png.*
557
558       2,4 stdout '{}'     print three filenames to standard output.
559
560
561       !{syscmd}      executes the {syscmd} quoted string as an argument to the  "system" fim command.
562
563
564       You can visualize all of the default bindings invoking fim --dump-default-fimrc | grep bind .
565       You can visualize all of the default aliases invoking fim  --dump-default-fimrc | grep alias .
566
567
568       The Return vs. Space key thing can be used to create a file list  while
569       reviewing the images and use the list for batch processing later on.
570
571       All  of the key bindings are reconfigurable; see the default fimrc file
572       for examples on this, or read the complete  manual:  the  FIM.TXT  file
573       distributed with fim.
574

AFFECTING ENVIRONMENT VARIABLES

576       FBFONT         (just like in fbi) a Linux consolefont font file.
577       If using a gzipped font, the zcat program will be used to uncompress it (via execvp(3)).
578       If not specified, the following files will be probed and the first existing will be selected:
579
580       /usr/share/kbd/consolefonts/cp866-8x16.psf.gz
581       /usr/share/consolefonts/Uni3-TerminusBoldVGA14.psf.gz
582       /usr/lib/kbd/consolefonts/lat9-16.psf.gz
583       /usr/share/consolefonts/lat1-16.psf
584       /usr/share/consolefonts/lat1-16.psf.gz
585       /usr/share/consolefonts/lat1-16.psfu.gz
586       /usr/share/kbd/consolefonts/lat1-16.psf
587       /usr/share/kbd/consolefonts/lat1-16.psf.gz
588       /usr/share/kbd/consolefonts/lat1-16.psfu.gz
589       /usr/lib/kbd/consolefonts/lat1-16.psf
590       /usr/lib/kbd/consolefonts/lat1-16.psf.gz
591       /usr/lib/kbd/consolefonts/lat1-16.psfu.gz
592       /lib/kbd/consolefonts/lat1-16.psf
593       /lib/kbd/consolefonts/lat1-16.psf.gz
594       /lib/kbd/consolefonts/lat1-16.psfu.gz
595       /lib/kbd/consolefonts/Lat2-VGA14.psf.gz
596       /lib/kbd/consolefonts/Lat2-VGA16.psf.gz
597       /lib/kbd/consolefonts/Lat2-VGA8.psf.gz
598       /lib/kbd/consolefonts/Uni2-VGA16.psf.gz
599       /usr/share/consolefonts/default8x16.psf.gz
600       /usr/share/consolefonts/default8x9.psf.gz
601       /usr/share/consolefonts/Lat15-Fixed16.psf.gz
602       /usr/share/consolefonts/default.psf.gz
603       fim://
604
605       If the special fim:// string is specified, a hardcoded font will be used.
606       FBGAMMA        (just like in fbi) gamma correction (applies to dithered 8 bit mode only). Default is 1.0.
607       FRAMEBUFFER    (just like in fbi) user set framebuffer device file (applies only to the fb mode).
608       If unset, fim will probe for /dev/fb0.
609       TERM      (only in fim) will influence the output device selection algorithm, especially if $TERM=="screen".
610       SSH_TTY   if set and no output device specified, give precedence to ca, then aa (if present).
611       DISPLAY   If this variable is set, then the sdl driver will be probed by default.
612

COMMON PROBLEMS

614       fim  needs  read-write  access  to the framebuffer devices (/dev/fbN or
615       /dev/fb/N), i.e you (our your admin) have to make sure fim can open the
616       devices  in  rw  mode.  The IMHO most elegant way is to use pam_console
617       (see /etc/security/console.perms) to chown  the  devices  to  the  user
618       logged  in  on the console.  Another way is to create some group, chown
619       the special files to that group and put the users which are allowed  to
620       use  the framebuffer device into the group.  You can also make the spe‐
621       cial files world writable, but be aware of  the  security  implications
622       this  has.   On  a  private  box it might be fine to handle it this way
623       through.
624
625       If using udev, you  can  edit:  /etc/udev/permissions.d/50-udev.permis‐
626       sions and set these lines like here:
627        # fb devices
628        fb:root:root:0600
629        fb[0-9]*:root:root:0600
630        fb/*:root:root:0600
631
632       fim  also  needs  access to the linux console (i.e. /dev/ttyN) for sane
633       console switch handling.  That is obviously no problem for console  lo‐
634       gins,  but  any kind of a pseudo tty (xterm, ssh, screen, ...) will not
635       work.
636

INVOCATION EXAMPLES

638       fim --help -R -B
639       # get help for options -R and -B
640
641       fim media/
642       # load files from the directory media/
643
644       fim -R media/ --sort
645       # open files found by recursive  traversal  of  directory  media,  then
646       sorting the list
647
648       find /mnt/media/ -name *.jpg | fim -
649       # read input files list from standard input
650
651       find /mnt/media/ -name *.jpg | shuf | fim -
652       # read input files list from standard input, randomly shuffled
653
654       cat script.fim | fim -p images/*
655       #  read  a script file script.fim from standard input before displaying
656       files in the directory images
657
658       scanimage ... | tee scan.ppm | fim -i
659       # read the image scanned from a flatbed scanner as soon as it is read
660
661       h5topng -x 1 -y 2 dataset.hdf -o /dev/stdout | fim -i
662       # visualize a slice from an HDF5 dataset file
663
664       fim * > selection.txt
665       # output the file names marked interactively  with  the  'list  "mark"'
666       command in fim to a file
667
668       fim * | fim -
669       #  output the file names marked with 'm' in fim to a second instance of
670       fim, in which these could be marked again
671
672       fim -c 'pread "vgrabbj -d /dev/video0 -o png";reload'
673       # display an image grabbed from a webcam
674
675       fim -o aa -c 'pread "vgrabbj -d /dev/video0 -o png";reload;system  "fb‐
676       grab" "asciime.png"'
677       #  if  running  in framebuffer mode, will save a png screenshot with an
678       ASCII rendering of an image grabbed from a webcam
679
680       fim -c 'while(1){pread "vgrabbj  -d  /dev/video0  -o  png";reload;sleep
681       1;};'
682
683       #  will display a sequence of images grabbed from a webcam; circa 1 per
684       second
685

NOTES

687       This manual page is neither accurate nor complete. In  particular,  is‐
688       sues  related  to  driver selection shall be described more accurately.
689       Also the accurate sequence of autocommands execution, variables  appli‐
690       cation is critical to understanding fim, and should be documented.  The
691       filename "<STDIN>" is reserved for  images  read  from  standard  input
692       (view this as a limitation), and thus handling files with such name may
693       incur in limitations.  The SDL driver is quite inefficient, for a vari‐
694       ety  of  reasons.  In particular, its interaction with the readline li‐
695       brary can be problematic (e.g.: when running in sdl mode without a ter‐
696       minal). This shall be fixed.
697

BUGS

699       fim  has  bugs.  Please read the BUGS file shipped in the documentation
700       directory to discover the known ones.  There are  also  inconsistencies
701       in the way the internal command line works across the different graphi‐
702       cal devices.
703

FILES

705       /usr/local/share/doc/fim
706                      The directory with fim documentation files.
707
708       /usr/local/etc/fimrc
709                      The system-wide fim  initialization  file  (executed  at
710                      startup, after executing the hardcoded configuration).
711
712       ~/.fimrc       The   personal  fim  initialization  file  (executed  at
713                      startup, after the system-wide initialization file).
714
715       ~/.fim_history File where to load from or save. See (man fimrc(5),  man
716                      readline(3)).
717
718       ~/.inputrc     If  fim  is  built with GNU readline support, it will be
719                      susceptible to chages in the user set ~/.inputrc config‐
720                      uration  file  contents.   For  details,  see (man read‐
721                      line(3)).
722

SEE ALSO

724       Other fim man pages: fimgs(1), fimrc(1).
725       Conversion  programs:  convert(1),  dia(1),  xcftopnm(1),   fig2dev(1),
726       inkscape(1).
727       Related  programs:  fbset(1),  con2fb(1), vim(1), mutt(1), exiftool(1),
728       exiftags(1), exiftime(1), exifcom(1),  fbi(1),  fbida(1),  feh(1),  fb‐
729       grab(1).
730       Related  documentation:  fbdev(4),  vcs(4), fb.modes(8), fbset(8), set‐
731       font(8).
732

AUTHOR

734       Michele Martone <dezperado _CUT_ autistici _CUT_ org> is the author of fim, "fbi improved".
735
737       Copyright (C) 2007-2023 Michele Martone <dezperado _CUT_ autistici _CUT_ org> (author of fim)
738       Copyright (C) 1999-2004 Gerd Hoffmann <kraxel _CUT_ bytesex.org> is the
739       author of "fbi", upon which fim was originally based.
740
741       This program is free software; you can redistribute it and/or modify it
742       under the terms of the GNU General Public License as published  by  the
743       Free  Software Foundation; either version 2 of the License, or (at your
744       option) any later version.
745
746       This program is distributed in the hope that it  will  be  useful,  but
747       WITHOUT  ANY  WARRANTY;  without  even  the  implied  warranty  of MER‐
748       CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  General
749       Public License for more details.
750
751       You should have received a copy of the GNU General Public License along
752       with this program; if not, write to the Free Software Foundation, Inc.,
753       51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
754
755
756
757
758                         (c) 2007-2023 Michele Martone                  FIM(1)
Impressum