Creating Slide Show Backgrounds in XFCE
Continuing in this series of slide show backgrounds, in this article I will explain the process of creating a set of desktop backgrounds that will transition like a slide-show in XFCE. Note that I am using XFCE version 4.6.0 in this tutorial. Other versions may be able to use this tip, but the screen shots may look different. See corresponding howtos for GNOME, and KDE3 also.
Start by right clicking on the desktop and choosing "Desktop Settings".
Under the "Background" tab, choose "Image List". Click on the green plus sign near the left side of the center of the window to add backgrounds to this list.
Hold down the shift key when clicking to select long lists of images, or hold the control key to select individual image files from the list. Click "Add" in the lower right hand corner to finish selecting the images.
Select how you would like the background images displayed (Auto, Centered, Tiled, Stretched, Scaled, Zoomed) and then close the window.
Now, at this point, you've created a list of images that XFCE will pick from at random each time you log into XFCE. The only time these images will change is upon login. If you're OK with that, you're done. If you would like the ability to switch these backgrounds either on demand or at a fixed interval, read on. Warning: From this point on, we are in "hack" territory, so things may not always run smoothly.
Creating a "Change Background" desktop/panel icon
Theoretically, the xfdesktop --reload command should update the background, but that didn't work at all for me. However, we can trick the XFCE desktop into thinking that it has been restarted by restarting the program that handles the desktop. XFCE calls this program xfdesktop. From the command line, you can type killall -HUP xfdesktop to kill the xfdesktop process and restart it, which refreshes the icons and chooses a new desktop image at random from your list. You can easily create an icon to run this command for you, either on your desktop or in the XFCE panel.
Creating a desktop icon: To create a desktop icon, right click on the desktop and choose "Create Launcher"
in the necessary information in the window, choose an icon, and click "Create" to make the icon. Double clicking this icon will restart xfdesktop and switch the background for you.
Creating an XFCE panel icon
Right click the XFCE panel, and select "Add New Items".
From the "Add New Items" window, click "Add".
Fill in the appropriate fields in the launcher window, entering the command killall -HUP xfdesktop, and choosing an icon that you will recognize. Select "OK".
Admire your icon. Clicking it will restart your desktop and refresh the background.
Creating a crontab to transition the backgrounds at a fixed interval
You can now change backgrounds on demand, but they do not change for you unless you log in and out. We will use crontab to help us in this effort.
At the command line, type crontab -e to open and begin editing your crontab. If you have never edited your crontab before, it will prompt you to choose an editor for this task. I chose vim, because that's how I roll. Use whatever editor your like the most.
Once your crontab is open, you should see a text file that says # m h dom mon dow command on the first line. For those of you who are not familiar with crontab, please watch the excellent Crontab Tech Tip Video that Shawn Powers created about how to interact with crontab and the meanings of the crontab fields. Add to the next line this text:
At the beginning of this line, '*/15" means "every 15 minutes". You can easily change the numbers in your crontab to any interval that you desire. For example, "*/5" would be every five minutes, and "*/2" woulld be every other minute.
Save and close your editor, and crontab will automatically perform your commands.
Issues with the XFCE hack
Now, I've been having some intermittent issues with this hack. Sometimes, it appears that killall -HUP xfdesktop completely kills xfdesktop instead of just restarting it. If your icons have disappeared, and the desktop background no longer changes, then xfdesktop has been killed. You can verify its death by either looking for xfdesktop in the process list by typing ps aux | grep xfd[e]sktop, or you can simply type killall -HUP xfdesktop, and if you get "xfdesktop: no process killed", then xfdesktop wasn't running at the time you typed the program.
To revive xfdesktop, simply type xfdesktop at the command line, or create another icon/shortcut to this command to revive xfdesktop if it dies.
Other info
The list of wallpapers that XFCE uses to change the backgrounds is typically located at ~/.config/xfce4/desktop/backdrop.list. The file is simple a text file that contains the absolute path of each image, one file per line. Creating scripts or programs that monitor or add to this list would be rather straightforward, since you could append additional absolute paths via scripts or the command line.
Theoretically, desktop backgrounds can also be modified at the command line using the xfconf and the xfconf-query command. Documentation for xfconf is here.
Happy hacking, people!
| Attachment | Size |
|---|---|
| xfce-lj1.jpg | 19.79 KB |
| xfce-lj2.jpg | 43.31 KB |
| xfce-lj4.jpg | 85.17 KB |
| xfce-lj5.jpg | 70.8 KB |
| xfce-lj6.jpg | 21.11 KB |
| xfce-lj7.jpg | 31.21 KB |
| xfce-lj8.jpg | 20.64 KB |
| xfce-lj9.jpg | 48.41 KB |
| xfce-lj10.jpg | 44.86 KB |
| xfce-lj11.jpg | 19.92 KB |
| xfce-lj12.jpg | 23.61 KB |
| xfce-lj13.jpg | 27.94 KB |
Linux rocks! Personal blog: zootlinux.blogspot.com
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Designing Electronics with Linux | May 22, 2013 |
| Dynamic DNS—an Object Lesson in Problem Solving | May 21, 2013 |
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
- New Products
- Linux Systems Administrator
- Senior Perl Developer
- Technical Support Rep
- UX Designer
- Web & UI Developer (JavaScript & j Query)
- Designing Electronics with Linux
- Dynamic DNS—an Object Lesson in Problem Solving
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Using Salt Stack and Vagrant for Drupal Development
- Reply to comment | Linux Journal
56 min 30 sec ago - Nice article, thanks for the
11 hours 36 min ago - I once had a better way I
17 hours 22 min ago - Not only you I too assumed
17 hours 40 min ago - another very interesting
19 hours 33 min ago - Reply to comment | Linux Journal
21 hours 26 min ago - Reply to comment | Linux Journal
1 day 4 hours ago - Reply to comment | Linux Journal
1 day 4 hours ago - Favorite (and easily brute-forced) pw's
1 day 6 hours ago - Have you tried Boxen? It's a
1 day 12 hours ago
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Featured Jobs
| Linux Systems Administrator | Houston and Austin, Texas | Host Gator |
| Senior Perl Developer | Austin, Texas | Host Gator |
| Technical Support Rep | Houston and Austin, Texas | Host Gator |
| UX Designer | Austin, Texas | Host Gator |
| Web & UI Developer (JavaScript & j Query) | Austin, Texas | Host Gator |
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?



Comments
Slackware 12.2.0 / cron / XFCE
For reasons that should be self-explanatory, this is the command line required for 'cron' to make this work for Slackware 12.2.0 using XFCE:
/usr/bin/xfdesktop --display=:0.0 --reload
Incorrect switch?
When I issue the command
xfdesktop --refresh
It says:
xfdesktop: Unknown option: --refresh
The options:
--reload Reload all settings, refresh image list
--menu Pop up the menu (at the current mouse position)
--windowlist Pop up the window list (at the current mouse position)
--quit Cause xfdesktop to quit
Then I use
xfdesktop --reload
And it works ok.
You were right...
I mistyped the command. It should be "xfdesktop --reload". (I have since edited the document.) Unfortunately, it still doesn't work for me in Ubuntu 9.04 with XFCE installed as an add-on. I still have to kill xfdesktop manually. But, if "xfdesktop --reload" works for you, feel free to put it in the application/panel shortcut instead of "killall -HUP xfdesktop".
Linux rocks!
Personal blog: zootlinux.blogspot.com