LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Viewing images outside of X (https://www.linuxquestions.org/questions/linux-software-2/viewing-images-outside-of-x-4175716830/)

RandomTroll 09-16-2022 11:37 AM

Viewing images outside of X
 
I want to view images outside of X. I used to use seejpeg, but it stopped working. I had been using fbi for the last 12 years, but its 'latest' (5 years old) won't build. I looked at all the package descriptions in Slackware, find nothing.

I asked this question in 2010 - am back for more.

fatmac 09-16-2022 11:42 AM

I've used fbi & feh in the past, but I just found this online - https://www.baeldung.com/linux/view-...-from-terminal

teckk 09-16-2022 01:43 PM

Quote:

I had been using fbi for the last 12 years, but its 'latest' (5 years old) won't build.
https://www.kraxel.org/blog/linux/fbida/

Here is the source
https://git.kraxel.org/cgit/fbida/plain/fbi.c

The tree
https://git.kraxel.org/cgit/fbida/tree/

Depends seem to be, for all of it:
libexif libepoxy poppler-glib libwebp mesa

Here is a tarball
Code:

curl https://www.kraxel.org/releases/fbida/fbida-2.14.tar.gz -o fbida-2.14.tar.gz

mkdir ~/fbida
tar -xf  fbida-2.14.tar.gz -C ~/fbida/

cd ~/fbida/fbida-2.14

There is the source tree. Install all of the depends if you don't already have them installed, and then build it. Got the man page, images, headers and c files.

Good opportunity to learn. On something that you know works.

Code:

gcc fbi.c -o fbi
In file included from fbi.c:39:
readers.h:1:10: fatal error: pixman.h: No such file or directory
    1 | #include <pixman.h>
      |          ^~~~~~~~~~
compilation terminated.

Ok, I've got pixman installed.
Code:

locate pixman.h
/usr/include/pixman-1/pixman.h

So that's not being included correctly for my box. Wrong path.

I'm stopping there. Try to build it for yourself, fix the errors, install all of the depends. Happy coding.

teckk 09-16-2022 02:15 PM

Oh I looked again. There is a GNUmakefile.

I got errors trying to make it.

I looked at the erros, I remarked out in fbi.c
Line 103
Code:

//int                        debug;
And it built without errors
https://0x0.st/oO6i.png

teckk 09-16-2022 02:24 PM

I was looking at that a little more.

Code:

cd ~/fbida/fbida-2.14/

./fbi                                                                                                                           
This program displays images using the Linux framebuffer device.                                                                                           
Supported formats: PhotoCD, jpeg, ppm, gif, tiff, xwd, bmp, png,
webp. It tries to use ImageMagick's convert for unknown file formats.

usage: fbi [ options ] file1 file2 ... fileN

    -h  -help              print this help text
    -V  -version            print fbi version number
    -i  -info              print device info
        -store              write cmd line args to config file
    -l  -list <arg>        read image filelist from file <arg>
    -P  -text              switch into text reading mode
    -a  -autozoom          automagically pick useful zoom factor
        -(no)autoup          like the above, but upscale only     
        -(no)autodown        like the above, but downscale only   
    -w  -(no)fitwidth        use width only for autoscaling       
    -v  -(no)verbose        show filenames all the time           
    -u  -(no)random        show files in a random order           
    -1  -(no)once          don't loop (for use with -t)           
        -(no)comments      display image comments                 
    -e  -(no)edit          enable editing commands (see man page) 
        -(no)backup          create backup files when editing     
        -(no)preserve        preserve timestamps when editing     
        -(no)readahead      read ahead images into cache           
        -cachemem <arg>    image cache size in megabytes         
        -blend <arg>        image blend time in miliseconds       
    -T  -vt <arg>          start on virtual console <arg>         
    -s  -scroll <arg>      scroll image by <arg> pixels           
    -t  -timeout <arg>      load next image after <arg> sec without user input
    -r  -resolution <arg>  pick PhotoCD resolution (1..5)         
    -f  -font <arg>        use font <arg> (anything fontconfig accepts)
    -d  -device <arg>      use framebuffer/drm device <arg>       
    -o  -output <arg>      use drm output <arg> (try -info for a list)
        -(no)interactive    allow keyboard interaction             
    -m  -mode <arg>        use video mode <arg> (from /etc/fb.modes)

Large images can be scrolled using the cursor keys.  Zoom in/out
works with '+' and '-'.  Use ESC or 'q' to quit.  Space and PgDn
show the next, PgUp shows the previous image. Jumping to a image..

That works. You should be able to build that yourself.

RandomTroll 09-17-2022 03:38 AM

I've been building it myself for 12 years. As I wrote in my original message I already had the current source. I get a slew of different errors than you do. I had hoped that viewing images outside of X was a common-enough act that there would be something better.

Michael Uplawski 09-17-2022 05:06 AM

On Debian, I have FIM installed from package resources and it apparently works flawlessly. webp is not displayed, but my other graphics formats are.

Thanks for reminding me. I had forgotten that I have that.

teckk 09-17-2022 06:30 AM

Quote:

I get a slew of different errors than you do.
Show your source. Where you got it from.
How are you trying to compile it?
Show what compiler errors that you are getting.

Can't tell you anything from, "I get errors".

Someone may be able to direct you from the compiler errors. There may be a change in dependencies, or maybe slack does not have that depend anymore.

Quote:

I had hoped that viewing images outside of X was a common-enough act that there would be something better.
I'll bet that there isn't that much interest in it anymore.

RandomTroll 09-18-2022 09:23 AM

Quote:

Originally Posted by teckk (Post 6380756)
Show your source. Where you got it from.
How are you trying to compile it?

If you had read my previous posts you would know.


Quote:

Originally Posted by teckk (Post 6380756)
Show what compiler errors that you are getting.

Quote:

/usr/bin/ld: viewer.o:/usr/src/fbida-2.14/idaconfig.h:20: multiple definition of `ida_lists'; ida.o:/usr/src/fbida-2.14/idaconfig.h:20: first defined here
/usr/bin/ld: idaconfig.o:/usr/src/fbida-2.14/idaconfig.h:20: multiple definition of `ida_lists'; ida.o:/usr/src/fbida-2.14/idaconfig.h:20: first defined here
/usr/bin/ld: filebutton.o:/usr/src/fbida-2.14/idaconfig.h:20: multiple definition of `ida_lists'; ida.o:/usr/src/fbida-2.14/idaconfig.h:20: first defined here
/usr/bin/ld: filelist.o:/usr/src/fbida-2.14/idaconfig.h:20: multiple definition of `ida_lists'; ida.o:/usr/src/fbida-2.14/idaconfig.h:20: first defined here
/usr/bin/ld: browser.o:/usr/src/fbida-2.14/idaconfig.h:20: multiple definition of `ida_lists'; ida.o:/usr/src/fbida-2.14/idaconfig.h:20: first defined here
Eliminating the second definition of ida_lists in idaconfig.c (or, alternatively, eliminating it in idaconfig.h) didn't work. I found no other definitions of ida_lists in the source or linux include files. I've tried to chase down errors such as these in the past and found continuing errors, unsurprising in old code, and better choices with newer programs.


Quote:

Originally Posted by teckk (Post 6380756)
I'll bet that there isn't that much interest in it anymore.

That would be my most fundamental misunderstanding. Linux supports lots of old stuff and lots of CLI stuff. I use X only for Javascript support. I use lots of old software: mail, lynx, emacs, that people continue to support. I rely on a non-X program to view images in mail and lynx.


All times are GMT -5. The time now is 06:58 AM.