[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-look
Subject:    Re: Background Program
From:       Rik Hemsley <rik () kde ! org>
Date:       2002-10-29 20:52:21
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

#if Andy Cowan
> In the KDE Control Panel  one of the options for "Background" is
> "Background program.  This intrigues me, as I have a perl script that
> automatically downloads the Astronomy Picture of the Day from NASA
> every morning, and would like to have it be able to set the
> background at the same time.  However, I have been unable to find any
> documentation on background programs.  The big question I would like
> answered is how should a background program operate?  Should it
> return a reference to an image on the filesystem that should be made
> the background, or is there some library call it should make to set
> the background, or is there some other mode of operation?  I have not
> been able to find this documented anywhere.

The 'background program' concept is designed to call an external program
at a defined interval, asking it to create an image of size %x, %y pixels and
save it to a file (%f)

This is probably not what you want, as you only download your image once
a day, so polling for new ones would be a little silly.

Instead, what you can do is to have your perl script set the desktop
background using dcop.

The following should do it:

dcop kdesktop KBackgroundIface 'setWallpaper(QString,int)' /path/to/your/image 1

Hope this helps,
Rik

- -- 
http://rikkus.info
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9vvUFawUs0mFIs+URAjMKAKDMWUuWxtt9lXt06bKOMVSbmnrs0wCgrU6C
OyFBey62GQgOSS9tvq/oPk4=
=1xrA
-----END PGP SIGNATURE-----

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic