Is it possible to change the GNOME desktop background during some period of time by just a random phrase from the list on black screen? Will is seriously load the CPU and consume battery life?


You can use something like:

ex_bg=$(gsettings get org.gnome.desktop.background picture-uri)
str=$(shuf -n1 list)
convert -background black -fill white -pointsize 72 label:"$str" /tmp/new_bg.jpg
gsettings set org.gnome.desktop.background picture-uri "file:///tmp/new_bg.jpg"
sleep 20
gsettings set org.gnome.desktop.background picture-uri "$ex_bg"

It converts a random phrase from the file "list" to a jpeg and displays it for 20s, then set the old background.

For gnome 2, you have to use gconftool-2 :

gconftool-2 -s --type string /desktop/gnome/background/picture_filename "file"

You can also put videos and xscreensavers on your background (also in compiz) with xwinwrap

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.