LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 04-17-2009, 02:29 AM   #1
Peppercorn
Member
 
Registered: Sep 2003
Posts: 53

Rep: Reputation: 15
Command Question


I am new to script writing but I have worked out half of what I want to do and wonder if someone can get me the rest of the way??

Firstly, I am using the new Mandriva with KDE4.2.

I have written the following script which is downloading a Radar image of where I live to get notice of rain falling in my area. It downloads an image every ten minutes and places it in a folder in my home directory as "weather.gif"
Here is the script.

!/bin/bash

while x=0; do wget --force-clobber --output-document=/home/vaughan/Weather/weather.gif http://www.bom.gov.au/radar/IDR083.gif?20090416082435 ; sleep 600; done

This part works.


But what I want to do is to show the photo on my desktop which is updated every 10 minutes, much like what gkrellkam does, however I don't want to use Gkrellkam anymore for different reasons.

I have tried using a plasmoid which comes with kde4 called "picture frame". Picture Frame has 2 basic settings "slideshow" and "Image" But with just one photo in the folder slideshow won't update every 10 minutes even though the photo is renewed in the folder every 10 minutes.

Can someone help me how to get the downloaded photo to be shown on the desktop and updated every 10 minutes?? either in script form or a program that would do the job?

Thanks in advance
 
Old 04-17-2009, 05:45 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
I am not sure about the details of this, but have you looked at "display"? (Part of the imagemagick suite)

When you say "update every 10 minutes", I assume you mean refresh the displayed image every time that a new one is downloaded.
 
Old 04-17-2009, 07:21 PM   #3
Peppercorn
Member
 
Registered: Sep 2003
Posts: 53

Original Poster
Rep: Reputation: 15
Thanks for the idea but Imagemagik just crashes if I set it to slideshow and there is only one photo in the folder.

Any other ideas????
 
Old 04-17-2009, 09:16 PM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
If you are downloading a new picture every 10 minutes, why do you need a slideshow? Just display the pictures as they arrive.
 
Old 04-17-2009, 10:37 PM   #5
Peppercorn
Member
 
Registered: Sep 2003
Posts: 53

Original Poster
Rep: Reputation: 15
Will it just display the 1st pic only or will it update itself periodically and if so how often??
 
Old 04-18-2009, 01:02 AM   #6
Peppercorn
Member
 
Registered: Sep 2003
Posts: 53

Original Poster
Rep: Reputation: 15
No it won't work. It only displays the photo which is there when I first start Imagemagick up. As the photo re-news Imagemagick fails to refresh.

Thanks for the help though.
 
Old 04-18-2009, 01:24 PM   #7
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
In the loop that downloads the picture, add a statement that displays it. Every time through the loop, it should display the new file. (Maybe you need to kill the display of the last file first.)
Quote:
As the photo re-news Imagemagick fails to refresh.
I am not sure I would expect it to.....
 
Old 04-19-2009, 02:59 AM   #8
Peppercorn
Member
 
Registered: Sep 2003
Posts: 53

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by pixellany View Post
In the loop that downloads the picture, add a statement that displays it. Every time through the loop, it should display the new file. (Maybe you need to kill the display of the last file first.)
I don't suppose you could tell me what that command or statement would be??? because I have no idea.

Thanx
 
Old 04-19-2009, 10:46 AM   #9
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,508

Rep: Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490
I've been following this thread out of interest as I do something similar but much simpler. Just a one line bash script to open a browser daily to a weather site. Are your intentions to save each image in your weather directory?

Check out this list of bash commands: http://www.ss64.com/bash/

Click on 'kill' in the list for an explanation of its use. You'll need to get the pid to do this. Sorry but, I don't know how to get it to display.
 
Old 04-19-2009, 08:27 PM   #10
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
I looked thru ImageMagick and could not find anything more elegant than just killing the window.
 
  


Reply



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
ls command question... jaepi Linux - Newbie 14 05-19-2007 10:16 AM
command question satimis Debian 2 07-27-2006 03:41 PM
Command question satimis Linux - Newbie 2 11-24-2004 08:59 AM
who command question Malique Linux - Newbie 2 03-22-2004 02:18 AM
ls -al command question Stingreen Linux - Networking 5 02-14-2002 11:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:21 AM.

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