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.

#!/bin/bash

# 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
q
EOF

shift
export FBTERM_BACKGROUND_IMAGE=1
exec fbterm "$@"

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

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

About these ads

27 Responses to “fbterm: Birth of the cool for the console”


  1. 1 Armor Nick 2010/05/28 at 4:04 PM

    epic win for retro guys :D

  2. 2 LeoSolaris 2010/05/28 at 8:34 PM

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

  3. 3 zoev9 2010/05/29 at 12:34 AM

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

  4. 4 Kyle 2010/05/29 at 2:41 AM

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

    • 5 K.Mandla 2010/05/29 at 6:11 AM

      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.

  5. 6 corney91 2010/06/06 at 1:01 AM

    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 :D
    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? :)

    • 7 K.Mandla 2010/06/06 at 7:00 AM

      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. … :(

      • 8 corney91 2010/06/06 at 8:45 AM

        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 :D
        Thanks for some great tutorials :)

  6. 10 Scott 2010/06/17 at 9:11 AM

    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?

  7. 12 Motoom 2010/09/28 at 7:41 AM

    That’s Miles Davis!

  8. 14 Perry 2010/12/04 at 6:54 AM

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

    • 15 Perry 2011/01/18 at 11:48 PM

      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.


  1. 1 KafeKafe » fbterm: Birth of the cool for the console Trackback on 2010/05/29 at 3:01 AM
  2. 2 iotop for better disk monitoring « Motho ke motho ka botho Trackback on 2010/05/29 at 10:24 PM
  3. 3 Links 29/5/2010: KDE SC 4.5 Beta 1, Zenwalk Linux 6.4, Thunderbird 3.1 RC1 | Techrights Trackback on 2010/05/30 at 8:32 AM
  4. 4 fbterm, meet Wikipedia’s POTD « Motho ke motho ka botho Trackback on 2010/05/30 at 8:31 PM
  5. 5 Not with a whimper but a bang « Motho ke motho ka botho Trackback on 2010/06/11 at 7:55 AM
  6. 6 Arch Crux grub boot image wallpaper « Motho ke motho ka botho Trackback on 2010/06/11 at 9:34 PM
  7. 7 fbterm on a 150Mhz Pentium MMX, 32Mb « Motho ke motho ka botho Trackback on 2010/07/05 at 9:07 AM
  8. 8 Dwarf Fortress for the console … sort of « Motho ke motho ka botho Trackback on 2010/07/24 at 8:51 AM
  9. 9 Three steps to instant cool « Motho ke motho ka botho Trackback on 2010/09/22 at 8:59 AM
  10. 10 More goodies for ConnochaetOS « Motho ke motho ka botho Trackback on 2010/11/07 at 8:14 AM
  11. 11 A monospace font beauty pageant « Motho ke motho ka botho Trackback on 2011/01/31 at 9:17 AM

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




Welcome!



Visit the Wiki!

Some recent desktops


May 6, 2011
Musca 0.9.24 on Crux Linux
150Mhz Pentium 96Mb 8Gb CF
 


May 14, 2011
IceWM 1.2.37 and Arch Linux
L2300 core duo 3Gb 320Gb

Some recent games


Apr. 21, 2011
Oolite on Xubuntu 11.04
L2300 core duo 3Gb 320Gb

Enter your email address to subscribe to this blog and receive notifications of new posts.

Join 405 other followers

License

This work is licensed under the GNU Free Documentation License. Please see the About page for details.

Blog Stats

  • 3,960,744 hits

Archives


Follow

Get every new post delivered to your Inbox.

Join 405 other followers

%d bloggers like this: