Linux Lite Forums

Customization => Desktop Customization => Topic started by: leillo1975 on January 29, 2019, 06:55:18 AM

Title: I need help to block wallpaper change
Post by: leillo1975 on January 29, 2019, 06:55:18 AM
Hello again
I work in a educational institution and we have a classroom with 16 PC's with Linux Lite 4.2 installed. I have a problem, the students are changing the institution official wallpaper constantly, even with inappropriate photos.

I would like to block the possibility of change the wallpaper, or a solution that makes this official wallpaper sets when a new sessión starts (with a script)
¿Can you help me?
Title: Re: I need help to block wallpaper change
Post by: Angelos Kouniaris on June 19, 2019, 01:36:40 PM
Hi, I have the exact same problem. I need to either block changing the wallpaper OR to make a script automatically changing it back upon login.

Unfotunatelly i do not have the knowledge to do so.

Have anyone got any suggestions?
Title: Re: I need help to block wallpaper change
Post by: bitsnpcs on June 19, 2019, 02:57:44 PM
Hello leillo1975, and Angelos Kouniaris,

suggestion - this link explains how to set a wallpaper each day.

https://askubuntu.com/questions/835853/how-can-i-get-one-wallpaper-for-each-day-of-the-week/835864#835864 (https://askubuntu.com/questions/835853/how-can-i-get-one-wallpaper-for-each-day-of-the-week/835864#835864)

By editing the above script you can choose the default Linux Lite wallpaper as the wallpaper for every day, and to check it is the wallpaper on specific time durations after startup using cron, when checked if Linux Lite wallpaper is not the current wallpaper it will change it back** to this wallpaper.
I do not know how to change it for your needs for XFCE desktop, but someone will know on the forum how to change it.

Edit - an easy way of doing that code edits may be a small hack like -
IF when checked it is not todays wallpaper by its filename (as it has been changed by user) THEN jump to tomorrows wallpaper (as it is the same wallpaper as todays should have been).
Rather than resetting the wallpaper it is looping through the daily wallpapers after each change by user it continues next jump in the loop based upon the cron times for checking, just as in the script of link above does for each daily wallpaper.
Cron it is changed by setting daily time instead to for example 30 minutes or 60 minutes between checks, to suit your needs for the checking of the wallpaper, and its resetting to the Linux Lite wallpaper.
This makes it easier to change and less coding needing to be done as only adapting/hacking the existing code on link not having to rewrite big parts of the code.

** the hackery is - the wallpaper is changed "back" to the default Linux Lite by in reality changing the wallpaper "forward" coz Linux Lite is always moving forward, is forward thinking.
Title: Re: I need help to block wallpaper change
Post by: torreydale on June 19, 2019, 03:50:14 PM
Maybe this will help:
https://askubuntu.com/questions/1034000/prevent-users-from-changing-the-desktop-background-on-ubuntu-18-04