Tag Archives: asciiquarium

Animated Plasma Wallpaper: Asciiquarium

Years ago, for KDE 3, I had ported a console “asciiquarium” to operate as a KDE screensaver, called “KDE asciiquarium“.  By KDE 4.2, it was included as part of the kdeartwork module by default.

Since the KDE 3 times when I started this screensaver, our desktop concept has changed around a bit.  We’ve developed the Plasma desktop, and have effectively deprecated the idea of screensavers (which are increasingly less popular), though lock screens are still important.

But not everything that changes is a negative: Plasma also supports “live” (or animated) wallpapers, including for lock screens.  After some pleas from users hoping for a Plasma 5 port of the screensaver, I started work about a year ago to see if I could port the screensaver to Plasma 5 as an animated wallpaper.

Screenshot of the running live wallpaper (set as the Plasma background)

I think I’ve succeeded in at least getting something to start with.  In fact I’ve been running this code for months, never quite finding time to work on it, and I figured maybe someone would be interested if I shared it out.

The code is available at my scratch KDE repository.  A packaged tarball of the initial release can be downloaded from here.

This version uses QML, which was quite a bit harder than I thought it would be, due to the desire to keep this “low res”.  For instance, instead of smoothly animating the fish with pixel precision, the code forces each fish to align to a text boundary (to simulate the effect of running the original TTY-based script).

To the Qt devs’ credit, I found that this was almost entirely doable in QML alone, thanks to its support for OpenGL shaders in its particle system.  In fact if you look at the QML code for the sharks you can see that I managed to get the shark sprite to be de-rezzed using vertex shaders alone.

This didn’t work for the individual fish; unfortunately I hadn’t found a way to both use vertex shaders for the fish and allow a per-particle sprite for the fish.  I’m sure this is just my inexperience with things; for now I create the fish in QML (in Component.onCompleted) but use a small C++ QML extension plugin to update their positions.  The C++ plugin is also used to create the pixmaps.  If it weren’t for these, the whole thing could notionally be in pure QML.

Unfortunately this isn’t anywhere near the greatness of the old version.  The shark sometimes dies early, and can’t kill the fish.  The air bubbles are missing (not that fish really produce bubbles anyways!), and we’re missing the other major ‘fun’ sprites like the sailing ship or, my favorite, the submarine.

But those nits aren’t getting fixed any faster hanging out on my hard disk, so I offer it up for wider consideration.


So the recent Hurricane Hanna that passed by forced our ship to get underway last week and I got to spend almost a week deployed. Yay. I’m back for now but we’ve been super-busy since then trying to make up for lost time.

I managed to find time to go ahead and move the asciiquarium screensaver into kdeartwork, which should be a part of KDE 4.2.

KDE trunk is looking better and better with each passing day which is nice. I’m tempted to run out and buy an ATI card at this point if only for the better hardware support in Linux. It seems that everytime I build a computer I inadvertently pick the worst-supported graphics card somehow. :-/

Anyways, I’m too tired to remember what else I was going to post so I’m just going to go to bed. :P

Olympics and other fun stuff

So I was excited to see my people behind KDE interview get posted the other day, especially since the comments were much more positive than I was expecting. blauzahl did a good job on the interview, I’d like to thank her and Danny Allen for taking the time to work on it. It was hard for me just to handle the Q&A session so I don’t want to think of how much work they put in!

Akademy 2008 is over and it’s kind of bittersweet for me, as I hear it was the best Akademy in the last couple of years and I wasn’t able to attend. I am glad that everyone found it such an enjoyable time though, I will hopefully be able to show up for one some day.

I’ve spent quite some time watching the Olympic games this past couple of days. There’s a lot more excitement than I’m used to, between Michael Phelps winning 8 gold medals (including 2 squeaky finishes), the excellent performances of our gymnastics and volleyball teams and watching Bolt destroy all competition on track and field. It’s kind of a shame to see China apparently faking the age of some of their gymnasts and going overboard in keeping protests away, especially given how unnecessary it is. China’s athletes have done very well so far, there’s no need for trickery, and trying to hide protesters is kind of like a Streisand effect. We already knew that China had dissidents, and now it’s also all over the news. Either way the Games themselves have been good although I’m starting to think it would be nice to have a organization not so completely corrupt like the International Olympic Committee to handle the Games. But I suppose the kind of money we’re talking about it practically going to guarantee rampant corruption :-/

Anyways I’m working right now on polishing off the kio_perldoc KIOSlave which I’ve added to kdesdk and I will probably make another kdesvn-build release in the not-too-distant future. Also, does anyone know who I should ask about adding a screensaver to kdeartwork?

$200 computers

So, I went down to visit my sister the other day. When I called to ask if they were going to be there they informed me that it was a good thing I called. Her grandmother had been using an old computer for her to use for school and email, which crapped the bucket.

Grandma goes to the store to see about replacing the computer with something inexpensive. Really inexpensive. Cheapest thing you’ve got that can check email and browse the Web. I’ve got the monitor, printer, everything, I just need the PC.

The KMart store clerk looks around and shows off the $600 or so PC, which was not in her target price range. After a bit more asking the clerk goes, “Well, we do have 1 machine in the back. Every store has only gotten one, but it’s only $200.

She asks to see it, and he brings it out. Says something about having Firefox, goes onto Facebook, Google Mail, has office tools, etc. She goes, “that’ll work for me” and promptly buys it.

Of course, it turned out that it runs Linux, not Windows, which my uncle gave her some ribbing about. When I asked how useful it had been they replied that my sister didn’t seem to have any trouble getting onto the Internet or using Firefox, but they had one page that wouldn’t work, and could I look at it? I told them I would, and that they might even see something with my name on it. (No, as it turned out).

So when I went down it turned out that it was running something called gOS, a Ubuntu derivative. My sister knew the passwords and stuff and had been able to half-navigate around the desktop. I installed Java and tested the site… and it still didn’t work. I don’t know if this is a gOS or Ubuntu (or Debian) hiccup but after installing the javaplugin package for mozilla I still had to symlink it into the plugins directory. After that, the Java site worked fine and my sister and her friend were able to play some game called Runescape. Only other software package she wanted to see was “that fish screensaver you showed me“. I didn’t want to install kdelibs just for one screensaver so I looked for the original. But the system didn’t have Term::Animation packaged and I didn’t want to mess with CPAN. Maybe next time though.

I also had to make their printer work. gOS actually came really close but since there was no driver included for her model printer it defaulted to Generic Text Only. A similar driver was available which I tried, and worked. There is a specific driver to use from Canon but you have to go through a bunch of hoops to get it to work so I simply didn’t bother.

Other than that, from my use the system was responsive enough, included enough software, and seemed at least reasonably achievable to browse around for someone who had never used Linux. I explained some Linux concepts for my sister and put an xterm icon on her desktop. I also ran the Synaptic Update process… and saw 117 or so security packages, including the OpenSSL fix. I don’t know what else the gOS guys are doing but they really need to make security packages update by default, or at the very least auto-download and then start blaring sirens saying that an update is needed. Windows is much better in that regard on default installations so that’s pretty embarrassing.

However, given all that is included, my grandmother and sister were pretty ecstatic. My uncle (a long time computer nerd) was kind of off-put by not being used to the system and pointed out everything that didn’t work but in the end it was either a 90% useful system for my sister or nothing and so both my grandmother and sister were pretty happy to have the system. I pointed out the support bookmarks in Firefox for my sister so she can mess around and other than that I guess I’ll have to train her a bit whenever I go down. But as long as an update doesn’t break anything they should have a useful system for quite a few years now, which makes me feel good about the work I put in supporting Linux and the F/OSS ecosystem as a whole. We’re not on top yet but for a lot of people we are certainly better than merely good enough now.