Register
It is currently Sun Nov 23, 2014 5:01 am

reload web page


All times are UTC - 6 hours


Post new topic Reply to topic  [ 6 posts ] 
Author Message
 PostPosted: Sat Nov 24, 2007 7:59 am   

Joined: Sun Apr 22, 2007 5:16 am
Posts: 7
I might not learn bash scripting by just asking for a freebie,but I'll ask anyway.
I can still try to figure out why a script does work though.

What I would like is a script that will automatically refresh my browser,which is Opera,every 10 minutes.

Then I could use one box for other work,and just glance over at the second monitor every 10 minutes to see a refreshed web page,without having to click reload on the other box every time.


Top
 Profile  
 PostPosted: Sat Nov 24, 2007 10:30 pm   
Site Admin
User avatar

Joined: Sun May 15, 2005 9:36 pm
Posts: 673
Location: Des Moines, Iowa
rider wrote:
I might not learn bash scripting by just asking for a freebie,but I'll ask anyway.
I can still try to figure out why a script does work though.

What I would like is a script that will automatically refresh my browser,which is Opera,every 10 minutes.

Then I could use one box for other work,and just glance over at the second monitor every 10 minutes to see a refreshed web page,without having to click reload on the other box every time.


Would be easier to do with html and frames......... and meta-refresh tags... or javascript . At least I think it would.

but............... if your homepage is set to the webpage in question... perhaps something like

#!/bin/bash
while true
do
opera
sleep 600
killall opera; sleep 3
done
exit 0

something like that maybe..... i don't have opera installed to check it, but that's the format i'd try i guess if i was doing it in bash.


Top
 Profile WWW  
 PostPosted: Sun Nov 25, 2007 9:27 pm   

Joined: Sun Apr 22, 2007 5:16 am
Posts: 7
Quote:
Would be easier to do with html and frames

Thanks for replying.
Maybe I should give a better example,as I think I may not have asked the question properly.
By refresh the browser,I mean reload a webpage.

For example,I want to watch this thread for a reply to my question.
I have this page loaded in Opera on one box,using it's own monitor.
Rather than having to get up from a different box I am using to work on,
and click reload the web page to see if I have any replies to this thread,a script will do it for me.

I asked for 10 minutes in my first post,but 20 minutes,60 minutes will all do.

Does your answer about using html and frames still apply?
Does the script you gave still apply?
Thanks.


Top
 Profile  
 PostPosted: Mon Dec 03, 2007 7:53 am   
Moderator
User avatar

Joined: Thu Oct 11, 2007 7:12 am
Posts: 229
Location: London - UK
Hi,

What you ask is more difficult than you might expect. I'm unaware of any way in which a 'simple' script can get a browser to refresh a page. The suggestion written by crouse may work (it wouldn't need to be your homepage, a url can be supplied on the command line) however in the past when I wanted a similar thing I used a script to extract the information I needed from the webpage and displayed it in a terminal window with the script re-grabbing the data every 10m. To code this requires specific details about the webpage in question, ie the source.

Another option _could_ be to use a proxy server locally which inserts an extra meta-refresh header into the output. This would require careful configuration of the proxy.

DarthWavy


Top
 Profile  
 PostPosted: Tue Feb 05, 2008 10:18 am   

Joined: Tue Feb 05, 2008 8:24 am
Posts: 14
rider wrote:
What I would like is a script that will automatically refresh my browser,which is Opera,every 10 minutes.


You can use
Code:
opera -remote "openURL(http://www.flickr.com)"

but it seems to always use an active tab. Probably, -window option will help.

Please check Opera command line options. I do not use Opera daily.

And you can use crontab (man 5 crontab) to run in every X minutes. Add something like this to your crontab:
Code:
*/X * * * * opera -remote "openURL(yoururl)"


Top
 Profile WWW  
 PostPosted: Wed Apr 16, 2008 7:01 am   
User avatar

Joined: Sun Apr 13, 2008 4:05 am
Posts: 37
Location: /dev/random
opera already has a page reload timer option on context menu. there is no 10 minutes default, but 5min or 15 min. can get nuff for you.
just right click on page and select reloding period.


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP