Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I force a firefox page refresh from linux console

This is the Linux version of this question. Does anyone have a method for forcing a page refresh on firefox from the command-line?

like image 499
Ken Avatar asked Mar 05 '11 11:03

Ken


People also ask

How do I force Firefox to reload a page?

To hard refresh on Firefox on Windows, there are also two easy hotkey commands you can use: Hold down Ctrl, Shift and the 'R' key. Or Hold down Ctrl and press F5.

How do I refresh Firefox from command line?

firefox -safemode or -safe-mode then a new window should show to enter safe mode or Reset, hit the right keyboard key, and press enter on "Reset Firefox". No mouse needed.

Is there an auto refresh for Firefox?

Extension MetadataTab Auto Refresh is a Firefox addon that helps you automatically reload tabs of your choice. In order to operate with this addon, please open toolbar popup UI while you are visiting a website. Adjust time interval in seconds (i.e. 120 sec) and you are all set.


2 Answers

You can use xdotool for automation. Install on Ubuntu with

sudo aptitude install xdotool

Then you can search for windows and send keys or mouse events, see man xdotool for the full documentation. I use following script on Ubuntu 10.04 LTS during development:

WID=`xdotool search --name "Mozilla Firefox" | head -1`
xdotool windowactivate $WID
xdotool key F5

See also the xdotool project site and my full blog post.

like image 99
geekQ Avatar answered Oct 20 '22 15:10

geekQ


As mentioned elsewhere, you can also use the xvkbd tool as in the following:

$ xvkbd -window Firefox -text "\Cr"
like image 40
Doug Bradshaw Avatar answered Oct 20 '22 16:10

Doug Bradshaw