Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Development & Programming > Programming Talk
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Ubuntu 9.10 is out!!!

When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu.

The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely.

Programming Talk
This forum is for all programming questions.
The questions do not have to be directly related to Ubuntu and any programming language is allowed.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old January 26th, 2008   #1
acvwJosh
First Cup of Ubuntu
 
Join Date: Feb 2007
Location: Virginia, USA
Beans: 5
Ubuntu 7.10 Gutsy Gibbon
Astronomy Photo of the Day Wallpaper

Hello! I posted this in another thread, but I thought that it was a lot more applicable to this forum. The idea was to take the picture from this website, download it automatically every day, and set it to my wallpaper. I wrote a small shell script to do this, that I wanted to share. It's my first script, so I'd definitely like criticism and suggestions. I've got the script in a folder in my home folder called .wallpaper, and it runs every morning via a crontab entry. Let me know what you think!

Code:
#!/bin/bash

# download image from apod site
wget -A.jpg -R.txt -r -l1 --no-parent -nH http://antwrp.gsfc.nasa.gov/apod/astropix.html

# move image from obscure folder to main folder, rename image
find ./apod -name "*.jpg" | while read line ; do
	mv "$line" "wallpaper.jpg"
done

# set image to wallpaper
gconftool-2 -t string -s /desktop/gnome/background/picture_filename "blank.jpg"
gconftool-2 -t string -s /desktop/gnome/background/picture_filename "/home/josh/.wallpaper/wallpaper.jpg"
gconftool-2 -t string -s /desktop/gnome/background/picture_options "zoom"
acvwJosh is offline   Reply With Quote
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:20 AM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry