Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 dont 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 arent).

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

share|improve this question
up vote 3 down vote accepted

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
share|improve this answer
is it possible to exit without error from telnet? if mozrepl is not started it returns 1, if command is successful it returns 1! – Aquarius Power Jun 21 '14 at 0:53
check here the full question: stackoverflow.com/questions/24337292/… – Aquarius Power Jun 21 '14 at 1:00

install mozrepl on firefox: wiki , Download

and install fresno tools in unix: website

then use it, (i.e. Send your browser to a page: ./fresno -p http://google.com/ )

more example

share|improve this answer
fresno sounds interesting, may be less work than using the telnet option; I wonder when it will have a package for ubuntu at least on ppa? – Aquarius Power Jun 20 '14 at 22:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.