Re: Background Doesn't Change via cron(8)
- From: "David Boston" <dboston velseis com au>
- To: gconf-list gnome org
- Subject: Re: Background Doesn't Change via cron(8)
- Date: Mon, 05 Oct 2009 14:50:51 -0000
On Mon, 05 Oct 2009 11:10:18 +0100, Ghee Teo wrote
> Shawn H Corey wrote:
> > Emmanuele Bassi wrote:
> >
> >> On Sat, 2009-10-03 at 10:06 -0400, Shawn H Corey wrote:
> >>
> >>
> >>> * It changes ~/.gconf/desktop/gnome/background/%gconf.xml
> >>>
> >> oh, god. why are you doing this?
> >>
> >> use gconftool to change the gconf database.
> >>
> >>
> >>> Apparently, gconfd-2 is not getting informed of the change. Its cache
> >>> still has the old values. How do I fix this?
> >>>
> >> by using the right tool for the job.
> >>
> >> ciao,
> >> Emmanuele.
> >>
> >>
> >
> > You mean like this?
> >
> > gconftool-2 -t string -s /desktop/gnome/background/picture_filename
> > $WALLPAPERS/${ALIST[$number]}
> >
> > I am; doesn't work with cron(8).
> >
> There is some problem with this approach:
> - the command only changes the gconf value for the cron user (not any of
> the user on the system)
> - if you are changing
>
> ~/.gconf/desktop/gnome/background/%gconf.xml
Here I think the correct tool is to have your cron job just change what a symbolic link
is pointing to instead of changing a gconf setting.
Use the *nix tools do the things the *nix way.
Gconf comes from a completely different mindset of a single user system. Thus if you
are going to use cron to do things directly with it you would have to either set it up
for that user with "crontab -u username cronfile.with.my.stuff.in.it" or explicitly run
as the correct user in /etc/crontab but assume your script won't have your environment.
That means putting all the variables and full paths that you'll need in your script.
On the first run you might want to make it echo all the variables to a file
>
> directly, that doesn't get pick up until gconfd-2 is restarted since
> gconfd-2 is monitoring memory data not persistent data when it is running.
>
> If you want to change the desktop back ground value completely using
> cron tab, this may work:
>
> - gconftool-2 --direct --config-source \
>
> xml:readwrite:/etc/gconf/gconf.xml.defaults --type dtring --set \
>
> /desktop/gnome/background/picture_filename <filename>
>
> - pkill gconfd-2
>
> Pretty nasty hacks, since that pkill gconfd-2 is trying to ask all
> running user's gconfd-2 to stop and will be restarted when its service
> is required.
>
> -Ghee
> >
> >
>
> _______________________________________________
> gconf-list mailing list
> gconf-list gnome org
> http://mail.gnome.org/mailman/listinfo/gconf-list
--
Open WebMail Project (http://openwebmail.org)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]