|
View:
New views
12 Messages
—
Rating Filter:
Alert me
|
|
|
Background Doesn't Change via cron(8)Hi,
I have just installed Ubuntu 9.04 on my PowerBook G4. I have a cron job that suppose to change the background. * It worked on Ubuntu 8.04 * It works from a terminal * It changes ~/.gconf/desktop/gnome/background/%gconf.xml What it doesn't do is change the image. Apparently, gconfd-2 is not getting informed of the change. Its cache still has the old values. How do I fix this? -- Just my 0.00000002 million dollars worth, Shawn Programming is as much about organization and communication as it is about coding. I like Perl; it's the only language where you can bless your thingy. _______________________________________________ gconf-list mailing list gconf-list@... http://mail.gnome.org/mailman/listinfo/gconf-list |
|
|
Re: Background Doesn't Change via cron(8)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. -- Emmanuele Bassi, W: http://www.emmanuelebassi.name B: http://blogs.gnome.org/ebassi _______________________________________________ gconf-list mailing list gconf-list@... http://mail.gnome.org/mailman/listinfo/gconf-list |
|
|
Re: Background Doesn't Change via cron(8)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). -- Just my 0.00000002 million dollars worth, Shawn Programming is as much about organization and communication as it is about coding. I like Perl; it's the only language where you can bless your thingy. _______________________________________________ gconf-list mailing list gconf-list@... http://mail.gnome.org/mailman/listinfo/gconf-list |
|
|
Re: Background Doesn't Change via cron(8)On Sat, Oct 3, 2009 at 11:19 AM, Shawn H Corey <shawnhcorey@...> wrote:
> > 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). > You should really do this in your session. There is no particular need to change your background when you are not logged in, right ? _______________________________________________ gconf-list mailing list gconf-list@... http://mail.gnome.org/mailman/listinfo/gconf-list |
|
|
Re: Background Doesn't Change via cron(8)On Sat, 2009-10-03 at 11:23 -0400, Matthias Clasen wrote:
> You should really do this in your session. > There is no particular need to change your background when you are not > logged in, right ? It's an outstanding issue with gnome that they broke the hell out of gconf and/or forgot to implement a session crond. I fixed (read: hacked) the problem out of gnome-wallchanger project by creating a symlink in ~/.gnome2/ which gets updated by the cron job. The advice to create a specialised daemon to do it in session was deemed to be wasteful of resources and not principally utilising existing, well tested technologies. Martin, _______________________________________________ gconf-list mailing list gconf-list@... http://mail.gnome.org/mailman/listinfo/gconf-list |
|
|
Re: Background Doesn't Change via cron(8)Matthias Clasen wrote:
> On Sat, Oct 3, 2009 at 11:19 AM, Shawn H Corey <shawnhcorey@...> wrote: > >> 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). >> > > You should really do this in your session. > There is no particular need to change your background when you are not > logged in, right ? > Since I'm the only one using the machine, this hasn't been the problem. -- Just my 0.00000002 million dollars worth, Shawn Programming is as much about organization and communication as it is about coding. I like Perl; it's the only language where you can bless your thingy. _______________________________________________ gconf-list mailing list gconf-list@... http://mail.gnome.org/mailman/listinfo/gconf-list |
|
|
Re: Background Doesn't Change via cron(8)Martin Owens wrote:
> I fixed (read: hacked) the problem out of gnome-wallchanger project by > creating a symlink in ~/.gnome2/ which gets updated by the cron job. > > The advice to create a specialised daemon to do it in session was deemed > to be wasteful of resources and not principally utilising existing, well > tested technologies. But not even a hint on how. Sigh. -- Just my 0.00000002 million dollars worth, Shawn Programming is as much about organization and communication as it is about coding. I like Perl; it's the only language where you can bless your thingy. _______________________________________________ gconf-list mailing list gconf-list@... http://mail.gnome.org/mailman/listinfo/gconf-list |
|
|
Re: Background Doesn't Change via cron(8)On Sat, 2009-10-03 at 12:38 -0400, Shawn H Corey wrote: > But not even a hint on how. Sigh. http://bazaar.launchpad.net/~doctormo/gnome-wallchanger/trunk/files Martin, _______________________________________________ gconf-list mailing list gconf-list@... http://mail.gnome.org/mailman/listinfo/gconf-list |
|
|
Re: Background Doesn't Change via cron(8)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). > - 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 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@... http://mail.gnome.org/mailman/listinfo/gconf-list |
|
|
Re: Background Doesn't Change via cron(8)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@... > http://mail.gnome.org/mailman/listinfo/gconf-list -- Open WebMail Project (http://openwebmail.org) _______________________________________________ gconf-list mailing list gconf-list@... http://mail.gnome.org/mailman/listinfo/gconf-list |
|
|
Re: Background Doesn't Change via cron(8)Ghee Teo wrote:
> - 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. Good idea; too bad it doesn't work. What gconfd-2 appears to do is that when it restarts, it thinks there should be another image in the list of background images. It then changes that image, not the one displayed. I have abandoned using cron(8). Instead, I have written my own daemon and since it is started from a terminal, it seems to work fine. This is a stop-gap kludge but, hopefully, when 9.10 comes out, this problem will be fixed. :) -- Just my 0.00000002 million dollars worth, Shawn Programming is as much about organization and communication as it is about coding. I like Perl; it's the only language where you can bless your thingy. _______________________________________________ gconf-list mailing list gconf-list@... http://mail.gnome.org/mailman/listinfo/gconf-list |
|
|
Re: Background Doesn't Change via cron(8)On Tue, 2009-10-06 at 11:53 -0400, Shawn H Corey wrote:
> I have abandoned using cron(8). Instead, I have written my own daemon > and since it is started from a terminal, it seems to work fine. This is > a stop-gap kludge but, hopefully, when 9.10 comes out, this problem will > be fixed. :) I wouldn't bet on it, the problem is marked as "won't fix" and is really a problem of unforeseen consequences of design choices, it's not a bug because it's really intended to work like that. I'm in favour of ripping out gconf in favour of a nice XDG config library. But I'm not that invested in gconf and gnome devs are. Best Regards, Martin Owens _______________________________________________ gconf-list mailing list gconf-list@... http://mail.gnome.org/mailman/listinfo/gconf-list |
| Free embeddable forum powered by Nabble | Forum Help |