Can I force a firefox page refresh from linux console

喜夏-厌秋 提交于 2019-11-30 13:14:44

问题


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


回答1:


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.




回答2:


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

$ xvkbd -window Firefox -text "\Cr"



回答3:


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



回答4:


Have a look here. There is no remote reload-function described. Maybe the site is out-dated and you will find something while browsing through the mentioned *.cpp files. Or you add the function by your-self. The basics to handle such remote-calls seem to be already in Firefox.



来源:https://stackoverflow.com/questions/5203419/can-i-force-a-firefox-page-refresh-from-linux-console

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!