If you use Ubuntu, you probably use F-Spot for managing your photos. It’s a nice app and it organises all your photos into a directory tree based on date.
If you want to set up a desktop slideshow that shows images from this folder tree then you need to create a custom XML file that you can then set as the desktop background. Of course you need a system to create the slideshow.
This script does just that:
Inspired by a few scripts I found on the web, though this is the one I based it on, simply modified to make it recursively pull images rather than just images in the current directory and also shuffle the resulting list.
Place the script in the root of your ~/Photos directory, mark it as executable and then run it. It generates an XML file for you. You can now go to your desktop, right click and go to background then hit the [Add] button.
Now navigate to your ~/Photos directory and select the generated XML file. Job done.