![]() |
a script to change wallpaper
Hi
I came to know about 'crontab' command which allows you to schedule task at regular interval. Then I found out 'gconftool-2' command to change desktop wallpaper in GNOME. let us say I have my desired 100 wallpapers numbered 1.jpg to 100.jpg. Now I want that script should increment location at every execution by cron daemon. That is script's main command will be gconftool-2 -t str -g /desktop/gnome/background/picture_filename <file> Is it possible ? wouldn't that be great that wallpaper changes after every 5 minutes ? |
Yup it's possible. Even I wrote a friend of mine a script to automatically download and set wallpaper everyday using curl and put it in cron.daily.
Regards |
Can you tell how ?
I did not find it on http://pdg86.wordpress.com/ |
Well, first you need to design the way you want to go about.
My proposal: Quote:
There is an option to create config file that will used several folders holding background files, desired way to select next file and maybe few other options. |
Wallpaper Tray? Here are notes of installing version 0.4.6 on ubuntu 8.04
Code:
1.apt-get install wallpaper-tray |
I also did create a bash script to change background every certain period. But the problem with it is that everytime the background changes, the CPU usage will increase sometimes 100% for a short while. So if the background changed while playing a game such as alien-arena, there's a slight performance down.
|
CentOS and Fedora do not have packages for anything similar. Truth to be told, Gnome is designed for small memory and CPU requirements. I used default wallpaper for CentOS for 3 years since my desktop is covered with applications 90% of the time.
|
Quote:
|
My plan is that I will keep all my wallpapers in ~/wp numbered from 1 to 100.
After every 5 minutes script will run. My aim is to represent file by %d.jpg so that it can be incremented at every run & variable type should be static. After file variable becomes 100 we will rename it to 1 using 'if'. how can i accomplish that ? |
Any particular reason you don't want to use Wallpaper Tray to do the job?
|
to catkin
I appreciate your detailed response.i will tag your post as 'software to change wall paper periodically' so that those who prefer software can find it easily. But I like to use command & am also learning bash scripting. |
Huwm, I think I should be generous to share my script since I create it thanks to this thread :)
So here you go: Code:
#!/bin/bash |
to isolatedsh33p
In your case the script is running in background all the time ( when wallpaper is not being changed then it is sleeping ) while what I propose is that crontab will execute script to change wallpaper at regular intervals while in between two intervals script is not present in memory . I think i think that if variable's value is stored in file then its value will be static. i mean Suppose ~/int.txt initially contains 0 In our script variable i takes its value from file int.txt & sets the wallpaper to ~/wp/0.jpg Now increment i. (i+1) >~/int.txt --note we are not appending value of i but overwriting int.txt file with next value. In beginnning of script there will be condition if(i>=99) i=0; so we can have 99 wallpapers. What do you say ? I don't know much scripting so please help ? |
Quote:
|
there was a early tinycore iso made by Master Okajima..
the background color changes at every boot, a function of his initrd or kernel? I never took it apart but I thought it was neat that the background color would change at every boot on a read-only fs oh I got it at my site:) TC_OKAJIMA_20090514.ISO (11MB) http://multidistro.com/downloads/por...A_20090514.ISO heres a usb version I made from updated tinycore iso and has extra apps too 73MB http://multidistro.com/downloads/off...0090514.tar.gz Quote:
play it on qemu,etc or put it on usb or hd and at each boot the color is different:) |
| All times are GMT -5. The time now is 11:09 PM. |