Voder-Vocoder

The Log of Hal Canary

Navigation: Home | THE LOG | Log Archives | Resume | Contact Info | Public Key | SSL | Math Applets | Site Map | RSS2 | Atom | Backend

« | »

Setting the Gnome Desktop Background With a Script

#!/bin/sh
## Written 2009 Hal Canary
## based on numerous examples
## DTPD
if [ "$#" -lt 1 ] ; then
   X=`basename "$0"`
   echo "Useage:  $X FILENAME"
   exit 1
fi
D=`dirname "$1"`
B=`basename "$1"`
cd $D
X=`pwd`/$B
cd -
if [ ! -f "$X" ] ; then
  echo "not a file: '$X'."
  exit 1
fi
echo "New background: '$X'"
gconftool-2 -t str --set \
  /desktop/gnome/background/picture_filename \
  "$X"
gconftool-2 -t str --set \
  /desktop/gnome/background/picture_options \
  "centered"
exit 0

Hal Canary | Computers & Code | 2009-09-10 18:23:48 UTC
Permanent Link Comments Off | No Comments

Comments are closed.
Email me your comments — h3 at halcanary dot org.

Copyright 1997-2011 by Hal Canary.
mailto: h3 at halcanary dot org
http://halcanary.org