This is the Linux version of this question. Does anyone have a method for forcing a page refresh on firefox from the command-line?
Asked
Active
Viewed 8,228 times
13
-
you should edit your first question – krtek Mar 05 '11 at 11:35
-
@Krtek - the original question isn't mine, and it is specifically worded for windows (as is the accepted answer) – Ken Mar 07 '11 at 12:58
4 Answers
9
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.

user521297
- 501
- 4
- 6

geekQ
- 29,027
- 11
- 62
- 58
3
As mentioned elsewhere, you can also use the xvkbd tool as in the following:
$ xvkbd -window Firefox -text "\Cr"

Community
- 1
- 1

Doug Bradshaw
- 1,452
- 1
- 16
- 20
2
The best solution I've found so far..
Install the Firefox Remote Control plugin from: https://addons.mozilla.org/en-US/firefox/addon/remote-control/
Configure it, enable it (use the icon).
And reload for example with the following command:
echo reload | nc -c localhost 32000

jpoppe
- 2,228
- 24
- 25
-
Firefox Remote Control no longer works as modern Firefox has limited the ability of plugins to control the browser. – hackerb9 Nov 07 '19 at 04:47