Wednesday, August 20, 2014

How to make a slideshow background for Ubuntu (scripted)

I have finally gotten sick of the backgrounds that come stock with Ubuntu, and wanted a slideshow.
Unfortunately, Ubuntu (I'm using 14.04 with a Unity interface) does not provide an easy way of doing this. So below is a script you can run to add a slideshow of images as a background option.

There are many graphical apps to do this (e.g., see this blog post 3-awesome-ubuntu-apps-for-wallpaper-slideshow/), but I a) like to know what's going on, b) am not a big fan of installing more apps than I need and c) discovered that this is a fairly easy problem to script away.

So without further ado, here is the script:

How to use it
1) fill up a directory (henceforth known as <PicDir>) with images to loop through in the slideshow
2) download
3) run '. <PicDir> <Name>' in a terminal, where <Name> is the name you wish to give this slideshow (no spaces in <PicDir> or <Name>.

-This background will break if you remove images from the <PicDir>, so leave it somewhere where you are unlikely to move pictures out of it (or leave a reminder for yourself)

-This script in and of itself works and sets up 15 minutes between transitions which last 5 seconds.

-This is kind of a scriptified version of the information found on