You are not logged in.
After googling in this forum and scratching my heads for 2 days, I have managed to generate random wallpapers for my 4G. The method I am using is mainly based on the information from http://asuseeehacks.blogspot.com/2007/1 … paper.html and the script is adapted from http://moto.debian.org.tw/viewtopic.php?t=2508
Some Background Info
There are 4 default themes (home, student, business and accessibility) in the EeePC and each theme has its own wallpapers in the folder /opt/xandros/share/AsusLauncher/ for each TAB (internet, work, learn, play and settings) named [THEME]_[TAB]_wallpaper.jpg, e.g. home_internet_wallpaper.jpg. Replacing these pics with a file of your choice will give you a custom wallpaper.
My Approach
To make life easy, I just use 1 wallpaper (/usr/share/icewm/themes/wallpaper.jpg) to replace them all. Next, I create a script which is auto-run at system startup. What this script does is to copy wallpapers from a folder I specify to /tmp/wallpapers/, appending each filename with a random number, then overwrite the wallpaper file with these files each after a certain time delay.
Download Links for Wallpapers
- http://forum.eeeuser.com/viewtopic.php?id=6322
- http://[LINK TO INFRINGING SOFTWARE REMOVED]/torrent/3917489/Asus_Eee_Wallpaper
- http://[LINK TO INFRINGING SOFTWARE REMOVED]/torrent/3973134/Asus_Eee_Wallpapers_II
- http://rs380.rapidshare.com/files/86575 … papers.zip
- http://www.flickr.com/photos/30445092@N … 256701896/
Prepare Steps
1) To make this work, I need to symbolically link existing wallpapers files all to /usr/share/icewm/themes/wallpaper.jpg. Of course, back them up first.
Here are the commands to do it, just copy and paste them to a terminal:
#Define variable and create the 1 wallpaper file WallPaper="/usr/share/icewm/themes/wallpaper.jpg" sudo cp /opt/xandros/share/AsusLauncher/home_internet_wallpaper.jpg $WallPaper #backup original wallpapers cd /opt/xandros/share/AsusLauncher sudo mkdir orig_wallpapers sudo cp *wallpaper.jpg orig_wallpapers/ #symbolically link all wallpapers to $WallPaper sudo ln -sf $WallPaper accessibility_internet_wallpaper.jpg sudo ln -sf $WallPaper accessibility_work_wallpaper.jpg sudo ln -sf $WallPaper accessibility_learn_wallpaper.jpg sudo ln -sf $WallPaper accessibility_play_wallpaper.jpg sudo ln -sf $WallPaper accessibility_settings_wallpaper.jpg sudo ln -sf $WallPaper business_internet_wallpaper.jpg sudo ln -sf $WallPaper business_work_wallpaper.jpg sudo ln -sf $WallPaper business_learn_wallpaper.jpg sudo ln -sf $WallPaper business_play_wallpaper.jpg sudo ln -sf $WallPaper business_settings_wallpaper.jpg sudo ln -sf $WallPaper home_internet_wallpaper.jpg sudo ln -sf $WallPaper home_work_wallpaper.jpg sudo ln -sf $WallPaper home_learn_wallpaper.jpg sudo ln -sf $WallPaper home_play_wallpaper.jpg sudo ln -sf $WallPaper home_settings_wallpaper.jpg sudo ln -sf $WallPaper student_internet_wallpaper.jpg sudo ln -sf $WallPaper student_work_wallpaper.jpg sudo ln -sf $WallPaper student_learn_wallpaper.jpg sudo ln -sf $WallPaper student_play_wallpaper.jpg sudo ln -sf $WallPaper student_settings_wallpaper.jpg
2) Download wallpapers of your choice and put them in a folder in HOME. Since I found that some wallpapers may not match the theme you are using, it is better to separate your wallpapers into different folders according to theme colors. Likewise, the folder I use is /home/user/wallpapers/AsusSunset.
3) Copy and paste My Script below with the default text editor, Save As randomwallp.sh in /home/user/bin/. Give it exec permission by right click on it > Properties > Permissions > check all Exec boxes.
4) Following instructions in wiki: Running a script at startup, modify /usr/bin/startsimple.sh and create the ~/.icewm/startup file. Then add this line to the file:
/home/user/bin/randomwallp.sh &
5) Before you reboot, check carefully all the steps are properly done. If the wallpaper file is not found, after you reboot, you will only get a black background (without any icons).
My Script
- You can change the variable SleepTime to specify the time between switching wallpapers (in seconds).
- Also, you can change the path where you store your downloaded wallpapers in the variable WallPaperPath.
- This script is currently only for *.jpg. If you need support for other image formats, duplicate the section "#copy wallpapers to /tmp/wallpaper, randomize filenames", change *.jpg to say *.png. Then it will also check for *.png picture files.
#!/bin/sh
SleepTime=300
sleep 30
sudo mkdir /tmp/wallpapers
WallPaper="/usr/share/icewm/themes/wallpaper.jpg"
WallPaperPath="/home/user/wallpapers/AsusSunset"
ImageType="*.png *.jpg *.gif *.bmp *.tif"
if [ $DISPLAY ]; then
while [ /bin/true ]; do
sudo rm /tmp/wallpapers/*
cd $WallPaperPath
#copy wallpapers to /tmp/wallpaper, randomize filenames
i=
for i in *.jpg ; do
if [ -f "$i" ]; then
sudo cp $WallPaperPath/"$i" /tmp/wallpapers/
random=$RANDOM
sudo mv /tmp/wallpapers/"$i" /tmp/wallpapers/"$random"_"$i"
fi
done
#run random wallpapers
cd /tmp/wallpapers
Count=`find -name "*" -type f -print | wc -l`
if [ $Count -eq 0 ]; then
echo "Sorry, Can NOT Find Any Image!!!"
break
fi
WallPapers=
for WallPapers in $ImageType ; do
if [ -f "$WallPapers" ]; then
sudo cp $WallPapers $WallPaper
killall -s 10 AsusLauncher
sleep $SleepTime
fi
done
done
else
echo 'Sorry, Can NOT Open $DISPLAY!!!'
fiIf you like, you can further modify the script to set up different wallpapers for different themes, and even for different TABs. The principle is the same. But for the purpose of this Howto, I don't want to make it too complicated.
Enjoy! ![]()
albkwan
Last edited by albkwan (2008-10-28 11:35:20 am)
Offline
i'm sorry but i don't quite understand this. is there some even simpler way for you to explain this to me. ![]()
Offline
that is a random wallpaper script which when running changes the wallpaper after a specified interval of time from wallpapers in a specified folder
i am working on integrating the idea ( with slight modifications) with my theme manager called ATM...once done it will be simpler to get it done
Last edited by SUNNYNARULA18 (2009-09-28 1:26:09 am)
Offline