Re: Question

On Fri, 2004-03-26 at 09:36, Alexandru Radovici wrote:
> Hello,
>   my name is Alex and I'm a programmer. I want to make a program that
> changes the desktop wallpaper in GNOME. The problem is that I haven't been
> able to find any help on how to change the desktop background. After
> searching I understood that it has smth. to do with nautilus.
> Maybe you can help me with this. 
> Thank you,
> Alexandru Radovici

Assuming things haven't changed recently, you can use gconftool-2 from
the command line to set the background. This tool is used to set 'keys'
in the gconf database (which is like the Windows registry). Nautilus
monitors certain keys for changes, and will set the background
automatically based upon their value. For example:

$ gconftool-2 -s /desktop/gnome/background/picture_filename /home/harvey/test.jpg -t string

would set the background to a file called test.jpg from my home
directory. Note that the above is all on one line (in case your email
client formats it differently). If you want to write a program which
does this more directly (eg. via a C/C++ api), presumably you could get
the source for gconftool-2 and read exactly how it sets that key value.

For more options (like background colour), do the following which lists
all keys under the /desktop/gnome/background directory.

$ gconftool-2 -a /desktop/gnome/background

Hope that helps. A developer should respond if I'm wrong.

Peter Harvey.
Mostly Quiet.

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