Page 2 of 3

Re: which distribution with lxde

Posted: Sat Dec 24, 2011 8:22 pm
by mick823
I can't seem to find the article that gives instructions on how to create a script to rotate the wallpaper so I will try to give you instructions here.

Create a wallpaper.desktop file using leafpad with the following text. Modify the last line to match your user name ....../home/YOUR_USER_NAME/...........Save the file in the /home/YOUR_NAME/.config/autostart/ folder. If you don't have an autostart folder you will need to create it. This file calls the rotator.sh script to run at startup. ( See attachment Autostart.png for correct placement of wallpaper.desktop file)

wallpaper.desktop text below
========================================================
[Desktop Entry]
Encoding=UTF-8
Name= Wallpaper
Comment=Automatic Wallpaper Changer
Exec=sh -c "sleep 20s; /home/YOUR_USER_NAME/.wallpaper/rotator.sh"
=======================================================================

Next you will create a .wallpaper (note the dot) folder in your /home/ YOUR_USER_NAME/ directory. In this folder you will place the rotator.sh script and your wallpapers. Save the following text as rotator.sh and save it in the .wallpaper folder. Place your wallpapers in the same folder and rename them with a number (1.jpg, 2.jpg, 3.jpg, etc.) The sleep command below is in minutes. Modify it to what you want. The NUMBER=$[ ( $RANDOM % 5 ) + 1 ] line needs to be modified to match the number of wallpapers in your folder. The 5 right after the % sign is the number of wallpapers I use. If you have 10 wallpapers then change the count to 10. Example: NUMBER=$[ ( $RANDOM % 10 ) + 1 ] . Modify the next to last line for your /home/YOUR_USER_NAME/............(See attachment rotator.png for correct placement of files and wallpapers)

rotator.sh text below.
============================================

#!/bin/bash
#Script
n=10
while [ $n -le 10 ]
do
sleep 3m &&
NUMBER=$[ ( $RANDOM % 5 ) + 1 ]
pcmanfm --set-wallpaper=/home/YOUR_USER_NAME/.wallpaper/$NUMBER.jpg
done

=========================================================

You may need to make the rotator.sh script executable. Mouse over the file, right click, properties, permissions and tick "make the file executable."

Reboot or logout and log back in and you should be good to go with the wallpaper changing automatically after "x" minutes.

This is the only script that I could manage to get working of several posted here. It wasn't too difficult even for a novice like myself. Good Luck.

Re: which distribution with lxde

Posted: Sat Dec 24, 2011 11:20 pm
by M_Mynaardt
mick823 wrote:I can't seem to find the article that gives instructions on how to create a script to rotate the wallpaper so I will try to give you instructions here.

( snip, snip, snip … )

This is the only script that I could manage to get working of several posted here. It wasn't too difficult even for a novice like myself. Good Luck.
Right on!

That looks pretty straight forward.

Thanks for that!

Re: which distribution with lxde

Posted: Tue Jan 03, 2012 7:45 pm
by M_Mynaardt
mick823 wrote:I can't seem to find the article that gives instructions on how to create a script to rotate the wallpaper so I will try to give you instructions here.

... Snip, snip, snip ...

#!/bin/bash
#Script
n=10
while [ $n -le 10 ]
do
sleep 3m &&
NUMBER=$[ ( $RANDOM % 5 ) + 1 ]
pcmanfm --set-wallpaper=/home/YOUR_USER_NAME/.wallpaper/$NUMBER.jpg
done

... Snip, snip, snip ...

This is the only script that I could manage to get working of several posted here. It wasn't too difficult even for a novice like myself. Good Luck.
I tried doing this, but got an error message because of that "RANDOM" command thing. Is there anything special I need to do to make it work proper?

Re: which distribution with lxde

Posted: Fri Jan 06, 2012 6:02 pm
by mick823
I tried doing this, but got an error message because of that "RANDOM" command thing. Is there anything special I need to do to make it work proper?


Did you remember to make the rotator.sh file executable? (Right click on the rotator.sh file, properties, permissions and tick "make the file executable")

Here is the text again for a 5 wallpaper setup. Put exactly 5 wallpapers in the .wallpaper folder and rename them 1.jpg, 2.jpg, 3.jpg, 4.jpg and 5.jpg. Copy and save the text as rotator.sh in the .wallpaper folder. Make sure to make it executable. Pay close attention to the spacing if you modify the number of wallpapers in the "NUMBER=" line .............$RANDOM (space) % (space) 5 (space) right bracket......... Try it with 5 wallpapers and the script below to get it working and then modify the number of Wallpapers and the script to suit. If it works initially and then fails after modification you will know that you have a mistake in the text. Make sure to modify the "your-name" in the next to last line to match your user name.

#!/bin/bash
#Script
n=10
while [ $n -le 10 ]
do
sleep 3m &&
NUMBER=$[ ( $RANDOM % 5 ) + 1 ]
pcmanfm --set-wallpaper=/home/your-name/.wallpaper/$NUMBER.jpg
done

Re: which distribution with lxde

Posted: Sat Jan 07, 2012 5:47 am
by M_Mynaardt
mick823 wrote:I tried doing this, but got an error message because of that "RANDOM" command thing. Is there anything special I need to do to make it work proper?


Did you remember to make the rotator.sh file executable? (Right click on the rotator.sh file, properties, permissions and tick "make the file executable")

Here is the text again for a 5 wallpaper setup. Put exactly 5 wallpapers in the .wallpaper folder and rename them 1.jpg, 2.jpg, 3.jpg, 4.jpg and 5.jpg. Copy and save the text as rotator.sh in the .wallpaper folder. Make sure to make it executable. Pay close attention to the spacing if you modify the number of wallpapers in the "NUMBER=" line .............$RANDOM (space) % (space) 5 (space) right bracket......... Try it with 5 wallpapers and the script below to get it working and then modify the number of Wallpapers and the script to suit. If it works initially and then fails after modification you will know that you have a mistake in the text. Make sure to modify the "your-name" in the next to last line to match your user name.

#!/bin/bash
#Script
n=10
while [ $n -le 10 ]
do
sleep 3m &&
NUMBER=$[ ( $RANDOM % 5 ) + 1 ]
pcmanfm --set-wallpaper=/home/your-name/.wallpaper/$NUMBER.jpg
done
I missed the bit about making it executable. I'll have to give that a go. I'll try that in the next day or two and see how it goes (time to go to work now, though).

Thanks for that…

Re: which distribution with lxde

Posted: Thu Jan 12, 2012 9:15 am
by M_Mynaardt
mick823 wrote:
M_Mynaardt wrote:I tried doing this, but got an error message because of that "RANDOM" command thing. Is there anything special I need to do to make it work proper?
Did you remember to make the rotator.sh file executable? (Right click on the rotator.sh file, properties, permissions and tick "make the file executable")

(snip, snip, snip … )
Okay! Right! Got it working now.

First thing I did was make the script executable. Handy thing to know, that!

However, it wasn't quite working, at first. I was not paying attention to the fact I was cutting and pasting a script calling on JPEG files, when all my wallpapers are in PNG format (just because). It worked fine once I realized what my mistake was.
:roll:

I just made a slight adjustment to the script; having a wall paper swap ever five minutes seemed to be a bit much. So, I made it an executable that would just make one random swap. Like so:

Code: Select all

# !/bin/bash
# Script
NUMBER=$[ ( $RANDOM % 20 ) + 1 ]
pcmanfm --set-wallpaper=/home/userperson/.wallpapers/$NUMBER.png
I should think that 20 wallpapers is more than enough to keep me entertained!

I then made a desktop icon calling on that script, so I can just change a wallpaper any old time I feel like it, instead of it having whether I want it to or not.

Thanks for the information on the script, though. I never would have thought of something like this on my own!
:mrgreen:

Re: which distribution with lxde

Posted: Sun Jan 15, 2012 5:24 am
by seppalta
I have 4 laptops and 2 desktops, all with LXDE desktops, 3 Mint 11, 1 Mint 10, 1 pclinuxos and 1 Lubuntu 11.10. The pclinux does not really count because it is a left-over on a retired desktop. The competition is between Mint and Lubuntu. I favor Mint because it is more reliable, Wine seems to work better and, just generally, things work better out of the box. Lubuntu also suffers from some small changes probably inherited from big brother Ubuntu. Unfortunately those things will probably catch-up to Mint in the next release. My favorite laptop has a Mint 11 LXDE successfully running off a 32 GB flashdrive because I broke the connector between the main hard drive and motherboard. It runs an extra monitor and several storage drives, boots up with everything connected usually in 30 to 40 seconds. For the wallpaper rotator script and other LXDE adjustment tools, see:
http://douwil7.100webspace.net/linux/Tuning.html .

Re: which distribution with lxde

Posted: Mon Feb 06, 2012 1:10 am
by natsuto
I have an older Toshiba laptop, 500 GB, and hybrid drive Lubuntu `the EM in less than 30 seconds.

Re: which distribution with lxde

Posted: Mon Feb 06, 2012 4:42 am
by M_Mynaardt
natsuto wrote:I have an older Toshiba laptop, 500 GB, and hybrid drive Lubuntu `the EM in less than 30 seconds.
That's pretty well what I have too on Lubuntu!

Re: which distribution with lxde

Posted: Wed Feb 29, 2012 4:18 pm
by meine
try Fedora 16 LXDE! it works very well on my Acer Aspire One SSD. on the net you can find several (alike) tweeks for the basic install to make it a fast netbook. on my AsRock HTPC Fedora 16 LXDE performs outstanding, very fast machine this way.

Fedora 16 LXDE is very stable and comes with good tools and repo's.

when you come from the *buntu family Fedora might give you some extra challenges because it is all open source. so you have to make extra installations to the basic install for eg MP3, Flash.