DCOP calls and cron

Thomas Olsen tanghus at gmail.com
Sun Feb 18 13:12:06 UTC 2007


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

I have made a small script - basically a one-liner - to fetch the daily 
Doonesbury strip and set it as my desktop background.
When I run it from the cli it works ok but when it is run from a cron job it 
doesn't change the background.

I'm guessing the dcop call fails for some reason...?

It could all be in one line but I separted it a bit for debugging. (The third 
line starting with REMOTE shouldn't kine-break)

- ----[snip]------------------------------------------------------
#!/bin/bash
cd $HOME/Doonesbury
REMOTE="http://images.ucomics.com/comics/db/`date +'%Y'`/db`date 
+'%y%m%d'`.gif"
LOCAL=$HOME/Doonesbury/db`date +'%y%m%d'`.gif
echo `pwd` > /home/tol/Doonesbury.log
echo $REMOTE >> /home/tol/Doonesbury.log
echo $LOCAL >> /home/tol/Doonesbury.log
wget $REMOTE
sleep 5
dcop kdesktop KBackgroundIface setWallpaper 2 $LOCAL 1
- ----[snip]------------------------------------------------------

- -- 
Med venlig hilsen / Best regards
	Thomas Olsen


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFF2FC1F4NH5ZSF+vURAhNAAJ9nD6DAgci3JgqlPacmjiKYWUMyggCeJeHh
fxHnk7juEG/HiRNF38Mj1j4=
=7trS
-----END PGP SIGNATURE-----




More information about the kubuntu-users mailing list