How do I set a different wallpaper for each workspace in Xubuntu 13.04?
The great news is that you do not now need compiz, or even have compositing switched on in xfwm
to have a different background per workspace with xfdesktop
.You just need to use the development versions of the packages from the Xfce-4.12 xubuntu-dev ppa.
As you are on Xubuntu 13.04, you (and others on 12.10 or 13.10) must enable the xubuntu-dev xfce-4.12 ppa with the development versions of the packages; other xubuntu versions (such as 12.04) require the 4.10 ppa as well. The packages in the Xfce 4.12 ppa are actually labelled 4.11.x versions, as Xfce-4.12 is not finalised yet.
Instructions for Xubuntu 13.04 (and 12.10, 13.10):
sudo add-apt-repository ppa:xubuntu-dev/xfce-4.12 sudo apt-get update sudo apt-get dist-upgrade
Instructions Only to be used for 12.04:
sudo add-apt-repository ppa:xubuntu-dev/xfce-4.10 sudo apt-get update sudo apt-get dist-upgrade sudo add-apt-repository ppa:xubuntu-dev/xfce-4.12 sudo apt-get update sudo apt-get dist-upgrade
Then logout and login again, and right click on one of your workspaces, and go to 'Desktop Settings', and you will get the window shown below in figure 1.
On each of your workspaces, the background tab will be titled Wallpaper for [name of your workspace]. Choose an image or a folder with images and click the one you want for the background.
Repeat this process for all the workspaces, but remember:
It is very important to make sure the 'Apply to all workspaces' box is unchecked on each of the wokspaces when you choose a background or you will obviously just have the same background on them all.
You can also choose to set up automated changing of the backgrounds on each workspace if you wish. Simply check the box (as shown in the screenshot below), but remember that this must be checked on each workspace if you want each workspace to switch backgrounds at your desired interval. Obviously, you must have more than one image in the selected folder.
Figure 1:
If you wish to script the changing of the backgrounds, you could use xfconf-query
to change them:
Firstly, make sure
single-workspace-mode
is false:xfconf-query -c xfce4-desktop -p /backdrop/single-workspace-mode -s false
Then, use the command below and please substitute the number of the screen and workspace for the one that you wish to change, by checking with
xfce4-settings-editor
. Remember that workspaces begin at 0 forxfconf-query
and so your first workspace is actually 0 in the xfconf settings. Then also specify the correct path of your picture:xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/workspace2/last-image -s /location/of/image
So now compiz is not needed; you can switch between workspaces and see a different background in all of them when you have set the backgrounds up. The memory usage of xfdesktop4
will be slightly higher, but it will still only use around 28 mb with 4 workspaces with high resolution backgrounds on a 1280x1024 screen.
Please note this excellent feature is still under heavy development, and will definitely be one of the highlights of Xfce 4.12, but can be used now if you install the ppas.
Additional Note
If you find that you cannot set an image as a desktop wallpaper by right clicking the entry in the Thunar menu, add a new Thunar custom action to do that and use my script below in that action. The script takes the %f
parameter from Thunar as the path of the picture (see Figure 3).
You will also need to install xdotool
for it to work, and it will not work with compiz, only with xfwm
or similar window managers.
Figure 2: Copy the script and make it executable (chmod u+x
)
#!/usr/bin/env bash
# IMPORTANT: to be used as a script for a Thunar custom action
# it will need modification if used for other purposes
# path is %f given in Thunar's context menu
path="$1"
workspace="$(xdotool get_desktop)"
# check not in single workspace mode
xfconf-query -c xfce4-desktop -p /backdrop/single-workspace-mode -s false
# command with workspace and path variables
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/workspace"${workspace}"/last-image -s "${path}"
exit
Figure 3: Fill in the details for the Thunar custom action; make sure you have the path of the script correct; the Thunar custom action command is:
/location/of/script %f
In the 'Appearance Conditions' tab, choose images only as the appearance condition.
Now whichever workspace you are on, you will be able to set a wallpaper for it by right clicking on any image in Thunar and selecting your custom action.