 |
 |
 |
 |
| Software Help on software problems. |

2005-11-02, 12:06 PM CST
|
|
Registered User
|
|
Join Date: Jun 2005
Posts: 2

|
|
|
gconftool-2 won't swap wallpaper from cron
I posted this on a Gnome forum, but got no response so I'm trying here....
I am trying to make a script that downloads a picture (my daughter's baby pictures, actually) at random from a web site and sets it as my gnome desktop background. I've seen multiple people suggest
Code:
gconftool-2 --type=string --set /desktop/gnome/background/picture_filename $FILENAME
to change the wallpaper, so I made a nice little script that downloads the wallpaper and does that. Works great from the command line, but fails from cron.
After poking around a little bit, I discovered that `gconftool-2 --ping` returns 2 ("gconfd not running") when run from cron -- so it seems clear that that's the issue: the script either doesn't know how to or isn't allowed to access the desktop-session gconfd.
How does one get around this?
Perhaps it's an environment-specific thing, so I should mention that I'm using Gnome 2.8 on Fedora Core 3.
Thank you very much!
|

2009-06-22, 09:00 PM CDT
|
 |
Registered User
|
|
Join Date: Jun 2005
Posts: 133

|
|
Your use of the command is just a bit off.
Try this:
Quote:
|
gconftool-2 --type string --set /desktop/gnome/background/picture_filename $FILENAME
|
__________________
Len Umina
El Dorado Hills, CA
WT6G
Last edited by wt6g; 2009-06-22 at 09:02 PM CDT.
Reason: update
|

2009-11-03, 01:30 PM CST
|
 |
Registered User
|
|
Join Date: Dec 2007
Location: bergamo. it
Age: 50
Posts: 9

|
|
|
Nemmeno io ci riesco , ma provo a condividere le prove che ho fatto, nel caso ti suggeriscano qualcosa.
Sembra che i valori impostati da gconftool vengano memorizzati in un area diversa se lanciati da crontab
se provi ad interrogare la variabile picture_filename da crontab ottieni un dverso valore da quello ritornato dallo stesso comando eseguito da terminale.
Io per la prova ho usato questo comando:
msg=$( gconftool-2 --get /desktop/gnome/background/picture_filename ); logger -t XXX "FILE: $msg "
Sul motivo non so' pero' risponderti, pero' se scarico tutto l' archivio
( comando gconftool-2 --recursive-list / > /tmp/pluto )
da crontab mi legge un' area system , mentre da terminale legge un' area apps.
|

2009-11-03, 02:36 PM CST
|
|
Registered User
|
|
Join Date: Oct 2006
Posts: 3,948

|
|
|
Interesting, so you dug up a four year old thread, my Italian is not great but if I understood correctly, just to tell him that you're not sure why it happens but can confirm that it does?
lmfao!
|

2009-11-03, 03:03 PM CST
|
 |
Registered User
|
|
Join Date: Dec 2007
Location: bergamo. it
Age: 50
Posts: 9

|
|
credo di aver trovato il bandolo della matassa.
I processi lanciati da crontab non sannno comunicare con il server dbus
per consentirglielo occorre passargli la variabile DBUS_SESSION_BUS_ADDRESS
che e' qualcosa del genere
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-lfwRnjPyq7,guid=e5bed3dbae44d22d16f754924af07116
per farlo da programma, ho incluso una funzione in uno script bash che poi ho eseguito
Code:
# ======================================================
function export_variables
{
user=$( whoami )
pid=$( pgrep -u $user gnome-panel )
for dbusenv in $pid; do
DBUS_SESSION_BUS_ADDRESS=$( grep -z DBUS_SESSION_BUS_ADDRESS /proc/$pid/environ | sed -e 's/DBUS_SESSION_BUS_ADDRESS=//' )
data="DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS"
eval " export $data"
done
}
# ======================================================
export_variables
# ======================================================
|

2009-11-03, 03:30 PM CST
|
 |
Registered User
|
|
Join Date: Dec 2007
Location: bergamo. it
Age: 50
Posts: 9

|
|
Quote:
Originally Posted by Dies
Interesting, so you dug up a four year old thread, my Italian is not great but if I understood correctly, just to tell him that you're not sure why it happens but can confirm that it does?
lmfao!
|
Hi Dies, as you see, there is someone who is ready to read also an old thread.
I'm sorry for the italian, but I go over another thread on ububtu italian forum, and I just copy and paste here the same think I writed there.
|

2009-11-04, 06:08 PM CST
|
 |
Community Manager -- Banned by popular request.
|
|
Join Date: Sep 2007
Location: NYC
Posts: 7,577

|
|
|
Ermm, post before the Italian post was from this year. Maybe you meant 4 months? Yes, the post before that was 4 years old, but whatever.
@earlati, this is an English language forum, which of course, can be difficult for non-English speakers. However, do your best, and you'll find that most people are very understanding of language difficulties.
@wt6g, yeah, a lot of us have accidentally posted to old threads. I wouldn't worry about it.
__________________
--
http://home.roadrunner.com/~computertaijutsu
Do NOT PM CM's (or any other forum member) with requests for technical support. Ask your questions on the forum.
"I don't know why there is the constant push to break any semblance of compatibility" --anon
|

2009-11-04, 11:20 PM CST
|
|
Registered User
|
|
Join Date: Oct 2006
Posts: 3,948

|
|
Quote:
Originally Posted by scottro
Ermm, post before the Italian post was from this year. Maybe you meant 4 months? Yes, the post before that was 4 years old, but whatever.
|
No, that post doesn't even count in my mind because it doesn't provide a solution or address the real issue.
And I meant nothing but my post.
It was just hilarious to me that someone would post to such an old thread in a language most won't understand just to confirm the issue.
Sorry. What can I say... I am happy the solution was posted though, anyone can understand that.
|

2009-11-05, 01:15 PM CST
|
 |
Registered User
|
|
Join Date: Dec 2007
Location: bergamo. it
Age: 50
Posts: 9

|
|
|
Hi guys.
It was an old post, true, but it wasn't a close post ,, and also this was true.
What's wrong in reusing an old , unsolved post ?
About the Italian language I already express my sorry in my last post. I just followed the same issue on another thread on Italian site , and I simple forgot this thread was an english one when I copy and pasted here..
To hilarious man I want just saying that searching a solution should also be a team job, a job in which everybody share what he know in the hope that this can help other to guess the solution.
Bye
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Automatic Translations (Powered by  ):
All times are GMT -7. The time now is 08:37 AM CST.
|
|
 |
 |
 |
 |
|
|