Change url of web browser thru command line

browsercommand line

Is there some way to change the current url (of current tab or an specific tab) of a running web browser (any) thru command line?

It can be any browser that run on Linux, preferably if it is light weight.

I don't mean to close and re-open the browser.

I was only able to open new tabs on browsers but not change the current url of them. I could not fast and easily find ways thru qdbus either (not that there aren't).

If some plugin alows this also, it may be ok too.

Best Answer

In Firefox you can use MozRepl addon to control Firefox via telnet. For example, to change current url of a current tab to http://v4.ident.me:

(echo "content.location.href = 'http://v4.ident.me/'"; sleep 2) | telnet localhost 4242 > /dev/null
Related Question