FedoraForum.org - Fedora Support Forums and Community
Results 1 to 9 of 9
  1. #1
    Join Date
    Jun 2005
    Location
    Somerville, MA
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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!
    Matthew Miller, Fedora Project Leader

  2. #2
    Join Date
    Jun 2005
    Posts
    179
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your use of the command is just a bit off.

    Try this:

    gconftool-2 --type string --set /desktop/gnome/background/picture_filename $FILENAME
    Last edited by wt6g; 23rd June 2009 at 04:02 AM. Reason: update
    Len Umina
    El Dorado Hills, CA
    WT6G

  3. #3
    Join Date
    Dec 2007
    Location
    bergamo. it
    Age
    67
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  4. #4
    Join Date
    Oct 2006
    Posts
    4,757
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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!

  5. #5
    Join Date
    Dec 2007
    Location
    bergamo. it
    Age
    67
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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
    # ======================================================

  6. #6
    Join Date
    Dec 2007
    Location
    bergamo. it
    Age
    67
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  7. #7
    scottro's Avatar
    scottro is offline Retired Community Manager -- Banned from Texas by popular demand.
    Join Date
    Sep 2007
    Location
    NYC
    Posts
    8,120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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://srobb.net

  8. #8
    Join Date
    Oct 2006
    Posts
    4,757
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  9. #9
    Join Date
    Dec 2007
    Location
    bergamo. it
    Age
    67
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

Similar Threads

  1. gconftool-2 with FC10 problems
    By den23513 in forum Using Fedora
    Replies: 1
    Last Post: 10th December 2008, 05:42 PM
  2. gconftool-2
    By glennzo in forum Using Fedora
    Replies: 2
    Last Post: 7th December 2008, 04:24 PM
  3. /etc/cron.daily/000-delay.cron
    By kwhiskers in forum Using Fedora
    Replies: 0
    Last Post: 27th January 2007, 08:53 PM
  4. gconftool-2
    By jim in forum Using Fedora
    Replies: 2
    Last Post: 20th March 2006, 03:27 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •