Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing The Background 3

Status
Not open for further replies.

iaresean

Programmer
Mar 24, 2003
570
ZA
Hey there all you unix gurus!

I have quite a tough little question that needs answering. Answers will be rewarded.

I have a nice collection of calvin and hobbes comics on my box, enough to display one a day for the year. At the moment I am trying to write a script that will be executed via cron.daily (I think) that will change my desktop background to the next calvin and hobbes picture.

How would I do this?

My pics have the following naming convention:
ch0001.gif ch0002.gif ch0003.gif ...... ch0365.gif

Any ideas are greatly appreciated, even negative ones. If it can't be done please let me know.

Thanks a bunch.
Sean.
 
I am using the gnome environment in Red Hat Linux 9 .


Sean.
psa.gif
 
Sean, the big "problem" with gnome/bluecurve is: I don't know how to switch of that gnome takes care of the background :)

xv/xview works: you can try out by logging in to a "failsafe session" (select this at the login terminal); you will just get a single shell -> run "xview -onroot /some/of/your/favorite.gif"

Where are you from in Southafrica?

Regards
-- Franz
Sorry I'm not a native spaeker, I'm from Munich, Germany - "Home of the Whopper", oh no, "Home of the Oktoberfest" ;-)
Solaris System Manager; I used to work for Sun Microsystems Support (EMEA) for 5 years
 
daFranze;

xview seems to work very well, but only in the failsafe mode. I require something that will allow a background change while still in the gnome environment. I do appreciate all the thought you have given this though, and all your effort and help you have given me.

I feel so close to the answer, yet so far.

Oh yeah; I am from the beautiful city of Cape Town daFranze.


Sean.
psa.gif
 
@sean

with a little help from my friends

I think the gnome forum is the best place to get a realy good answer... :)

Cape Town: I have never been there but my Dad was there two times (2 SA Trips over 20 Years ago) and my Sister was there 4-5 Years ago; what tey told me: it's a realy great place. I planned to go there as an exchange student but then I met my fiance - today she's my wife... ;-)

Regards
-- Franz
Sorry I'm not a native spaeker, I'm from Munich, Germany - "Home of the Whopper", oh no, "Home of the Oktoberfest" ;-)
Solaris System Manager; I used to work for Sun Microsystems Support (EMEA) for 5 years
 
Thanks alot daFranze, I think this might be it.
I appreciate all your help.


Sean.
psa.gif
 
in Germany we say "mit fremden Federn schmücken" (I don't know the English phrasing, but translated word by word it says "wearing someoneelses feathers"); thank you for the star but nanobrain deserves it... :)

Regards
-- Franz
Sorry I'm not a native spaeker, I'm from Munich, Germany - "Home of the Whopper", oh no, "Home of the Oktoberfest" ;-)
Solaris System Manager; I used to work for Sun Microsystems Support (EMEA) for 5 years
 
In South Africa we say; "Enkosi Kakhule!".
Which in german means: "Danke vielmals!".

;-)


Sean.
psa.gif
 
is this Zulu or Afrikaans?

Bitteschön! :)

Regards
-- Franz
Sorry I'm not a native spaeker, I'm from Munich, Germany - "Home of the Whopper", oh no, "Home of the Oktoberfest" ;-)
Solaris System Manager; I used to work for Sun Microsystems Support (EMEA) for 5 years
 
Great guys!!!

A copy/paste of the solution:
*****************
Not a silly question It can definitely be done by a number of ways: there are programs that change the background in gnome periodically e.g. bgbuddy (though the site seems to be down at the moment) or wp_tray.

You can also do it by hand via cron by calling a script that contains
Code:
gconftool-2 -s /desktop/gnome/background/picture_filename "" -t string
gconftool-2 -s /desktop/gnome/background/picture_filename "/path/filename" -t string
**************
source:
 
I have been trying this in cron job that gets performed every minute, but I have had no success.

I tried to get back to the author of the 'solution' but I am still awaiting a response. I am not sure if I typed it out correctly. My files are named ch0001.gif ch0002.gif ... ch0365.gif

Anyone think this would work:
gconftool-2 -s /root/temp/chpics/ch0`date +%j`.gif "/root/background/background" -t string

Isn't this supposed to change the background every minute? Or have I misinterpreted nanobrain's solution?

Enkosi Kakhule - That's Xhosa - @daFranze


Sean.
psa.gif
 
did you try it by hand?
Is the cron running as root or your user? I think you should cron it by your user (I'm guessing).
 
I am running as root. I made a folder called /root/background/
Then I placed an image and renamed it to background in that folder.
Then I set my background to /root/background/background by dragging and dropping it in the display util.

Then I tried this command:
gconftool-2 -s /root/temp/larson/larson0035 "/root/background/background" -t string

But nothing happened?

I first want to get it working on my root user before I expand it to any other users.

All help appreciated.


Sean.
psa.gif
 
Could somebody please test the solution from above on their box and tell me if they were successful or not.

Enkosi kahule!


Sean.
psa.gif
 
I can try this at home (Terminator says: "I'll be back")
I have the same configuration (RH9, Gnome or Bluecurve)

Regards
-- Franz
Sorry I'm not a native spaeker, I'm from Munich, Germany - "Home of the Whopper", oh no, "Home of the Oktoberfest" ;-)
Solaris System Manager; I used to work for Sun Microsystems Support (EMEA) for 5 years
 
sorry i was late at home yesterday, i plan to try out this evening...

Regards
-- Franz
Sorry I'm not a native spaeker, I'm from Munich, Germany - "Home of the Whopper", oh no, "Home of the Oktoberfest" ;-)
Solaris System Manager; I used to work for Sun Microsystems Support (EMEA) for 5 years
 
I'll be eagerly awaiting your answer.
Till tomorrow. ;-)

Sean.
psa.gif
 
@sean

this works fine but perform the following steps:

run "/usr/bin/gnome-background-properties" press on the "selected picture" to open a filebrowser; select one of the calvin pictures and press "scaled" to have it fullscreen;

now run
gconftool-2 -s /desktop/gnome/background/picture_filename /this/is/where/all/my/calvin/and/hobbes/pics/are/ch0134.gif -t string

and you will have another background

(my system: RedHat 9.0 and Bluecurve Window Manager)

Regards
-- Franz
Sorry I'm not a native spaeker, I'm from Munich, Germany - "Home of the Whopper", oh no, "Home of the Oktoberfest" ;-)
Solaris System Manager; I used to work for Sun Microsystems Support (EMEA) for 5 years
 
I'm having some problems getting chbg to work with gnome. Could someone please post a step-by-step or just save their config file from chbg and post it here? (It's in an ascii format so you can paste the contents right in)

Thanx

 
please read my post, just above your's...
It IS the step by step cookbook!?

Regards
-- Franz
Sorry I'm not a native spaeker, I'm from Munich, Germany - "Home of the Whopper", oh no, "Home of the Oktoberfest" ;-)
Solaris System Manager; I used to work for Sun Microsystems Support (EMEA) for 5 years
 
Thats all fine and good, but what about chbg? I want to use chbg for the random gradients, and i don't want to save them to disk. Also, i cant get chbg to run in command-line mode (the -once option seems to have no effect).

(note: I am running metacity wm not bluecurve if that makes any difference)

Thanx anyway


-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

echo `fortune fortunes`$'\b in bed.'
Your lover will never wish to leave you in bed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top