Random screensavers for the console

After finding a slick way to incorporate a screensaver for the console, I’m keeping my eyes open for other options in the splashy-text-thingy department.

libcaca, right now, seems to be the best runner up to my long-time favorite, cmatrix. Installing libcaca gives you four nifty screensaver-type-thingies — cacamoir, cacafire, cacaball and cacaplas.

Each one is more or less an analogue for an xscreensaver display, albeit somewhat chunky and text-built. But even at 550Mhz, it’s doing quite well in the framerate department.

One small note if you run a purely X-less machine like me: In Crux and probably in other distributions, installing libcaca can call in some packages that fall under the X umbrella. I frown upon that since I have discovered how nice it is to omit anything X-governed, but I did build the package on a machine with X installed, which is easier than trying to filter through the dependencies and make it work.

Once the package itself is built you can transplant it to an X-less machine, and the only loss of function is when the caca libraries need to display an image (like a jpg photo) translated into their text-style output. But I have fim for displaying images; I wouldn’t use caca for that anyway.

No, what I want out of caca is that cache of demo-style programs. That, coupled with cmatrix (and maybe asciiquarium, if I could ever figure out the dependencies :roll:) makes for a nice, small suite of screensavers.

Now: How about triggering them randomly from within screen?

Easier done than said, really. This is an exceedingly primitive script that creates a random number, selects a screensaver by case, and uses that as the blanker for screen.

let "number %= $RANGE"

case $number in
	cmatrix -ab -u 2

(I omitted the moire screensaver because it seems somehow exceptionally taxing. I had a hard time regaining the system’s attention when it was running.) Please feel free to improve upon this; as I have mentioned before, I have all the programming skills of a rock. As in, “Hit it with a rock, and maybe it will start working.” :|

The next step is to adjust your .screenrc file to point to the script with the blankerprg option, like this:

blankerprg /home/kmandla/.scripts/screensaver.sh

or input that line directly into screen with CTRL+A : (that’s control-plus-a, followed by a colon).

Depending on your idle variable, the script should throw out a random “screensaver,” when it reaches the timeout.

In the mean time, I’m going to keep looking for more console-based autonomous screensaverish doodads. Maybe there’s a category or a list somewhere. … ;)

About these ads

16 Responses to “Random screensavers for the console”

  1. 1 mulenmar 2009/06/25 at 4:00 PM

    Heh, interesting. Me, I just let the screen go blank and/or shutdown. Less CPU, memory, hd taxation that way…especially important to give that older hardware a rest ;)

  2. 2 fuxter 2009/06/25 at 7:58 PM

    [quote]“Hit it with a rock, and maybe it will start working.” :|[/quote]
    oh, that’s the only way to deal with russian technical products, be it cars or some laundry machines… )

  3. 3 suomynona 2009/06/25 at 11:07 PM

    “(and maybe asciiquarium, if I could ever figure out the dependencies :roll: )”

    … ever tried to click on the read_me link on that asciiquarium site you conveniently linked to? ;)

    • 4 K.Mandla 2009/06/26 at 6:47 AM

      Many times. The problem is finding their corresponding packages — or creating them from scratch — in Crux. It’s the one small downside of working with a sparse distribution. ;)

  4. 5 CorkyAgain 2009/06/26 at 4:28 AM

    that link probably doesn’t work when you bash it with a rock ;-)

  5. 6 Eirik 2009/06/27 at 5:49 AM

    For a bit easier maintenance you could do soemthing like the following in your script:

    screensaver[$((index++))]=”cmatrix -ab -u 2″

    sh -c “${screensaver[$((RANDOM % index))]}”

    Some might argue that it would be more unixy to create small stubs in a folder, and filling the array along the lines of “for saver in folder/*”, or while read saver < $(ls folder)…

    Anyway, saves you from updating the integer on each case *and* manually calculating the total number of screensavers…


  6. 8 skralljt 2009/06/28 at 8:54 AM

    Hey how do you use libcaca? I am trying to experiment with these screensavers but their website doesn’t explain how to call them up on the screen. aasciquarium works pretty well on slitaz and xubuntu btw. I just installed all the stuff mentioned in the readme file with the tarball of asciiquarium. But then, I have X.

    • 9 Bryan 2009/06/29 at 8:33 AM

      skralljt – you should just have to fire off the ‘cacafire’, ‘cacaball’ or ‘cacaplas’ command on whichever distro you’ve got libcaca installed on.

  7. 10 zzer 2009/10/18 at 3:19 PM

    hmm i may suggest Borednomore from http://zzer.wordpress.com is lite and does work for me.

  1. 1 Using figlet for a console screensaver « Motho ke motho ka botho Trackback on 2010/01/02 at 3:29 PM
  2. 2 A few more games for the console « Motho ke motho ka botho Trackback on 2010/01/11 at 10:23 PM
  3. 3 vtclock: One more console clock can’t hurt « Motho ke motho ka botho Trackback on 2010/06/26 at 9:51 PM
  4. 4 Five unattached ideas « Motho ke motho ka botho Trackback on 2010/07/26 at 5:49 AM
  5. 5 One tool, one game, one clock « Motho ke motho ka botho Trackback on 2011/03/15 at 8:53 AM
  6. 6 For The Love Of………. ASCII Fish??? | Hilltop Yodeler Trackback on 2011/03/16 at 4:07 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


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


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

Blog Stats

  • 3,963,645 hits



Get every new post delivered to your Inbox.

Join 405 other followers

%d bloggers like this: