Jun 302012
 

Warning: This page details a shell script that I’ve produced for my own amusement; it isn’t a product. It hasn’t been tested in lots of environments, and it will take some hacking to get it to work for you. If you’re looking for something to use, move along; if you’re looking for ideas to improve a real wallpaper setting program, you might want to read on.

So elsewhere I’ve admitted to driving a stake through the heart of GNOME’s wallpaper plugin to allow my own wallpaper script to work. Well, I could hardly do that and not announce it could I? So here goes :-

  1. It doesn’t actually set the wallpaper; it lets hsetroot do that.
  2. It requires a parameter to determine which directory to choose – i.e. ~/lib/backgrounds/one~/lib/backgrounds/two, etc.
  3. It uses xrandr to pick out the “regions” of the default screen.
  4. It puts portrait images on my portrait monitor, and landscape images on my landscape monitor by overlaying them onto an overall image the size of both monitors added together.
  5. It waits a set duration, and then repeats.

If you’re still interested in getting a copy it’s available at http://zonky.org/src/set-random-background.

Jun 282012
 

If for some peculiar reason (I’ll come to those later) you want to prevent GNOME from setting the desktop wallpaper, you used to have a relatively easy option. If you search for how to disable the wallpaper setting in GNOME, you will find frequent mentions of the method. Unfortunately it no longer seems to work.

It seems that the GNOME developers in their infinite wisdom have seen fit to ignore any previous setting that allowed you to override GNOME and say “I’ll set the background myself”, and quite possibly no longer have that option available. Well, where there’s a will there’s a way :-

$ sudo zsh
# cd /usr/lib/gnome-settings-daemon-3.0
mv background.gnome-settings-plugin _background.gnome-settings-plugin
mv libbackground.so _libbackground.so
pkill gnome-settings-daemon
gnome-settings-daemon

At this point your terminal will be taken over by the gnome-settings-daemon and it will scroll tons of messages past your nose. If you scroll up, you will see close to the top a mention of being unable to load the background setting plugin. At which point you can use your favourite background setting tool (a word on that later) to set the background.

This is a rather brutal method of disabling this, and is prone to failure when the relevant software packages are upgraded – your favourite package manager is likely to replace the “missing” files for you. So if you’re listening, GNOME developers, please resurrect a sensible method for turning this plugin off!

BTW: You may want to check your favourite background setting tool actually works properly in your environment; I’ve found that in my environment both Imagemagick and xloadimage silently failed, but feh and hsetroot worked fine. This had me puzzled for a moment when I tried the first two!

As to why I want to disable the GNOME wallpaper plugin, there are several reasons :-

  1. I’m difficult and want to do it my own way.
  2. The GNOME background setting plugin has some limitations that are irritating to me.
  3. And I have some rather specialist requirements … stay tuned for more information.