Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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
add comment

2 Answers 2

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 at 0:53
    
check here the full question: stackoverflow.com/questions/24337292/… –  Aquarius Power Jun 21 at 1:00
add comment

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 at 22:43
add comment

Your Answer

 
discard

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.