OESF Portables Forum

Everything Else => General Support and Discussion => Zaurus General Forums => Archived Forums => Software => Topic started by: joebeaudoin on February 11, 2004, 01:28:41 pm

Title: Random Wallpapers?
Post by: joebeaudoin on February 11, 2004, 01:28:41 pm
Hi,

I\'m new to the board -- recenly purchased a 5600 w/PSA255 processor from Amazon simply because the price was right for me -- and wanted to know if there was a program out there (somewhere) that randomized the backgrounds on the Zaurus, so that every 10 min or so the background would change into something different.  

On a similar note, is there a way that the background could stay in one position so that when I scroll, the wallpaper doesn\'t repeat itself or move?
Title: Random Wallpapers?
Post by: lardman on February 11, 2004, 01:38:20 pm
I think the answer is no for both of your questions.

The first one would be easy enough (the wallpaper is probably pointed to by some config file), but I think you have to restart Qtopia (or Opie) to get it to refresh the wallpaper. I may be wrong. Anyone?

and for the second one, I think this is built in to Qtopia/Opie (though for Opie it would be easy enough to change I imagine).

Sorry (but don\'t give up hope just yet, I may be wrong),


Si
Title: Random Wallpapers?
Post by: Anonymous on February 11, 2004, 02:36:19 pm
I was thinking that maybe a bash script running in the background would do so.  IIRC, I don\'t believe that Qtopia needs to be restarted just for the wallpaper.  

I just need to find out what CLI command executes the change in the background.

I\'ll hunt around for the config file, though if anyone has any clue on where that is (I assume it\'s somewhere under the /home or /home/zaurus dir) then I\'d appreciate it.
Title: Random Wallpapers?
Post by: slocaus on February 11, 2004, 03:35:27 pm
NewStyleZ is the closest app for the Sharp ROM. https://www.oesf.org/commu...&release_id=189 (https://www.oesf.org/community/66.180.235.230/project/showfiles38b8.html?group_id=29&release_id=189)
I use it with the tckROM, it modifies a few files, most are in /home/zaurus/Settings/qpe.conf or /home/QtPalmtop/etc/  (It\'s been too long, hard to remember.)

I don\'t think a CLI command will do, you have to edit a .conf file, unless you write a bash script to do it.
Title: Random Wallpapers?
Post by: lardman on February 11, 2004, 04:57:48 pm
@slocaus:

Yes, I agree you\'ll need to edit the conf file, but then to make Qtopia/Opie update the background I assume that a CLI command (?) - I assume that\'s one of the commands Qtopia uses to do random things such as setting icons, etc. - is needed to inform it that the conf file has been changed and that it ought to be re-read and therefore the background updated, etc.

An easy way to check is to take a look at the source for the Opie Launcher applet (which allows you change the backgrounds) and see what it does.


Si
Title: Random Wallpapers?
Post by: slocaus on February 11, 2004, 05:29:23 pm
@ lardman,
std. disclaimer: I\'m not a programmer.    When I make a switch of wallpaper, style, splashscreen, or screensaver with NewStyleZ, first there is an Apply button that I presume writes the config file(s), then with OK, it exits and there is, a restart like after a program install when you exit the graphical installer, (not a full restart of Qtopia that you can do from ShutDown menu).  

Again a script that changes the conf file and does the qpe restart would work, but from what I can see at this point, it would be annoying, to say the least.  I just use NewStyleZ to change wallpapers/styles as my mood changes;  might be once every 2 weeks, might be 2 times a day or more if I find a cool image for a wallpaper to try.
Title: Random Wallpapers?
Post by: V-Man on February 11, 2004, 11:14:40 pm
I also found the scrolling wallpaper annoying.  I could find no work-around though.  What I did originally was to tile a wallpaper so it did not appear to have a definite start and end.  I then found a wonderful pic (see the zthemes site for several examples of my wife\'s graphic abilities) and several of my wifes drawings that I wanted to use.  I just began creating more and more tabs until I had arranged all the tabs so that they all only had 12 or less icons.  This way there is no scrolling of the wall papers.  

V-Man

PS check out the perfection wallpaper on the above site.  I didn\'t draw it, but it is the most common wallpaper for me to have on my Z.
Title: Random Wallpapers?
Post by: Tehas on February 11, 2004, 11:31:01 pm
I did a bash script to randomize the screensaver image.  It too is controlled by an entry in a conf file but what I did was to have the conf file point to a specific file name.  The file name listed is actually a link to a \"real\" file.  My shebang randomly picks one of the screensaver files that I have in a specific directory and relinks to the newly chosen one.  If you want more, I can post the contents of the script.
Title: Random Wallpapers?
Post by: bluedevils on February 12, 2004, 10:25:06 am
ahhh....for want of a working screensaver.
Title: Random Wallpapers?
Post by: joebeaudoin on February 12, 2004, 12:34:03 pm
Quote
I did a bash script to randomize the screensaver image.  It too is controlled by an entry in a conf file but what I did was to have the conf file point to a specific file name.  The file name listed is actually a link to a \"real\" file.  My shebang randomly picks one of the screensaver files that I have in a specific directory and relinks to the newly chosen one.  If you want more, I can post the contents of the script.

Yes, please do.  

It beats looking at the same wall everytime I cycle through the launcher. :-)
Title: Random Wallpapers?
Post by: slocaus on February 12, 2004, 02:07:27 pm
Quote
ahhh....for want of a working screensaver.
The one in tkcROM on my 5500 never comes on when I want, and does when I don\'t want....  I disabled it in /home/zaurus/Settings/qpe.conf with {Screensaver} Interval = 0
Title: Random Wallpapers?
Post by: bluedevils on February 12, 2004, 02:34:26 pm
I disabled it in the same way because the screensaver is a blank white screen......
Title: Random Wallpapers?
Post by: Tehas on February 13, 2004, 10:23:04 pm
This is for screensaver images not the background images.  And, this isn\'t as clean as I remembered it being...

Code: [Select]
#!/bin/bash                                                                  

                                                                              

# $RANDOM returns a diff random int                                          

# 0 - 32767                                                                  

                                                                              

sudo rm /home/QtPalmtop/pics/screensaver/temp.png                            

RANGE=`ls -l /home/QtPalmtop/pics/screensaver/ | grep -c png`                

echo $RANGE                                                                  

                                                                              

number=$RANDOM                                                                

let "number %= $RANGE"                                                        

cd /home/QtPalmtop/pics/screensaver/                                          

if [ $number -eq 0 ]                                                          

   then let "number = 1"                                                      

fi                                                                            

                                                                              

sudo ln $number".png" temp.png                                                

echo $number                                                                  

sudo opie-sh -m -I -t "Image Toggled" -M "The screensaver image changed!" -g  

                                                                              

exit 0                                                                        


I have my config file setup so that it says that the file for screensavers is /home/QtPalmtop/pics/screensaver/temp.png

I have my collection of ScreenSaver  png files stored in a directory on my SD card.

In the directory \"/home/QtPalmtop/pics/screensaver/\", I have sequentially numbered links to the png files on my SD card\'s directory.  Example 1.png  -] /mnt/card/pics/screensaver/linuxinside.png
  2.png -] /mnt/card/pics/screensaver/cooltux.png

So the script removes the temp.png file and then counts the number of png files in the QtPalmtop directory.  Then it pics a number at random and creates a link between temp.png and the (random#).png file.

The lines referencing \"sudo\" are using the package of that name.  It allows you to run a command that would otherwise require root.

The commands with opie-sh are using that package to display dialog boxes.

So, like I said at the beginning, not as pretty as I had remembered but it works.  I had played around with this stuff when I first got my Zaurus but now I use newstylez and just pick the image that I want.
Title: Random Wallpapers?
Post by: Tehas on February 13, 2004, 10:34:30 pm
Quote
I disabled it in the same way because the screensaver is a blank white screen......

If I remember correctly, there seemed to be a restriction on the image size (100x100?) and file type .png for the screen saver images.   There was a hot discussion thread on dev/net about a year ago when the ROM first supported screensavers.   \"stmpynode\" created lots of images and posted them for people to use.  Check out http://www.zaurusthemes.com/?type=Screensaver_Images (http://www.zaurusthemes.com/?type=Screensaver_Images).  Check to see if one of these work for you.
Title: Random Wallpapers?
Post by: joebeaudoin on February 13, 2004, 11:23:44 pm
Thanks Tehas, I\'ll modify it to see if it works and I\'ll probably share the code with others once I\'ve got it to work the way I want.