[Cialug] cron/bash

Zachary Kotlarek zach at kotlarek.com
Thu Oct 21 17:25:26 CDT 2010


On Oct 21, 2010, at 5:16 PM, chris wrote:

> I'm attempting to have a bash script setup to run as a cronjob but it doesnt.

> gconftool-2 --set "/desktop/gnome/background/picture_filename" --type string "$FOLDER/$FILE"


I'd guess gconftool needs some environmental variable that is present when you spawn a shell from inside your GUI session but is not available when spawned from cron.

I don't know what that variable is off the top of my head, but a `printenv` in both environments should help you track it down. I'm guessing it's something related to the gconfd PID or a socket for gconfd or somesuch -- by default gconftool writes using gconfd, so it needs to be able to find your current gconfd instance to do anything to the running session.

The value is likely dynamic, but you can probably determine it programmatically, or throw it to disk from your GUI session at login.

	Zach

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2746 bytes
Desc: not available
Url : http://cialug.org/pipermail/cialug/attachments/20101021/0dbd8215/attachment-0001.bin 


More information about the Cialug mailing list