Follow

Did you know that you don't need X-Windows for graphics on Linux? Here's a few console programs that can display graphics using the framebuffer:

- fbi
Display and manage images directly from the command line.

- links2
A simple web browser without CSS and JS, can display inline images when switched to graphics mode with the -g param: 'links2 -g'

- mplayer
Play videos straight from the console! Can be a little tricky.

(And yes, I used a 5:4 monitor the screenshots.)

:crt_w_prompt: :blobowo:

· SubwayTooter · 11 · 31 · 52

@polychrome mpv has a DRM/KMS backend so you even get OpenGL-accellerated display on modern Linux.

@pcy @polychrome It also has sdl2 as output device, which does support that.

@polychrome SDL has a DirectFB backend, so you might also be able to get some games to work

@impiaaa @polychrome SDL also has a DRM/KMS thing, which should be much faster and support vsync properly.

The fbdev stuff isn’t even used with most graphics drivers anymore.

@impiaaa @polychrome Also, w3m supports displaying images in terminals without relying on DirectFB graphics modes. Even works with some X11 terminals, though the implementation of that is extremely cursed.

@lachs0r and "ranger" file manager can use w3mimgdisplay for image previews! but yeah, it's pretty much cursed so i gave up on it.

also it isn't documented well, but there's a good article about it, so anyone can use it in their shell scripts: blog.z3bra.org/2014/01/images- .

(although sixel is better, afair fbi supported it)

@impiaaa @polychrome

@polychrome There's also a quite impressive python script I found for converting images to unicode text. Can't find it again now though - will have to have a look on my computer.

It's quite interesting to display images on a purely text-mode console though :-)

@polychrome
I've written a program that renders directly to the (cpu managed) framebuffer for this chinese raspberry pi touchscreen

raw fbdev (and evdev) without X are fun to play with :blobcat:

@polychrome I was going to copy a long URL from a computer to my phone, so I installed the Python package qrcode. I assumed I would create a .png and view it, but it just dumped a QR code on the console. In Windows. I was stunned for a moment before I realized that hey, you can probably make QR codes with the C64 charset even, and this thing has large parts of Unicode to okay with!
@polychrome holy shit
i always wanted to write my own crappy 'X'. this might be the way

@polychrome also, sdl-based ganes, including all games written using pygame, will work

@polychrome I'm semi-New Here so idk if this qualifies as what you're talking about, but kitty has a built-in tool to display images in the terminal which I think is pretty neat

sw.kovidgoyal.net/kitty/kitten

@cosmochemistry can Kitty run without X? If you can launch it straight from the TTY without X then it's close to what I am talking about.

Short answer: no, it only works within an X session, thanks for the explanation! (no obligation to read on) Show more

@polychrome I think I needed to use w3m for this many years ago.

Sign in to participate in the conversation
Cybrespace

cybrespace: the social hub of the information superhighway

jack in to the mastodon fediverse today and surf the dataflow through our cybrepunk, slightly glitchy web portal