Page 3 of 3 FirstFirst 123
Results 21 to 30 of 30

Thread: Super simple lxde lubuntu wallpaper changer, no memory usage, no crazy scripts

  1. #21
    Join Date
    Mar 2005
    Location
    Lancashire, NW England UK
    Beans
    169
    Distro
    Lubuntu 13.04 Raring Ringtail

    Re: Super simple lxde lubuntu wallpaper changer, no memory usage, no crazy scripts

    OK, this is a bit wierd. I have newly installed Lubuntu 13.04, but with a separate pre-existing /home partition. When I use this wallpaper changer, all I get is a new PCManFM file window open at my home directory. The wallpaper doesn't change.

    I've deleted it all and gone throught the process of creating it again with the same results. I've checked the entries in ~/.config/autostart and in /usr/share/applications and I can't find what I may have done wrong. Can anyone suggest where I look next?

    Thanks.

    P.S. it works fine on my laptop which was running 12.04 and continues to work after a dist-upgrade.
    Momist. Follower of the minor Greek god Momer.

  2. #22
    Join Date
    Mar 2005
    Location
    Lancashire, NW England UK
    Beans
    169
    Distro
    Lubuntu 13.04 Raring Ringtail

    Re: Super simple lxde lubuntu wallpaper changer, no memory usage, no crazy scripts

    My bad. My wallpapers are all symlinks to files within my photos, many gigabytes worth. It seems this code doesn't work with symlinks. I've put in a test folder with real images, and it works fine with that.

    SOLUTION:
    Amend the 'find' function with the parameter -L, as follows:
    Exec=bash -c 'pcmanfm -w "$(find -L /data/WallpaperLinks -type f | shuf -n1)"'

    This overrides the default action of 'find' to make it follow symbolic links. See 'man find'.

    HTH someone.
    Last edited by momist; July 12th, 2013 at 10:44 AM. Reason: Solution to problem.
    Momist. Follower of the minor Greek god Momer.

  3. #23
    Join Date
    Sep 2011
    Beans
    2

    Re: Super simple lxde lubuntu wallpaper changer, no memory usage, no crazy scripts

    Hey thanks man... This was exactly what I wanted for my Lubuntu Asus Eeepc. No resource hog and just works.

  4. #24
    Join Date
    Jul 2011
    Beans
    3

    Re: Super simple lxde lubuntu wallpaper changer, no memory usage, no crazy scripts

    Need new instructions for Lubuntu 14.04. "Random Wallpaper" does not show on the list of automatically started applications in LXSession configuration in Autostart section.

  5. #25
    Join Date
    May 2014
    Beans
    1

    Re: Super simple lxde lubuntu wallpaper changer, no memory usage, no crazy scripts

    Thanks ronniew, thanks for making this script, it works great on my ArchLinux LXDE. However, I noticed a problem, which you may consider adding to the OP.

    Sometimes the script starts too soon, before pcmanfm has started. This results in a error window and the wallpaper not changing.

    I have been able to "fix" this problem by adding a polling loop before the pcmanfm call, as in

    Code:
    until [ $(pidof pcmanfm) ]; do sleep 0.2; done;
    On my specific case, I also wanted to be able to specify the wallpaper mode, because I was using this on a volatile /home folder (granted, this is not a typical use case), so I added:

    Code:
    --wallpaper-mode=fit
    before the ending apostrophe.

    E.g. my final line looks like this:

    Code:
    Exec=bash -c 'until [ $(pidof pcmanfm) ]; do sleep 0.2; done; pcmanfm --set-wallpaper="$(find ~/.wallpapers -type f | shuf -n1)" --wallpaper-mode=fit'
    PS: <snip ubuntuforums, it's a nightmare to register.
    Last edited by cariboo; January 10th, 2016 at 03:03 AM.

  6. #26
    Join Date
    Oct 2008
    Location
    Ottawa Canada
    Beans
    1,208
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Super simple lxde lubuntu wallpaper changer, no memory usage, no crazy scripts

    How can I run this from a Crontab?
    Randy McElligott
    www.mcran.com

    For the best in Jazz, In Transition every Sunday from noon-2pm EST www.chuo.fm

  7. #27
    Join Date
    Dec 2012
    Beans
    Hidden!

    Re: Super simple lxde lubuntu wallpaper changer, no memory usage, no crazy scripts

    script.sh,

    and cronfile in say /etc/cron.d/cronfile as in the following format:

    Code:
    mm hh * * * user /home/user/script.sh

  8. #28
    Join Date
    Jul 2015
    Beans
    1

    Re: Super simple lxde lubuntu wallpaper changer, no memory usage, no crazy scripts

    Hello, i am new here so, don't shot any bullets at me, ok?

    I have tried this solution in my previous installation of lubuntu 14.04, at the same computer (Hp Pavilion dv6500) and it worked greatly, with no problems. I had make this change at the original solution: line 5: Exec=bash -c 'pcmanfm -w "$(find /usr/share/backgrounds -type f | shuf -n1)", nothing great...

    Here is the bug: I have formatted my computer, installed the same lubuntu 14.04, updated the SO, but sometimes when i turn on the computer, the following message appears on a box: "The desktop manager is not active" and no wallpaper is shown in the background (black screen). Sometimes it works, sometimes not. If o log off the user and log on again the wallpaper is shown and changed.

    Any ideas on how to fix it?

    Thank you guys. Any problems with my English, please tell me

    PS: If i remove the icon from the autostart folder this problem do not happens anymore, but... i wanna the changer >.<
    Last edited by brunoleaotm; July 19th, 2015 at 10:59 PM.

  9. #29
    Join Date
    Jan 2016
    Beans
    5

    Re: Super simple lxde lubuntu wallpaper changer, no memory usage, no crazy scripts

    Wuhu I finally decided to be part of a forum! Hello World!

    Tested code on Kali Linux running LXDE and it works like a charm! Thanks OP!

  10. #30
    Join Date
    Jan 2016
    Beans
    1

    Re: Super simple lxde lubuntu wallpaper changer, no memory usage, no crazy scripts

    Thanks: works perfectly.
    Your command-line script needs to be updated for consistency with your preferred file name though:
    Code:
    cd ~/Desktop
    cp randomwallpaper.desktop ~/.config/autostart
    sudo mv randomwallpaper.desktop /usr/share/applications

Page 3 of 3 FirstFirst 123

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •