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.

Here’s the script, in case you just want to cut-and-paste.


# fbterm-bi: a wrapper script to enable background image with fbterm
# usage: fbterm-bi /path/to/image fbterm-options

echo -ne "\e[?25l" # hide cursor

fbv -ciuker "$1" << EOF

exec fbterm "$@"

(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

  1. LeoSolaris

    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])

  2. zoev9

    its beautiful. Do you have a how-to for creating a screen/dvtm Arch install with framebuffer? My attempts have failed horribly.

  3. Kyle

    > 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.

    1. K.Mandla Post author

      This is odd. Mine doesn’t seem to be working. Thanks for pointing that out though. I’ll have to figure out what’s going wrong. …๐Ÿ˜

      Edit: It seems I have an entire smear of F-keys that don’t work any longer. Sigh.๐Ÿ˜ Why can’t computers just work forever?๐Ÿ˜‰ Thanks for pointing out my mistake though. Cheers.

  4. Pingback: KafeKafe » fbterm: Birth of the cool for the console

  5. Pingback: iotop for better disk monitoring « Motho ke motho ka botho

  6. Pingback: Links 29/5/2010: KDE SC 4.5 Beta 1, Zenwalk Linux 6.4, Thunderbird 3.1 RC1 | Techrights

  7. Pingback: fbterm, meet Wikipedia’s POTD « Motho ke motho ka botho

  8. corney91

    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?๐Ÿ™‚

    1. K.Mandla Post author

      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. …๐Ÿ˜ฆ

      1. corney91

        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๐Ÿ™‚

  9. Pingback: Not with a whimper but a bang « Motho ke motho ka botho

  10. Pingback: Arch Crux grub boot image wallpaper « Motho ke motho ka botho

  11. Scott

    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?

  12. Pingback: fbterm on a 150Mhz Pentium MMX, 32Mb « Motho ke motho ka botho

  13. Pingback: Dwarf Fortress for the console … sort of « Motho ke motho ka botho

  14. Pingback: Three steps to instant cool « Motho ke motho ka botho

  15. Pingback: More goodies for ConnochaetOS « Motho ke motho ka botho

  16. Perry

    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๐Ÿ™‚

    1. Perry

      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.

  17. Pingback: A monospace font beauty pageant « Motho ke motho ka botho

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s