I like quotes very much and would like to display it on my desktop as wallpaper.

Printed quote on the middle of the plain image as desktop wallpaper.

Is there any software to do this job? I know there are plenty of software to display random images as wallpaper, but this one should generate images with text and display it as wallpaper.

1 Answer 1


You could write a bash script to do this for you. Based on the xplanet tutorial (for setting the wallpaper, it's some gconf-magic ;) ) and this thread for writing the text using imagemagick.

Something like this:


convert -font "./verdana.ttf" -fill "#101411" -pointsize 33 -gravity "West" -draw "text 1,0 'foobar'" bg.png text.png
gconftool -t str -s /desktop/gnome/background/picture_filename text.png

Here we go, a full featured 'create a wallpaper to with a random quote on it', which could even be modified to 'to pick a random wallpaper to print a random quote on it'. ;)

Usage: Just look at the conf-section. Have fun!


# This is a script which prints random quotes (gathered from files) on to
# a defined wallpaper.
# Some ideas are coming from the xplanet-script located at: http://rbrusu.com/xplanet-desktop-wallpape.html

# Written by Robert 'Bobby' Zenz (Robert.Zenz@gmx.at)
# Written for UK at Superuser.com

# Config-Section
# --------------
quote=~/quotes.txt              # Set this to a folder, for picking random files, or set
                                # set it to a file, to pick random lines
wallpaper=~/wallpapers/         # Set it to a fixed wallpaper, or to a folder to pick
                                # a random one inside that
tempPic=tempWall.png            # The name of the temporary file

textSize=33                     # The size of the text
textColor="#555555"             # The color of the text (watch the quotation marks!)

sleep=3m                        # Set how long the script will pause before
                                # picking a new wallpaper/quote

# Global variable, please ignore this...

function getRandomLine {
    pickedQuote=$(shuf -n 1 $1)

function getRandomFile {
    cd $1

    set -- *
    random_num=$(( $RANDOM % ($length + 1) ))


    while [ ! -e $pickedFile ]; do


    cd -

function main {
    if [ -d $quote ]; then
        getRandomFile $quote
        pickedQuote=$(cat $pickedFile)
    if [ -f $quote ]; then
        getRandomLine $quote

    if [ -d $wallpaper ]; then
        getRandomFile $wallpaper
    if [ -f $wallpaper ]; then

    convert -fill "$textColor" -pointsize $textSize -gravity "Center" -draw "text 1,0 '$pickedQuote'" $pickedWallpaper $tempPic
    gconftool -t str -s /desktop/gnome/background/picture_filename $tempPic

    sleep $sleep
    exec $0


That script now has a home at GitHub.

  • this is cool ;) i'll check it . now windows turn :)
    – ukanth
    Jan 19, 2010 at 11:24
  • excellent, i am writing one for windows ;) some improvement * instead of reading a each file from folder,just a single file with each quote in a line will be good * Some timer functionality to change it automatically.
    – ukanth
    Jan 20, 2010 at 6:26
  • @UK: Good ideas, I changed that. ;)
    – Bobby
    Jan 20, 2010 at 23:12

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.