Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Reloading a Firefox Page from the Command Line




Here is an example of how I would do it on my system, which is configured to
give focus under the mouse and raises the window on a left mouse click.  In
this example, I keep the Firefox window at the top left of the screen and
want to raise it so that I can see the results of the reload:

xte 'mousemove 0 0' 'keydown Control_L' 'key R' 'keyup Control_L' \
        'mouseclick 1'


You could also search for the window by the window title.

xdotool can do this and there is an example on this site too.
http://www.semicomplete.com/projects/xdotool/

It goes like this. If your document title was  "Crop Rotation in the 14th Century"
you find the window id and use it to set the focus and send keystrokes.

WID=`xdotool search --title "Crop Rotation in the 14th Century" | head -1`
xdotool windowfocus $WID
xdotool key ctrl+r

You could also just search for "Mozilla Firefox" in the title too, but it might find the wrong
window if you have more than one open.


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links