The time now is Tue 18 Jun 2013, 21:39
All times are UTC - 4 |
|
Page 1 of 6 Posts_count |
Goto page: 1, 2, 3, 4, 5, 6 Next |
| Author |
Message |
rmcellig
Joined: 19 Nov 2011 Posts: 735 Location: Ottawa Ontario Canada
|
Posted: Mon 23 Apr 2012, 19:25 Post_subject:
Easy to use random wallpaper changer |
|
So far this is all I found. Is there anything else that is very easy to use and setup for Puppy Linux? I have a friend of mine who is thinking of changing from Windows XP to Puppy Linux and she asked me if there was an easy wallpaper changer that she could use.
http://www.murga-linux.com/puppy/viewtopic.php?t=37561
|
|
Back to top
|
|
 |
SFR

Joined: 26 Oct 2011 Posts: 573
|
Posted: Tue 24 Apr 2012, 18:11 Post_subject:
|
|
Could be something like this?
It's just a "one minute work", but so far it works quite well.
| Code: | #!/bin/bash
# Randomly changes the wallpaper at fixed time intervals
INTERVAL=10 # in seconds
while true; do
sleep $INTERVAL
WALLPAPER=`ls /usr/share/backgrounds | sort -R | head -1`
set_bg "/usr/share/backgrounds/$WALLPAPER"
done |
Adjust the time interval to your needs, save the script as "randomwallpaper" to /root/Startup and make it executable.
Now click on it.
To stop the script, open terminal and type:
| Code: | | killall randomwallpaper |
Hopefully, should work on Puppies with Nathan Wallpaper Setter (mine is Lupu-528.005).
Hope this helps.
Greetings!
_________________ [O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
|
|
Back to top
|
|
 |
rmcellig
Joined: 19 Nov 2011 Posts: 735 Location: Ottawa Ontario Canada
|
Posted: Tue 24 Apr 2012, 18:20 Post_subject:
|
|
Thanks! Is there anything I need to do when I create a script? I have never created a script before but this looks pretty straightforward.
|
|
Back to top
|
|
 |
SFR

Joined: 26 Oct 2011 Posts: 573
|
Posted: Tue 24 Apr 2012, 18:29 Post_subject:
|
|
| rmcellig wrote: | | Thanks! Is there anything I need to do when I create a script? I have never created a script before but this looks pretty straightforward. |
Just copy the code into Geany, save it as randomwallpaper to /root/Startup, and then:
right-click -> File 'randomwallpaper' -> Properties and check all boxes under "Exec".
The script will start automatically at every boot.
Nothing more is required, I believe.
Greetings!
_________________ [O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
|
|
Back to top
|
|
 |
rmcellig
Joined: 19 Nov 2011 Posts: 735 Location: Ottawa Ontario Canada
|
Posted: Tue 24 Apr 2012, 21:41 Post_subject:
|
|
Thanks!
|
|
Back to top
|
|
 |
Lobster
Official Crustacean

Joined: 04 May 2005 Posts: 15109 Location: Paradox Realm
|
Posted: Tue 24 Apr 2012, 23:33 Post_subject:
|
|
Now part of Puppy Hacker School code
http://puppylinux.org/wikka/PuppySchoolProgramming
Puppy Linux
Solutions for penguins
_________________ Puppy WIKI
|
|
Back to top
|
|
 |
Jim1911
Joined: 19 May 2008 Posts: 2353 Location: Texas, USA
|
Posted: Sun 29 Apr 2012, 18:39 Post_subject:
|
|
Thank you SFR!
|
|
Back to top
|
|
 |
mikeslr

Joined: 16 Jun 2008 Posts: 580 Location: Union New Jersey USA
|
Posted: Thu 03 May 2012, 15:19 Post_subject:
Thanks SFR & 2 comments |
|
Thanks SFR,
Just the little nicety I was looking for.
Just 2 comments:
(1) You code uses the background folder. If someone doesn't want to use all, or any of the backgrounds located there, a folder (for example, backgrounds1) can be created and the desired Wallpaper.jpgs placed there. In such case, the relevant portion of your code would read:
WALLPAPER=`ls /usr/share/backgrounds1 | sort -R | head -1`
set_bg "/usr/share/backgrounds1/$WALLPAPER"
(2) More importantly, the desired jpgs should first be resized to your monitor's settings. Apparently, if they are larger than your monitor's max, they are "centered" with only their central portions appearing: i.e, edges not displayed. Perhaps this description is not technically correct. It's just how it appears to me.
But anyway, a great addition to Puppies.
Thanks again,
mikesLr
|
|
Back to top
|
|
 |
SFR

Joined: 26 Oct 2011 Posts: 573
|
Posted: Thu 03 May 2012, 18:33 Post_subject:
|
|
Thanks to all of you for appreciation.
@mikeslr:
1. Good thinking.
2. Good point, I have had stretched wallpaper already set, before running the script, so didn't notice the fact.
Anyway, it's fixed now, thanks.
For those who are having wbar installed and don't want to reload it manually, a small addition - automatic reload every time wallpaper changes.
| Code: | #!/bin/bash
# Randomly changes the wallpaper at fixed time intervals
INTERVAL=10 # in seconds
PIX_PATH=/usr/share/backgrounds # path to wallpapers folder
# Wallpaper always stretched
echo "Stretch" > /root/.config/wallpaper/backgroundmode
while true; do
sleep $INTERVAL
WALLPAPER=`ls "$PIX_PATH" | sort -R | head -1`
set_bg "$PIX_PATH/$WALLPAPER"
# Restart wbar, if already running
[ `pidof wbar` ] && killall wbar && wbar &
done |
Note: there's a problem when reloading/refreshing wbar-2.2.2 - if there's a window over it during refresh, some junk will be "stamped" on wbar.
But:
Some time ago I took wbar-2.2.2 from Saluki repo (due to nice icons) and replaced the main binaries with those from the latest wbar_2.3.0-1 and wbar-config_2.3.0-1 deb files (due to fixed 'bottom-right location' bug) and I just now realized that the above issue ("stamping") no longer exists (at least in Lupu)!
If anyone's interested, I've attached the .pet.
Works out-of-the-box in latest Lucid.
In other pups libImlib2 most likely should be installed.
Greetings!
| Description |
|

Download |
| Filename |
wbar-2.3.0-1_i386.pet |
| Filesize |
466.01 KB |
| Downloaded |
382 Time(s) |
_________________ [O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
|
|
Back to top
|
|
 |
SFR

Joined: 26 Oct 2011 Posts: 573
|
Posted: Sat 05 May 2012, 12:38 Post_subject:
Random Wallpaper Changer |
|
Ok, I knew it was going to end up like that; I just couldn't resist to "GtkDialog'ize" it.
I tried to make this app as "foolproof" as possible, and hope it will work well for others too.
Works in latest Lupu + briefly tested in Slacko and Wary.
UPDATE 2012-05-06: v1.1 - few bugfixes
UPDATE 2012-05-06: v1.2 - better handling of special characters in filenames
________________________
EDIT: The lastest version (RWC-1.6.5) is attached >>>HERE<<<.
Greetings!
| Description |
Random Wallpaper Changer v1.2
|

Download |
| Filename |
RWC-1.2.pet |
| Filesize |
2.51 KB |
| Downloaded |
397 Time(s) |
| Description |
|
| Filesize |
21.35 KB |
| Viewed |
1690 Time(s) |

|
_________________ [O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Edited_times_total
|
|
Back to top
|
|
 |
SFR

Joined: 26 Oct 2011 Posts: 573
|
Posted: Sun 06 May 2012, 07:58 Post_subject:
|
|
I have found a bug, which, in the long run, could result in decreasing free memory (due to growing /tmp/xerrs.log file),
especially when using RWC and Pwidgets together.
Fixed now. Attachment in the previous post has been updated.
Note: pictures with spaces in filenames won't be displayed.
Greetings!
_________________ [O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
|
|
Back to top
|
|
 |
Jim1911
Joined: 19 May 2008 Posts: 2353 Location: Texas, USA
|
Posted: Sun 06 May 2012, 08:54 Post_subject:
|
|
Thanks for the updates, however there is a minor problem running it on Slacko. Time is set for 1 minute, however, after a minute the wallpaper changes properly, followed by another change about 1 second later. So for some reason time alternates between minutes and seconds.
Changed time to 2 minutes, error was not present. Switched back to 1 minute, error did not repeat, so it's just one of those random occurrences.
|
|
Back to top
|
|
 |
SFR

Joined: 26 Oct 2011 Posts: 573
|
Posted: Sun 06 May 2012, 14:10 Post_subject:
|
|
Hey Jim, thanks for the feedback.
Has that problem occurred in v1.0?
I'm guessing that previous bug could cause such behaviour, but haven't encountered it when testing in Slacko...
Anyway, I'm glad it's fine now.
If there's anything else causing any problems, feel free to let me know.
Ok, spaces in filenames are allowed now, the attachment above has been updated, again.
Phew, such a tiny app, and so many things to take care of - hope it's the last fix.
Greetings!
_________________ [O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
|
|
Back to top
|
|
 |
Jim1911
Joined: 19 May 2008 Posts: 2353 Location: Texas, USA
|
Posted: Sun 06 May 2012, 14:26 Post_subject:
|
|
| SFR wrote: | Some time ago I took wbar-2.2.2 from Saluki repo (due to nice icons) and replaced the main binaries with those from the latest wbar_2.3.0-1 and wbar-config_2.3.0-1 deb files (due to fixed 'bottom-right location' bug) and I just now realized that the above issue ("stamping") no longer exists (at least in Lupu)!
If anyone's interested, I've attached the .pet.
Works out-of-the-box in latest Lucid.
In other pups libImlib2 most likely should be installed.
Greetings! | Thank you, it's working great in Slacko.
|
|
Back to top
|
|
 |
Jim1911
Joined: 19 May 2008 Posts: 2353 Location: Texas, USA
|
Posted: Sun 06 May 2012, 14:30 Post_subject:
|
|
| SFR wrote: | Hey Jim, thanks for the feedback.
Has that problem occurred in v1.0?
I'm guessing that previous bug could cause such behaviour, but haven't encountered it when testing in Slacko...
Anyway, I'm glad it's fine now.
If there's anything else causing any problems, feel free to let me know.
Ok, spaces in filenames are allowed now, the attachment above has been updated, again.
Phew, such a tiny app, and so many things to take care of - hope it's the last fix.
Greetings! | v. 1.1, I see that 1.2 is available now. It's hard to keep up with your updates.
|
|
Back to top
|
|
 |
|
|
Page 1 of 6 Posts_count |
Goto page: 1, 2, 3, 4, 5, 6 Next |
|
|
Rules_post_cannot Rules_reply_cannot Rules_edit_cannot Rules_delete_cannot Rules_vote_cannot You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|