Re: Force Nautilus to refresh wallpaper - or Nautilus compatible changer?



On Sun, 2005-03-20 at 20:29 +0300, Nickolay V. Shmyrev wrote:

> You can use something like this
> 
> #include <gconf.h>
> 
> gconf_client_unset (client, "desktop/gnome/background/picture_filename",
> NULL);
> gconf_client_set_string (client,
> "desktop/gnome/background/picture_filename", filename, NULL);
> 
> Of from shell 
> gconftool-2 --unset desktop/gnome/background/picture_filename
> gconftool-2 --set desktop/gnome/background/picture_filename $filename
> 
> 
> Note that first you should unset gconf key and then set it again,
> otherwise, if
> filename won't change, the picture won't be reloaded. But if filename
> changes, you can just set key to right value.

Thanks!  This worked for the most part.  I had to add a '/' to the
behinning of the attribute path and I had to add -type String to the set
call.  THANKS!

gconftool-2 --unset /desktop/gnome/background/picture_filename
gconftool-2 --type String --
set /desktop/gnome/background/picture_filename "$pic"






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]