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

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
    2

    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: Fuсking ubuntuforums, it's a nightmare to register.

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
  •