K.Mandla's blog of Linux experiences

fbterm: Birth of the cool for the console

It’s time to put another console myth to rest — that consoles are boring to look at. Just to emphasize, this is not Xorg:

That is screen with the vertical split patch running in fbterm, which can display wallpaper borrowed from a framebuffer image viewer. No X, no tiling window managers, no fancy kernel recompilation. All that in a measly 27Mb or less, puttering along at 300Mhz and 1024×768.

I’ve mentioned fbterm in the past, as a way to add a few other oddball features to your text-only experience — like turning the entire display on its side. As I understand it, it’s really just a terminal emulator that pushes itself up against the framebuffer, in the same way xterm or urxvt or any of emulator of your choice pushes itself up against the X server display. It just doesn’t have any window borders.

But that does mean you’ll want to get the best possible screen dimensions you can, and that could require you to make sure the proper dimensions are set when you boot the machine. For a refresher on that, take a look at this chart, or better yet, look over Ali Gunduz’s short tutorial on finding unusual framebuffer codes. And remember to pick the highest color depth your system can do, or your wallpaper will appear psychedelic. If it isn’t already.

After that, the fbterm man pages show a simple script that pipes a image through fbv, which fbterm snaps and then uses as an underlay (is that a word?) for its terminal session. Sort of the same way aterm or other terminal emulators allow you to apply a particular backdrop to their work areas. I suppose if you wanted you could use fim or fbi or any other framebuffer viewer, but I haven’t tried it.

(Double-check that against man fbterm, because WordPress.com enjoys eating code, even if it’s nested in sourcecode tags. 🙄 )

fbterm will need fontconfig, libjpeg, libungif, libtiff and a few other packages that you probably don’t usually have installed on a console-only system, but the results are worth it. You can feed it almost any font you like in any size you like, which means you now have the luxury of moving away from the traditional console fonts and picking up more exotic ones.

You can set the foreground and background colors either in the script or as fbterm is running, to make text easier to read against your image. What you see in the screenshot above was actually converted to grayscale in Gimp then shaded considerably, so the text colors would be more visible. What you do with your wallpaper is your business though.

A couple of downsides — I’ve noticed that font displays between standard framebuffer-based consoles and fbterm’s emulation seem a little skewed; for an example, there ought to be grids and borders drawn in a lot of the applications you see above. Not that it’s a huge deal, and I probably can fix that with a little tinkering, but I should mention it.

I should also mention that in Arch, fbterm commandeers the entire framebuffer and holds it hostage until the session is complete. Pressing CTRL+ALT+F2 and so forth don’t have much effect so long as fbterm has your attention. The upside of that is fbterm’s ability to run multiple window instances, so what you lose in a couple of extra tty’s you gain back in an equal (if not greater) number of simultaneous emulator sessions. Edit: This is not true; actually, it seems I have four or five busted F-keys. 😦

Additionally, you might get weird behavior from things like mplayer, which are used to painting over the framebuffer too, and the two things might have a little argument if you run them at the same time. Or they might play well together. It depends.

Personally I plan on using this a lot more, just because it makes the screen a lot more attractive and because I like the idea of flaunting this for the GUI junkies and Xorg-addicts. At 300Mhz with less than 30Mb in use, I get the same degree of function as a computer 10 times as fast and 30 times as much memory. And now I can get the same degree of pretty, too. 😈

27 thoughts on “fbterm: Birth of the cool for the console”

Very nice! (great choice of backgrounds/underlays and yes underlay is a word in English)

You have almost perfectly imitated a tiling window manager with fbterm and screen-vs.

Just out of curiosity K.Mandla, I was reading an article on OSNews that the difference for the brain in CLI and GUI is one of memorization vrs recognition. Do you find yourself more apt to memorize something than the people around you?

Have you picked up the article on OSNews about gesture based controls being more like CLI reincarnated? What do you think about that idea? ([url=OSNews link]http://www.osnews.com/story/23371/The_CLI_Reincarnate_the_Gesture_Interface[/url])

> I should also mention that in Arch, fbterm commandeers the entire framebuffer and holds it hostage until the session is complete. Pressing CTRL+ALT+F2 and so forth don’t have much effect so long as fbterm has your attention.

This works fine in Arch. You are pressing the wrong keys. It is ALT+F2. No control.

This is brilliant, cheers 🙂
I’m sorting out a minimalist setup on my desktop to force myself to be productive and this is everything I was trying to get and more 😀
Just one question, I can’t run fbterm without being root and so I end up logged in as root – the error message says it can’t open the frambuffer device – any way to allow a normal user to run it? 🙂

I’ve seen that before in Debian when I was trying to use links2 -g to surf on this Pentium. It has something to do with the permissions of /dev/fb, if I remember right. I forget now what I did to get around that. … 😦

Cheers for the reply 🙂
Since commenting, I’ve installed Crunchbang over the top of Ubuntu, which doesn’t produce the error and, aside from a small error about the kernel keymap table (which I’m working out now…), everything is running sexily 😀
Thanks for some great tutorials 🙂

I am trying to set up a useful environment on one of these new ARM-based cheapo netbooks.

I’ve got Angstrom booting and because it’s not a standard PC, fbcon is used for console. I just discovered fbterm today and tried it out and it seems to be what I am looking for. But it seems to conflict with the fbcon module. Yes, fbterm runs, but there are all sorts of artifacts on the screen when I do so.

Another question I have is something you raised above. How do you solve the problem of running other apps that need the fb device? And also, how do you switch between such apps, if you don’t have Alt-Tab switching?

Is it possible to create some sort of simple task manager for the fb that can solve these problems, if one doesn’t already exist?

When I first started trying the background image script (on arch), my image was reverting to 8 color, as so if I just tried viewing it with fbv. I then switched to Uvesafb and fbv views images perfectly, but the script is “snapshotting” my console and not the image being flashed. any suggestions? This is to cool for me not to have 🙂

All better. just an issue with that particular machines driver. I even got this to work on fully installed archlinux thumb drive that will boot on (most) anything. I love it. My favorite part is that since it is up against the frame buffer, things like alsamixer that don’t have transparency in X, do like this. Thank you for this and for the rest of your site. Best reading I’ve found.