Random Wallpaper from interfacelift.com - AVS Forum
Forum Jump: 
 
Thread Tools
post #1 of 3 Old 08-11-2010, 10:53 PM - Thread Starter
Newbie
 
vinaur's Avatar
 
Join Date: Aug 2010
Posts: 2
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Here's a script I use to set my wallpaper to a random one from interfacelift.com. Perhaps someone else might find this useful

I am using GNOME on Lucid, so that's the only setup I have tested.

Code:
#!/bin/bash
wget -q -U "Mozilla/5.0" -O - http://interfacelift.com/wallpaper_beta/downloads/random/hdtv/ \\
| grep download.png \\
| sed 's/^\\s*<[^>]\\+download.*$/http:\\/\\/www.interfacelift.com\\1/' \\
| head -n 1 \\
| wget -q -U "Mozilla/5.0" -i - -O wallpaper.jpg.tmp
mv wallpaper.jpg.tmp wallpaper.jpg
touch wallpaper.jpg
This gets the top wallpaper from the Random Wallpaper page on InterfaceLift for a 1080p screen and stores it in wallpaper.jpg file in your home directory. You can change that first URL to whatever you need. -U "Mozilla/5.0" part is important to avoid browser filtering on their website. The touch part triggers the wallpaper update.

Put the script into a file and don't forget to give it execute permissions.
Code:
chmod +x script.sh
Run it once from your home directory

Now set your wallpaper to the wallpaper.jpg file in your home directory.

To make the wallpaper update every set amount of minutes add the following to your cron jobs list. To access it, enter the following in the terminal
Code:
crontab -e
Now add a line like the following
Code:
*/15 * * * * /path/to/script
This will update your wallpaper every 15 minutes. To update every hour, the line should look like this:
Code:
* */1 * * * /path/to/script
Hope this helps.

Edit: added -q flags to wget to prevent a lot of useless stderror from getting sent to the system mail. This, however prevents error messages from getting logged as well.
vinaur is offline  
Sponsored Links
Advertisement
 
post #2 of 3 Old 08-11-2010, 11:26 PM
 
mythmaster's Avatar
 
Join Date: Mar 2008
Location: 255.255.255.255
Posts: 2,142
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
neat-o, thanks!

EDIT: Well, in KDE the jpg in my home dir changes but the wallpaper doesn't until I open up the settings dialog.
mythmaster is offline  
post #3 of 3 Old 08-14-2010, 11:58 AM - Thread Starter
Newbie
 
vinaur's Avatar
 
Join Date: Aug 2010
Posts: 2
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
I only tested this under GNOME, sorry. I'm sure there's another way to make it refresh though. Perhaps someone else knows exactly how.
vinaur is offline  
Reply HTPC - Linux Chat

User Tag List

Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page


Forum Jump: 

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off