Page 1 of 3 123 LastLast
Results 1 to 10 of 25

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

  1. #1
    Join Date
    Aug 2005
    Beans
    180

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

    Wallpaper changers on lxde or lubuntu are nice to have but tough to find, particularly if you are trying to stay lightweight. Usually wallpaper changers don't usually work because they aren't compatible with pcmanfm.

    So after searching the Internet for quite some time and fiddling around I came up with a super easy, simple way to have a wallpaper changer on lxde / lubuntu without using any memory or complicated scripts or programs.

    I tried the wallpaper changer called variety which i found on these forums... however it didn't work for me but also upon launch it was using about 40 megs of ram on my system just to change the wallpaper... not exactly lightweight, and it was always running in the background.

    I've also looked at some scripts and while they do work they are more complicated then they need to be... although i will say that they usually provide some type of timer wallpaper change feature, which this solution does not... however you'll see it really doesn't matter.

    Ok here we go.

    First lets make a desktop icon.

    To create a desktop icon right click on the desktop and create a blank file. Name the file whatever you want just end it with .desktop I usually name the icon randomwallpaper.desktop

    Once the file is created right click on it and open it with leafpad.

    Copy and paste the following code in it

    Code:
    [Desktop Entry]
    Version=1.0
    Name=Random Wallpaper
    Comment=Randomly change LXDE wallpaper.
    Exec=bash -c 'pcmanfm -w "$(find ~/Pictures/Wallpapers -type f | shuf -n1)"'
    Terminal=false
    Type=Application
    Categories=Utility;
    Icon=wallpaper
    Once the code is pasted close and save it.

    Now I'm going to assume your new icon is on the desktop

    We will place this icon in two place...

    One in your autostart folder (which provide a random background on startup)

    And the other one will go in your applications folder (which will provide access to it through your accessories menu.)

    Open your terminal and enter these commands

    cd Desktop
    cp randomdesktop.desktop ~/.config/autostart
    sudo mv randomdesktop.desktop /usr/share/applications

    Open up desktop session settings (preferences menu) and make sure the Random Desktop icon is checked if you want it to change your desktop background on startup.

    Finally and important... create a folder named Wallpapers inside your Pictures folder and place your desktop backgrounds in there..

    Now whenever your computer starts it changes the background and if you want to change it yourself you can select random wallpaper from the accessories menu and it will switch it instantly.

    This is an excellent no memory usage, super easy wallpaper changer solution without involving complicated scripts or heavy programs.



    CAUTION: This has only been test on Lubuntu 12.04

    *****
    I will be providing a series of easy solutions and linking to them below

    lxde simple weather

    aero snap for lubuntu
    expose feature for lubuntu
    Last edited by ronniew; October 26th, 2012 at 07:46 AM.

  2. #2
    Join Date
    Oct 2009
    Location
    Reykjavík, Ísland
    Beans
    9,949
    Distro
    Lubuntu 14.10 Utopic Unicorn

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

    Thanks, but please post these guides in
    https://help.ubuntu.com/community/Lubuntu/Documentation
    in order to have everything in one place.

    We are trying to move stuff of long-time value to the wiki and use the forum mainly for support questions.
    About problems due to upgrading
    Bringing old hardware back to life.
    Please visit Quick Links -> Unanswered Posts

  3. #3
    Join Date
    Dec 2008
    Location
    Northwest Ohio
    Beans
    1,581
    Distro
    Lubuntu 13.10 Saucy Salamander

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

    Thanks for the tip.

    Unfortunately I am unable to use it in a stock Lubuntu 12.10 because I am affected by a bug in pcmanfm 1.0.1-0ubuntu1, where pcmanfm refuses to launch after setting the wallpaper by command. The latest git version 1.0.2-alpha1 fixes the bug though, which I was able to temporarily test on a non-persistant liveusb. Bug: http://sourceforge.net/tracker/?func...56&atid=801864
    Last edited by ankspo71; October 28th, 2012 at 04:48 PM.

  4. #4
    Join Date
    Aug 2005
    Beans
    180

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

    i reported that bug early on, glad to see its been fixed in the latest build

    which you might be able to get from here

    https://launchpad.net/ubuntu/+source/pcmanfm

  5. #5
    Join Date
    Aug 2005
    Beans
    180

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

    Quote Originally Posted by xfctr View Post
    and being heavy on resources, neither of which is true.
    I guess I'm old school, anything over 10 megs for a wallpaper changer seems crazy. (in truth anything over 5)

    In my mind ram is the single most valuable resource in your computer that you actually have quite a bit of control over. There has never been a time that saving as much ram as possible wasn't a good thing.

  6. #6

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

    I guess I'm old school, anything over 10 megs for a wallpaper changer seems crazy. (in truth anything over 5)
    Try this utterly simple Python program - on my machine it eats 8.8 mb RAM (reported by System Monitor, roughly one third of what it reports for Variety here).

    Code:
    from gi.repository import Gtk
    win = Gtk.Window()
    win.connect("delete-event", Gtk.main_quit)
    win.show_all()
    Gtk.main()
    5-10 years ago 5 MB would have been a reasonable expectation using the modern technologies of that time. Not now. Reason is simple - RAM is cheap, everyone simply prefers using clean easily maintainable high-level code to highly optimized low-level code, so every tier in the application stack consumes more RAM than several years ago (VM, UI toolkit, application code, etc.). Things add up and now an application that displays one empty window consumes 9 mb RAM.

    A full-featured wallpaper changer can fit in 5 mb only if coded in low-level C, hand-crafted for a particular type of use-case, with no GUI, or using some very light non-standard UI toolkit. This won't be a general solution that people can install and use in a user-friendly manner.

    Another experiment: try running the find/shuf command on a big directory tree (several thousand files) several times in a row. See how much time and HDD activity the first run takes and then how much faster the next runs are. This is because the OS caches the results. You cannot easily measure this memory consumption, but it is there, simply not allotted to a specific process. There is no escaping - you either have to trash the disk heavily every time, or you need to cache something and consume RAM. Speed vs memory usage is pretty much a "law of nature" - there is always need for compromising between them.

  7. #7
    Join Date
    Aug 2005
    Beans
    180

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

    There is no thrashing of the hard drive that goes on, unless you are changing the wallpaper ever 10 seconds like you suggested in a previous post...

    who is changing their wallpaper every 10 seconds with multiple thousands of images? if they are they don't need a wallpaper changer they need a slideshow program

    that being said.... something that run then exits, get the job done and consumes no ram is in my mind a better solution...

    thrashing of the hard drive may have been a concern 15 yrs ago, now however i feel it used as an excuse for overly complicated solutions.

  8. #8

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

    I said it earlier - your approach is elegant, but will only serve some people. From there on, you seem to ignore any possibility that the use-case your solution covers is not the only one possible or that users may want something more than the mere basics, like filtering by image size or automatic downloading of new wallpapers so that they don't look at the same several hundred images till they know them by heart. Also you seem to confuse "simple" and "lightweight" - they are different things that don't necessarily go together, and same goes for "complex", "featureful" and "heavy".

    something that run then exits, get the job done and consumes no ram is in my mind a better solution...
    I said it before, a "better solution" is a subjective matter: my exact words were "this very strongly depends on the usage pattern and how you value things" - "things" meaning CPU and memory consumption, features, simplicity of usage, etc, etc.

    Judging by the feedback, Variety is clearly a great solution for a lot of people. It doesn't suit you - I understand this, but please refrain from putting labels on it that don't represent reality.

  9. #9
    Join Date
    Aug 2005
    Beans
    180

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

    listen man, i came here to post my simple solution for anyone who wanted it... i'm sorry i mentioned your program to be honest it would have saved a lot of unecessary typing if I hadn't.

    Soon as I did I'm being slammed for offering a solution outside of your ingenious this program fits all because its perfect attitude.

    I'm sorry if I put a dent in your ego over your creation. Sorry I mentioned it. Trust me I will not being doing so ever again.

    To be honest no one really gives a crap about either of our creations. They are going to use what they are going to use. The idea is to offer it and let others decide what they want.

    You don't need to play defender over your ideas or creations. You only need to know why you are doing them.

    Maybe you should study the following about your program:

    in your reality its great

    in my reality its unnecessary..

    who knows what other peoples reality might be

    you don't get to dictate reality,

    only the individual does.


    **** Now please shut up about it

  10. #10

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

    Man, cool off I'm not slamming you for your solution, just asked you to not put false labels on mine. You are right this time, too much typing about it. See you around.

Page 1 of 3 123 LastLast

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
  •