Set up a cron job on all machines that executes a script where you check 1 specific place for new images. Sample (untested) script with wget and ftp:
#!/bin/bash
wget -N -r -nH --cut-dirs=2 -t 180 -P /tmp ftp://user:password@name.remoteserver.com/dir/backgroundimage.gif
gconftool-2 --type string --set /desktop/gnome/background/picture_filename /tmp/backgroundimage.gif
Basically the 2nd line needs to be altered to the method you use to manually load the image to the machines. And then set up cron
to execute this script to check every hour or once a day for new images.
You could even set it up to fetch a script where that script gets excecuted on the client machine and it then fetches the images and changes the background with gconftool-2. This would allow you to execute more than changing a background.
You can create a cron job with sudo crontab -e
. This will show a line similar to this:
# m h dom mon dow command
(m minutes, h hour, dom day of month, mon month, dow day of week)
and underneath it you could add ...
0 * * * /path/to/executable
or
@hourly /path/to/executable
to have /path/to/executable
run every hour on the hour. Mind you: a script you put in here does not understand the path variable unless you include it. You can put this at the top to include $SHELL
and $PATH
:
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
Otherwise you need to make sure your script uses full path names to execute commands. More info on cron can be found on the Ubuntu wiki.
You can also use the /etc/cron.hourly
directory to put a script there that gets run every hour. Example topics regarding the last part: What's wrong with my cron.hourly configuration? and Cron.hourly won't run.
By trying the answer of Senio I had no luck.
But with little modification I hit the jackpot :
sudo -i
xhost +SI:localuser:lightdm
su lightdm -s /bin/bash
gsettings set com.canonical.unity-greeter draw-user-backgrounds 'true'
gsettings set com.canonical.unity-greeter background 'path-to-image'
exit
path-to-image is actually the path where the image you want as log in screen wallpaper is stored e.g. : /usr/share/backgrounds/x.jpg
I tested it and it's working
I found this page which offers some tips regarding this problem :
Ubuntu13.04 LighDM
Best Answer
Change wallpapers according day & night as simple as it gets
Assuming the night begins somewhere after 12:00 am and ends after midnight 24:00, usage of the script below is as simple as it gets:
Run it in the background with the command:
for example:
During the day shift, set the wallpaper as you like. The script remembers your choice on the next day shift.
That's all. Now the wallpaper will switch according the moments of the day you set, running the script.
If the script is stopped
The script remembers the set wallpapers in a hidden file:
~/.wallset
. WHen the script is (re-) started, it first tries to read the set wallpapers from the file. if it does not exist, it creates a new file, using the currently set wallpaper for both day- and night shift, until you change either one (or both).Processor load zero
When the script is started, it calculates:
After that, between the wallpaper switches, the script only sleeps
what the script does
The script
How to use
wallpaper_shift.py
Test- run it from a terminal by the command (example):
where the time format should be
20:00
If all works fine, add it to Startup Applications: Dash > Startup Applications > Add. Add the command:
Notes