More fun with usplash

Usplash themes are nothing more than png images, translated to C code and a few functions for drawing progress bars, animation etc. The actual drawing primitives are defined in the usplash binary (well, actually in libusplash). So in theory one could use these themes from other applications as well, as long as the required drawing primitives are available.

One of the annoying things of usplash themes is that it’s non-intuitive how you should switch between them, it needs both update-alternatives and update-initramfs. “Magic un-userfriendly incantations” some would say, and I agree.
Combine those two things and add a night of GTK hacking. Never having programmed with GTK in C before, I needed the manual quite often (the manual is great!). But the PyGTK experience helped Smile

Main window: Overview of all installed themes:

screenshot-usplash-switcher-main.png

Preview window: slightly larger image and show which resolutions are supported:
screenshot-preview-of-usplash-theme-edubuntuso.png
Click on the switch button and it will perform the magic incantations for you

screenshot-usplash-switcher-switching.png

And a minute later, you have switched!

screenshot-usplash-switcher-1.png

Too bad it’s already past Feature Freeze for Ubuntu Edgy, but I hope to get this included for Edgy +1 (Will it be Fuzzy Ferret, Frisky Firefly or Foxy Fish?)

Update: Here’s the source

29 Comments

  1. folken Says:

    Great stuff. Why to wait for Edgy+1, public source code today :) Those, who want to use it, would compile it and use for own risk.

  2. dré Says:

    Flying Frog!

  3. Daniel Says:

    Looks great, unfortunate about the timing, is there still a chance you could get it into the universe repositories for edgy? Would be great to have access to such a tool.

  4. Christian Says:

    Yes, i agree with this guys its look very usefull

  5. nonnano Says:

    Can’t you still get this to universe or multiverse despite of the freeze, somehow? This is awesome stuff and should be installed by default.

  6. nonnano: Universe stuff isn’t installed by default.

  7. But it can be installed at will.

    Will it be backported to Dapper?

  8. No, it needs gtk 2.10 — which is not available in dapper.

  9. [...] Denis Kaarsemaker na swoim blogu opublikowaÅ‚ screeny ze stworzonej przez siebie aplikacji do zmiany tematów Usplasha! Aplikacja nie wejdzie już raczej do Edgy’ego, ale wciąż mam nadziejÄ™, że opublikuje chociaż źródÅ‚a. WiÄ™cej informacji na http://blogs.ubuntu-nl.org/dennis/2006/09/13/more-fun-with-usplash/. [...]

  10. Matt Philmon Says:

    What packages are needed to build it successfully on Edgy? Any attempts at creating a deb? I’d love to try it out but am running into some build problems

  11. Corey Says:

    Not terribly important. But it is this kind of extra spit and polish that makes ubuntu a cut above the rest. Shame about not making edgy but thats the way it goes. Releases gotta cut off sometime. It does seem, though, like I’m always waiting for Ubuntu n+2 where n is the ubuntu release I currently have installed.

  12. Matt: look at the comments at the top of the source file
    Corey: It’s good to have something to look forward to ;)

  13. Usplash switcher…

    这个 Dennis Kaarsemaker 写了个名叫 Usplash switcher 的工具,使用该工具不仅可以对系统中已安装的 Usplash 主题进行有效管理,而且可以在各个主题间轻松切换。伴随着每天都有一个新的引导屏幕,….

  14. Matt Philmon Says:

    AHHH: RTFM!

    :) Sorry about that.

  15. Cambiar de tema con usplash…

    USplash es una aplicación que usa el _framebuffer_ en Linux para monstrar una imagen en el arranque del sistema, mostrando la información típica de ese proceso de una forma más atractiva. Dennis Kaarsemaker ha programado para Ubuntu una pequeña he…

  16. [...] Usplash-switcher is an easy way to choose which of the installed usplashes is active. [...]

  17. zenrox Says:

    works great
    looks like it dont find all .so files in the /usr/lib/usplash dir
    i suspect blow line 90 is the issue

  18. ZarK Says:

    This is superb! I can’t get the problem to detect any other themes though… where am I supposed to put my .so files so the program will read them?

  19. You’re supposed to install them properly, including adding them to the usplash-artwork.so alternative.

  20. Chiller Says:

    Hi, I’m a complete noob in ubuntu. How do we use this source? I tried “chmod 755 usplash.sh” (because I saved it as usplash.sh.
    Could someone help me with this?

  21. Petar Says:

    @Chiller

    This a C source file, you have to compile it by issuing a command in terminal
    gcc usplash-source.c
    and copying resulting binary in e.g. /usr/bin.

  22. Tiede Says:

    Do we need to install additional libraries in spite of the default ones?
    I tried compiling it (both via terminal and via CodeBlocks ) and I get an error.
    It says that it cannot find the appropriate headers.
    Exact message is: error: gtk/gtk.h: No such file or directory.
    Am I missing something? Shouldn’t I ALREADY have those libraries installed on Ubuntu Edgy?
    P.S:I am compiling from the desktop. But if I remember well from my introductory programming class (’twas just a month ago :D ) it should not matter…

  23. Tiede Says:

    PPS: I already have libgtk2.0-dev installed

  24. partymola Says:

    Follow these steps:

    # Install development files for usplash
    sudo apt-get install usplash-dev

    # Compile usplash-switcher
    gcc -o usplash-switcher usplash-switcher.c `pkg-config –libs –cflags gtk+-2.0` -lusplash

    # Run usplash-switcher as root
    sudo ./usplash-switcher

    Enjoy it :)

  25. partymola Says:

    There is a problem with this blog… it substitutes two consecutive dashes with a long dash… so it messes up the compiling line.

    Correct line is:
    gcc -o usplash-switcher usplash-switcher.c `pkg-config -(removethis)-libs -(removethis)-cflags gtk+-2.0` -lusplash

    Don’t forget to remove the “(removethis)” parts… lol

  26. Peter B. Says:

    Aha! Thankyou, partymola. I was just trying ‘gcc usplash-switcher.c’, which wasn’t working.

    Now it’s working - but for some reason, some of the images display a bit odd. Oh well, I guess that’s more a problem with usplash-dev that usplash-switcher.

    I’m working on a Ruby version of it, simply because I can :)

  27. lotacus Says:

    I’ve compiled it and ran it. Now when the program pops up, it fails to display the themes already installed through synaptic. IE: xubuntu, ubuntu etc.. However, it seems that included in your program is an edubuntu theme which it previews.

    When I use the program to set the theme and manually preview using the command sudo usplash -c my screen turns off with hv over frequency.

  28. systemize Says:

    Link to the source is dead, could someone share it or reupload it?

Leave a Comment