Create A Desktop Background Wallpaper Changer For Xfce
Author: Stephan Jau
I have switched to Xubuntu a few months ago coming from Kubuntu. In Kubuntu I liked the (already available) option of setting up a list of image files and have them randomly displayed as background image on the desktop. This was one of the things I have missed so far in Xfce.
Also to say as former Windows user I have aquired/gathered quite a large number of wallpapers (thx goes to HTTrack for downloading over 18k wallpapers... I couldn't have manually done that... ok, maybe I could have...) and I like to have them displayed randomly on the background. That's more or the less the only major change I do on a theme (if you can call that a change...) as I let things normally as they are...
Anyway, thanks to TheSheep from the #xubuntu channel on irc.freenode.org (he's a really helpful guy and has helped me countless time) I can provide you with this small howto.
(1) Creating the list of images
1.1 Right-click on your desktop.
1.2 Select Desktop settings.
1.3 Make sure that the Allow Xfce to manage the desktop and Show Image boxes are checked (they are by default).
1.4 Click then on New list.
1.5 Add the image files by clicking on the +
1.6 Once you are done, save the list.
1.7 You are back in the previous screen and your newly created list should be selected in the File input box.
1.8 Then close that interface.
(2) Creating tje cron file for the wallpaper changer functionality
I normally create a cron.txt file where I add/delete cronjobs to and then, after modifying, I add it. This is also what I do here. If you add cronjobs differently, then you will have to see how you do that but the basic command that's executed stays the same.
2.1 Open a terminal.
2.2 Open your existing cron.txt file (or similar one) with your preferred editor. If you have no cron file then simply issue this command:
2.3 Now you are in the text editor nano and you need to paste now the following code into the file:
# Reload Background Image 0,5,10,15,20,25,30,35,40,45,50,55 * * * * killall -USR1 xfdesktop
This will change the image every 5 minutes. You can also change the behaviour. Please refer here: Wiki: Cron
2.4 To exit nano press:
Then press y to save the file
(3) Adding the Cronjob for Wallpapcher Changer
3.1 Before you overwrite any existing user cronjobs please execute this command:
If nothing is returned then it's fine to add you wallpaper changer script!
However if something appears, then you may want to copy'n'paste that into your cron.txt file otherwise it will be overwritten with the next step.
3.2 Add the cron.txt file that we created under section (2) by issuing the following command in the shell:
3.3 Enter now again the command listed in 3.1 and you should have an output like this:
hyper@xubi:~$ crontab -l
# Reload Background Image
0,5,10,15,20,25,30,35,40,45,50,55 * * * * killall -USR1 xfdesktop
(4) That's it
Get some coffee or whatever and enjoy your desktop bakground wallpaper changer.