Random desktop backgrounds in Openbox

If you like minimalist environments like me you may like this guide that explains how to change your desktop background every time you log in.

Before anything: If you use any window manager that provides a way to change your desktop background like nautilus does this post isn't for ya.

To handle our desktop background we will need a simple image viewer, i'm going to use feh.

If you are using Gentoo before install feh we will have to make sure that we have imlib compiled with jpeg and png support enabled. To do so, edit your package.use file:

media-libs/imlib2 X jpeg png

Save it, recomplile imlib and get feh:

emerge -av imlib2
emerge -av feh

Finnaly we need to create a startup script that will run everytime we log in; this little script changes your wallpaper from a random jpg|png image from our ~/images/wallpapers folder every 15 minutes. Tweak it!

#!/bin/sh while true; do find ~/images/wallpapers -type f \( -name '*.jpg' -o -name '*.png' \) -print0 | shuf -n1 -z | xargs -0 feh --bg-scale sleep 15m done

Cheers!

About
Related Posts
  • Introduction to Vagrant

    Vagrant is a tool to create and configure VMs for development. You basically write a config file that can be shared with the rest of the team and added to your project repository. This post is an introduction to the configuration and will show you how to quickly setup Ubuntu box for RVM+Ruby development; and another for Apache+PHP.

  • Install MongoDB PHP driver on Debian 6 Squeeze

    Because NoSQL databases are the new cool thing bro

  • Run Zend Framework (1.11) on lighttpd

    How to Run a Zend Framework app over lighttpd, for uber speed

Comments
The comments are closed on this section.
Hire me!

I'm currently open for new projects or join pretty much any project i may fit in, let me know!

Read about what I do, or contact me for details.