Can anyone get seejpeg & svgalib to work? An alternative non-X image viewer?
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I raised the issue in the Slackware forum because I hoped that Slackers would want a non-X image viewer as part of Slackware. If I'm the only one - hard cheese for me.
My suggestion is a non-X image viewer, it just needs tweaking to get it to build with imlib2 support on 14.2 (otherwise, it will only display bitmap images). I provided that option if you want to try and play with it and see if you can get it to compile. It worked fine on 14.1 using ssh, so it's just a matter of finding what needs to be done to fix it on 14.2.
If you don't want to take the time, I totally understand, but it is a non-X image viewer that's included in Slackware, it's just currently built without imlib2 support (which is required to view jpeg and png images).
that is what made me wonder why you looking to raise the dead. then I read about it in the paper, (LQ post) So I just stayed out of it.
seejpeg and svgalib are still Slackware packages: they may be effectively dead but they live in Slackware's distribution. If no one can make them work perhaps they should be removed.
I was happy with seejpeg & svgalib, but they stopped working sometime ago and nothing I have tried has gotten them to work.
Hey Mr. RandomTroll, did you ever get this working? A post on another thread made me try it, but I seem to be butting my head... A quick Google search lead me to your post. Just wondering if you've had any joy?
Using links with the fb driver works quite well... but I'm keener to get seejpeg/svgalib working if possible.
Hey Mr. RandomTroll, did you ever get this working? A post on another thread made me try it, but I seem to be butting my head... A quick Google search lead me to your post. Just wondering if you've had any joy?
Using links with the fb driver works quite well... but I'm keener to get seejpeg/svgalib working if possible.
I think the day has passed that anyone using up-to-date video software can use svgalib. I use fbida, which I have to build myself as Slackware has no package for it.
There's a w3m web browser which can draw images in both tty and terminal window. Many people install it in order to preview graphical files in terminal file managers like ranger and vifm. There is also Überzug, a Python package which allows preview in terminal windows, but my guess is that it won't work in teletype, as it requires X. W3mimgdisplay is a small program that ships with w3m and its purpose is to draw images for w3m. You could install w3m and wrap w3mimgdisplay in a script. I have started learning bash last week, so I wrote this as an exercise, so that you (or anyone else) can try it as quickly as possible, but keep in mind that I am a supernewbie, so please proofread it, adjust it to fit your need and so on, before you run it.
Code:
#!/bin/env bash
W3MIMGDISPLAY_PATH="${W3MIMGDISPLAY_PATH:-/usr/libexec/w3m/w3mimgdisplay}"
# size of font in pixels in
# terminal emulator
fontWidth=8
fontHeight=14
# and tty
linuxWidth=9
linuxHeight=16
[[ $1 == '' ]] && { printf '%s\n' 'usage: img2xterm [ARG]'; exit 1; }
[[ -x $W3MIMGDISPLAY_PATH ]] || { printf '%s\n%s\n' "w3mimgdisplay not found here:" "$W3MIMGDISPLAY_PATH"; exit 1; }
prepare() {
case $TERM in
xterm)
theFontWidth="$fontWidth"
theFontHeight="$fontHeight"
;;
linux)
theFontWidth="$linuxWidth"
theFontHeight="$linuxHeight"
;;
# Your terminal goes here.
*)
theFontWidth="$fontWidth"
theFontHeight="$fontHeight"
;;
esac
}
draw() {
local width height lines columns
read -r width height <<< "$("$W3MIMGDISPLAY_PATH" <<< "$(printf '5;%s' "$1")")"
read -r lines columns <<< "$(stty size)"
local maxWidth=$((theFontWidth * columns))
local maxHeight=$((theFontHeight * $((lines - 1))))
if [[ $width -gt $maxWidth ]]; then
height=$((height * maxWidth / width))
width="$maxWidth"
fi
if [[ $height -gt $maxHeight ]]; then
width=$((width * maxHeight / height))
height="$maxHeight"
fi
clear
tput cup $((height / fontHeight + 1)) 0
"$W3MIMGDISPLAY_PATH" <<< "$(printf '0;1;0;0;%s;%s;;;;;%s\n4;\n3;' "$width" "$height" "$1")"
}
prepare
draw "$1"
Here you can find viewer written for vifm that uses Überzug as previewer, but it could probably be rewritten to use w3m. You could read pdf files from tty. Convert from ImageMagick works faster for pdf, but at cost of quality loss. Macros that vifm sends to Überzug (%px, %py, %pw, %ph and %c) go here:
Code:
# px, py - coordinates of top left corner of image
# pw, ph - width and height of image
# c - file to draw
w3mString="0;1;$px;$py;$pw;$ph;;;;;$c\n4;\n3;"
echo -e "$w3mString" | /path/to/w3mimgdisplay
I have been using w3mimgdisplay in ranger and vifm for ages. It works fine in xterm, but ranger has some issues after v. 1.8.1, at least for me, so I moved to vifm and was forced to learn bash
then it kicked me out of WMaker, and left me a message.
Code:
svgalib : rage driver must be used but not found.
then I ended up having to shut down with the power button.
Booting without any framebuffer drivers loaded (including nvidia blob) and forcing chipset VGA in /etc/vga/libvga.config should be enough to get it working :-)
I was happy with seejpeg & svgalib, but they stopped working sometime ago and nothing I have tried has gotten them to work. I've been building fbida to view images non-X-ly. I see no alternative package in Slackware: have I missed it?
Is Gthumb in Slackware? That's a very good image viewer!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.