Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 05-05-2008, 03:43 PM   #1
Registered: Sep 2003
Distribution: Debian
Posts: 213

Rep: Reputation: 31
desktop image rotator

My favorite desktop image switching utility chbg seems to have problems in Debian Lenny, so looking for a replacement.

The requirements are simple:
-rotate through images in a specified folder or list (either is ok)
-configurable image change interval
-continue from previous image on startup (or next image)
-with a gui or not, does not matter (but simple is better)

Tried to look for one with these requirements, found none..
Any ideas?
Old 05-06-2008, 10:41 AM   #2
Registered: Feb 2004
Location: NY
Distribution: Debian (Testing)
Posts: 219

Rep: Reputation: 30
Check out the program called "feh"
You should be able to get it with apt
Old 05-06-2008, 04:58 PM   #3
Registered: Sep 2003
Distribution: Debian
Posts: 213

Original Poster
Rep: Reputation: 31
Thanks for the tip Zaskar
I played with feh for a while and it is a nice tool, but I still couldn't get the looping quite the way I want it.

So I thougt I'll use "hsetroot" and try to script the rest.. The result appears to work, but my bash scripting skill are very rudimentary, so I attached the "proto" below for anyone with better experience to comment.

Usage for setup: --setup <image folder path>
Usage for execute: <image switching delay in seconds>


# If setup was requested, just build the image list and exit
if [ "$1" == "--setup" ]; then
   find "$2" | grep -i .jpg > .background_list

# Make sure the image switching delay is not unreasonably small
if [ "1" -gt "$delay" ]; then

# Get the number of images in the image list
img_no_max=`awk 'END {print NR}' .background_list`

# Set the next root window image, delay for a while, repeat..
while [ 1 ]; do
   # Get the order number of the next image in the image list
   img_no=`cat .background_no`
   # Get the image name, according to the order number
   img_name=`awk -v no=$img_no 'NR==no {print}' .background_list`
   # Display the image
   hsetroot -center $img_name

   # Increase the order number for the next image.
   # Reset the count if last image has been displayed
   if [ "$img_no" -gt "$img_no_max" ]; then
   echo > .background_no $img_no

   sleep $delay

Last edited by PMorph; 05-06-2008 at 04:59 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Script that downloads and displays an image on the desktop UbuntuRocks24 Programming 9 09-17-2007 11:08 AM
Desktop image gallery bento LQ Suggestions & Feedback 12 03-04-2006 05:58 AM
xscreensaver flipscreen3d doesn't grab desktop image danahata Slackware 10 08-01-2005 02:07 PM
Can't set desktop background image in Gnome TruckStuff Linux - General 1 07-18-2005 04:15 PM
New feature - Upload Desktop Image jeremy LQ Suggestions & Feedback 10 07-21-2003 02:30 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:01 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration