1

This is on a Raspberry Pi, Linux 3.13, bash 4.2

Connected is a SPI 320x240 Display which is displaying a background image (I used fbi to display the image, the cat /dev/fb1 > framebuffer.contents, then whenever I need the image I do cat framebuffer.contents > /dev/fb1 to save the looong startup time of fbi).

Now I'd like to "amend" my image by a (changing) one-line text (a few word, the time, ...). Therefore I am looking for a way to write a string, from bash, to a specific location within the framebuffer. Eg. a tool is needed that a) converts a string given to some sort of framebuffer-redabe graphic (ppm?), then b) inserts that resulting image into a given part of the framebuffer.

Any ideas? Or is my good old bash-and-unix-tools approach over it's head here and I need to look into .... ?

1 Answer 1

2

I'm not quite sure in which situations you need to do what you do. But maybe you could "misuse" splashutils/fbsplash for your needs? It's rather meant to display a framebuffer bootsplash but has some tools to tinker with a fb (testing tools for splashscreen development as an example). You can read about how to use it on the Gentoo wiki.

Aside from that maybe you can find some inspiration on a thread at Unix & Linux - How to use /dev/fb0 as a console from userspace, or output text to it.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for the latter link, I had already read that. It deals with text-only, ie. having (another) console on the framebuffer device.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.