DCOP calls and cron
Thomas Olsen
tanghus at gmail.com
Sun Feb 18 16:23:22 UTC 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Sun 18 February 2007 16:55, D. Michael McIntyre wrote:
> On Sunday 18 February 2007 8:12 am, Thomas Olsen wrote:
> > I'm guessing the dcop call fails for some reason...?
>
> I'm guessing either a user thing or a $DISPLAY thing. I threw some more
> debugging echoes in here. What does it say when you run it from the
> command line, and how is it different running out of cron?
>
> ----[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
>
> log=/home/tol/Doonesbury.log
> echo "PWD: $PWD" > $log
> echo "REMOTE: $REMOTE" >> $log
> echo "LOCAL: $LOCAL" >> $log
> echo "HOME: $HOME" >> $log
> echo "DISPLAY: $DISPLAY" >> $log
> echo "WHOAMI: $(whoami)" >> $log
>
> wget $REMOTE
> sleep 5
> dcop kdesktop KBackgroundIface setWallpaper 2 $LOCAL 1
>
> > ----[snip]------------------------------------------------------
>
- From cron:
PWD: /home/tol/Doonesbury
REMOTE: http://images.ucomics.com/comics/db/2007/db070218.gif
LOCAL: /home/tol/Doonesbury/db070218.gif
HOME: /home/tol
DISPLAY: :0.0
WHOAMI: tol
- From cli:
PWD: /home/tol/Doonesbury
REMOTE: http://images.ucomics.com/comics/db/2007/db070218.gif
LOCAL: /home/tol/Doonesbury/db070218.gif
HOME: /home/tol
DISPLAY: :0
WHOAMI: tol
The only difference is in the DISPLAY var. I'll try to add --all-users to the
dcop call (as I'm the only user)
Thanks.
- --
Med venlig hilsen / Best regards
Thomas Olsen
At ebb tide I wrote a line upon the sand, and gave it all my heart and all my
soul. At flood tide I returned to read what I had inscribed and found my
ignorance upon the shore. -- Kahlil Gibran
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
iD8DBQFF2H2CF4NH5ZSF+vURAkaSAJ0R9/VuFVg0LCL+anztpkJ9aSFuoACdFKQq
no5cCtTTvdXqs2gmTWRvLBA=
=lVpq
-----END PGP SIGNATURE-----
More information about the kubuntu-users
mailing list