Lubuntu: how to change wallpaper randomly on every login

lubuntu

Lubuntu It is the lightest version of Ubuntu, based on LXDE as a desktop and aimed at those users who have not so new hardware but who still want to have a stable environment, simple to use and update, and all with a more than successful design . Thus, it does not make sense to install a lot of tools for trivial tasks but that we can still crave, such as changers. wallpaper, since they go against what is sought in this 'Ubuntu flavor'.

However, if there is something GNU / Linux offers, it is flexibility and a simple way of doing things, and here we are going to show how to create a wallpaper changer for Lubuntu in simple way, all through elements already available in the system and therefore, without the need to install any application for it. Thus we avoid using 40 or 50 MB of RAM memory for this, and in passing we will see some of the operation in the background of this desktop (without neglecting that several of these tools do not work in a stable way with PCManFM, the file manager by LXDE).

The first thing we are going to do is create an icon on the desktop, for which we right-click on the desktop and select the option New -> File. We give it the name that comes to mind, making sure that if its extension is .desktop, so we can create something like 'wallpaper-changer.desktop'. Then we open the file for editing with our favorite tool (in the case of Lubuntu, it is almost certainly Leafpad), and we add the following:

[Desktop Entry]
Version=1.0
Name = Random Wallpaper
Comment = Change the wallpaper randomly.
Exec = bash -c 'pcmanfm -w «$ (find ~ / Images / Wallpapers -type f | shuf -n1)»'
Terminal = false
Type = Application
Categories = Utility;
Icon = wallpaper

We save the file and now what we do is copy it to have it in two different places: one is in our applications folder (so that it can be available through the Lubuntu menu) and the other is the one in the 'autostart' folder, so that it starts together with the system:

cd / desktop

cp wallpaper-changer.desktop ~ / .config / autostart

sudo mv wallpaper-changer.desktop / usr / share / applications

Now we simply have to open the login preferences menu, and verify that the wallpaper-changer icon is selected (the check box next to it must have a check mark) so that our trick is activated every time we log in on Lubuntu. That's it, from now on we will have a tool that will change the wallpaper for us every time we start the session opting for one at random, and if we want to change it ourselves, we simply have to access the menu and select the wallpaper-changer element, which will cause the wallpaper to be changed at that moment.

As we can see, it is a super simple solution that does not imply the use of complicated scripts or extra applications, something that as we said at the beginning is appreciated in the case of a light variant such as Lubuntu. The only thing we must bear in mind is that it is necessary to respect the fact of having a folder called ~ / Images / Wallpapers and have there all the images that we are going to use as wallpaper, since this is how our solution works.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   the Ludwin said

    Cool interesting
    super, I have to do it

    And I would like to know how to change the background of my LXTeminal terminal
    just in case i use lubuntu

  2.   Jose said

    What if I just want to put a wallpaper?
    I don't know why linux gurus always want to make complicated what everyone wants simple
    Graciasss