FIM – Linux framebuffer image viewer (nongnu.org)

by Mr_Minderbinder 82 comments 146 points
Read article View on HN

82 comments

[−] haunter 28d ago
It can actually be also used for file recovery/discovery, see the last slide

https://archive.fosdem.org/2023/schedule/event/om_fim/attach...

>seek a ’magic’ signature in the file after opening it, and try decoding it starting within the range of that signature

[−] kristopolous 28d ago
there's a really interesting terminal image viewer based on cellular automata I made almost 20 years ago ... makes every image a bit animated in weird ways: https://github.com/kristopolous/ascsee
[−] anthk 28d ago
I think this came with fbgs too; and fbpdf2 it's a better fbpdf (no more slow GhostScript convertings), it just calls poppler/MuPDF libraries.
[−] lrvick 28d ago
You can also use mplayer with "-fp" to play video on the frambuffer as well.

I have gone weeks at a time without using a graphical desktop at all thanks to these tools.

[−] antisol 28d ago
yep! and ffplay will detect your situation and run on the framebuffer if that seems appropriate. I'm sure there's arguments to explicitly tell it to do that, but I've never used them :)
[−] hkt 28d ago
This is a great tip, do you have others? I've tried to ditch graphical desktop envs and failed pretty miserably on media consumption and browsing before.
[−] zamadatix 28d ago
I messed with this a bit and found fbdev forces even gpu accelerated video decode or rendered apps (e.g. even terminal text these days) to go through the CPU/RAM copy path whereas a lightweight graphical setup (like a minimal sway with a full screen terminal window open) is zero copy. Minor thing, but I'll gladly trade a little RAM for some battery life + simplicity if I ever do need to open something actually graphical on the machine.
[−] akdev1l 27d ago
If you wanted a minimal terminal with graphical support then you should probably just run a minimal Wayland session with cage + terminal emulator

fbdev is not it, going through the DRM subsystem is much better

[−] yonatan8070 28d ago
I'm curious, what's the motivation for not having a graphical environment at all?
[−] hkt 21d ago
What I wanted (and to an extent still do) is extreme simplicity and OS level minimalism. I was hoping to understand everything up to the browser, really. My interest in this has been renewed since AI: I have a sense that extreme simplicity may be the only viable approach for security in FLOSS if AI tilts the scales in favour of throwing cash (and therefore tokens) at problems.
[−] lrvick 27d ago
Initially about 15 years ago because the laptop I bought did not have kernel support for the mobile gpu so I could not run a graphical desktop for a while, so I added kernel support for framebuffer on my GPU myself which was only a 7 line change (upstreamed to kernel) and then realized the framebuffer plus tmux and I was kind of set apart from youtube, so I wrote a one liner to pull raw video content from youtube and stream to the framebuffer with mplayer.

Overall I found there was almost nothing to do my job that actually required a GUI so did not bother fixing it.

The only software I tend to use today is a terminal and a browser, and graphical browsers are a hellscape of cookie approval prompts and ads and tracking. Thankfully today a local LLM can go to the web and fetch whatever content for me, so I am once again phasing out my use of web browsers.

[−] argomo 27d ago
It's not for me, but I can see the appeal - minimalism, distraction elimination, geek cred, and the sort of flow state one gets from working in a low latency, high muscle memory environment.
[−] aaplok 27d ago
For me it's about having a distraction-free environment. I dislike having useless information cluttering my screen real-estate.

Even now that I moved away from text-only, I typically work only with fullscreen windows. All I want to see is what I am focusing on at the moment.

[−] fc417fc802 27d ago
It's not an answer to your question per se but I find various keyboard driven tiling WMs to be sufficiently minimal while still allowing GPU accelerated stuff to "just work".
[−] redsocksfan45 28d ago
Don't use mplayer for this. Use mpv --vo=gpu --gpu-context=drm

This gives you hardware acceleration without a desktop environment.

[−] xattt 28d ago
Do you browse with framebuffer links too? :)
[−] lrvick 28d ago
These days I prefer to ask an LLM to just go fetch content for me as much as possible.
[−] aussieguy1234 27d ago
How often do they run into anti bot protections?
[−] 1vuio0pswjnm7 27d ago
I have gone 18 years for me without using a graphical desktop
[−] wazoox 28d ago
Ah yes, back in 2004/2005 I got an old laptop (Pentium 200 or something like that) for free that wasn't fast enough to reliably read videos with X11, but it worked fine as a movie watching device for my children using mplayer in FB mode :)
[−] sylware 28d ago
Should it be DRM nowdays?
[−] globalnode 28d ago
this wont work with wayland will it? has to be a raw tty?
[−] pjmlp 28d ago
More like UNIX and MS-DOS concepts.
[−] aiiotnoodle 28d ago
A little while ago when I had a free weekend. I decided I would pre-compute some musings of an LLM trapped in a computer, I had a raspberry pi 1 (or maybe b) lieing around that I had a framebuffer screen for. I think it was a non-standard TFT_ILI9325 from Aliexpress.

The idea is it would display some helplessness comment on the screen like "Help I'm trapped in a computer" etc etc.

Eventually I got the thing booted with it's original OS image and it was running a custom kernel and had the hardware still attached and worked, but it was very outdated so I decided backup and update it, more of a technical challenge than something practical.

I gave it a few tries but eventually the screen would stop working, not helped by the thing being quite slow. Updating in place was probably harder than a brand new OS. Eventually I determined that I'd need to build a custom kernel image using a newer version, something I've never done before and for me it was quite difficult and a little before AI had agents and such to help you along.

I managed to build a custom kernel but the driver for it had been patched out and moved to an optional thing that I had to enable, I was able to build the custom kernel but for some reason the screen wouldn't display anything like it did on the original OS.

I spent a further few weekends on it working really hard to get this thing to work. Eventually I calmly picked up the screen and intentionally pushed down hard with my thumb breaking the screen irreparably.

It was destructive yes but the joy I feel even now being free of this frustration is immense.

I said I would order a newer screen but have yet to do so.

[−] kevinten10 28d ago
[dead]
[−] mnkylikeskbd 28d ago
Related to this are the (rather poorly named) kitty terminals graphics protocol: https://sw.kovidgoyal.net/kitty/graphics-protocol/

Yeah it is playful and all, but telling your colleagues to use "kitty" doesn't sound very professional. You might disagree with this, but that doesn't change the overall perception and general take in corporate world.