Wallpaper change automatically

Registered by AdanOva

I would like to be able to easily set up a wallpaper change every x time automatically.

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
None
Direction:
Needs approval
Assignee:
None
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

this I found on http://stackoverflow.com/questions/2182468/run-cronjob-as-user-to-change-desktop-background-in-ubuntu, perhaps use cron to run it...

#!/bin/bash

# Script to randomly set Background from files in a directory

# Directory Containing Pictures
DIR=/usr/share/backgrounds
LOG=/home/username/background.log

# Command to Select a random file from directory
PIC="$(
for p in [jJ][pP][gG] [pP][nN][gG] [sS][vV][gG] ; do
 ls $DIR/*.$p
done | shuf -n1
)"
# Command to set Background Image
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ] ; then
 # this is because of gconftool bug in cron
 TMP=~/.dbus/session-bus
 export $(grep -h DBUS_SESSION_BUS_ADDRESS= $TMP/$(ls -1t $TMP | head -n 1))
 echo $DBUS_SESSION_BUS_ADDRESS >> $LOG
fi

gconftool-2 -t string -s /desktop/gnome/background/picture_filename "$PIC"

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.