Blog Forum Wiki Links Contact Us NetbookUser
RunCore Pro IV SSD Transforms your ASUS EEE PC by increasing 
performance 5-40X. Your satistfaction guaranteed RunCore Pro 70mm SATA Mini PCI-e SSD
RunCore Pro IV 70mm SATA II Mini PCI-e SSD
RunCore Pro IV 2.5 Inch SATA II SSD

You are not logged in.

#1 2008-10-19 11:02:06 am

albkwan
ExtrEmE User
From: Hong Kong
Registered: 2007-11-04
Posts: 1422
Website

HOWTO: Random wallpaper for Easy Mode

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

http://wiki.eeeuser.com/_media/howto:howto:wallpapers.gif

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:

Code:

#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:

Code:

/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.

Code:

#!/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!!!'
fi

If 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! smile

albkwan

Last edited by albkwan (2008-10-28 11:35:20 am)


EeePC 4G white,
Default Xandros (Easy Mode + icewm start menu) on 1st SSD/2nd 16GB SSD added/SD/USB/
http://eeepc.fire.prohosting.com/
http://eeepc-albkwan.blogspot.com/

Offline

 

#2 2009-09-27 7:11:28 pm

helenawahlberg16
Member
Registered: 2009-05-22
Posts: 26

Re: HOWTO: Random wallpaper for Easy Mode

i'm sorry but i don't quite understand this. is there some even simpler way for you to explain this to me. wink


It's Not The Way You Look That Brings Me To My Knees, It's The Way You Look At Me

Offline

 

#3 2009-09-28 1:25:23 am

SUNNYNARULA18
Senior Member
Registered: 2008-10-04
Posts: 210
Website

Re: HOWTO: Random wallpaper for Easy Mode

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)


eeepc 701 :default xandros easy mode
-----------------------------------
ATM-the theme manager for my eeepc-get bouncy icons on easy mode

Offline

 

Board footer

Powered by PunBB 1.2.15
© Copyright 2002–2005 Rickard Andersson