If I do tor-browser_en-US/App/Firefox/firefox-bin http://example.com
it opens in my regular Firefox browser. Is there a way to make a launcher/script that opens a link in the Tor Browser?
2 Answers
Currently the start-tor-browser
script and vidalia
form the Tor Browser Bundle is not prepared to pass arguments to the launched Firefox. See this part of the script (near to the end):
printf "\nLaunching Tor Browser Bundle for Linux in ${HOME}\n"
cd "${HOME}"
# XXX Someday we should pass whatever command-line arguments we got
# (probably filenames or URLs) to Firefox.
./App/vidalia --datadir Data/Vidalia/ -style Cleanlooks
The last command results in launching Firefox.
It is possible to close the browser launched through vidalia
and then to start it manually. Here is a procedure:
- Copy the
start-tor-browser
script tostart-tor-browser-only
. - In
start-tor-browser-only
replace the line./App/vidalia --datadir Data/Vidalia/ -style Cleanlooks
near to the end by./App/Firefox/firefox -no-remote -profile Data/profile "$@"
- Make sure that the executable bit is set:
chmod a+x start-tor-browser-only
- Run the
start-tor-browser
script. - Close the browser window. Now just the
tor
daemon andvidalia
are running. Processes can communicate throughtor
by using it as a socks proxy. - Start
start-tor-browser-only
http://your.address
.
This way you can start the Firefox with parameters as you want. It will be started with the correct profile and correct environment variables: HOME
, XAUTHORITY
, LD_LIBRARY_PATH
and LDPATH
. Unfortunately the debug mode will not work and probably there would be several other minor catches and security implications.
-
2For one, you won't be starting the browser with the environment variables that tell the Torbutton Firefox extension how to talk to Tor's control port. That means when you click 'new identity' in Torbutton, it won't be able to tell Tor to rotate to fresh circuits. So this is a fine hack if you want to play around with it, but it seems a poor choice for normal users. Sep 26, 2013 at 9:30
-
1Also, I'd encourage people to investigate this question in the context of TBB 3.x, which doesn't have Vidalia anymore and is simply the browser: blog.torproject.org/category/tags/tbb-30 Sep 26, 2013 at 9:31
-
It at least lets me avoid having to restart vidalia if I've quit the browser, so that's a timesaver. I was hoping there was a way to open an URL in the running browser (ie. without the "-no-remote"), but I guess that's not possible yet.– unhammerSep 26, 2013 at 13:37
-
@unhammer: If you want you can remove the
-no-remote
parameter instart-tor-browser-only
then you can control the Tor Firefox browser by runningfirefox
but there is a risk that you open some URLs through Tor though they should have been opened in clear and vice versa. Unfortunately-no-remote
seems to be hardcoded in the binaries launching the first instance of Firefox. Sep 26, 2013 at 14:16 -
On my system I get
Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system.
if I'm running just Tor Browser, while it opens in the regular Firefox if I'm running that as well.– unhammerSep 27, 2013 at 7:21
As noted in the comments, 3.X series of the Tor Browser Bundle ships without Vidalia and now it's easier to launch it with a URL (or any other command line option that Firefox would be happy with).
Here is a modified start-tor-browser
script that will pass all arguments to Tor Browser while preserving environment variables set by the original script:
start-tbb-with-args
(place in TBB root dir, same dir as thestart-tor-browser
, give execution permission withchmod u+x
)
Some possible commands would be:
start-tbb-with-args torproject.org
open torproject.orgstart-tbb-with-args about:tor torproject.org
open about:tor and torproject.org (will open 2 tabs)start-tbb-with-args -search Tor
search for the word "Tor" using TBB's default search engine (=startpage)start-tbb-with-args --debug torproject.org
run TBB in debug mode and open torproject.org
Note that, whenever present, TBB's --debug
option will be processed correctly and excluded from the passed params using shift
.
You can review the patch
(vs. TBB v3.5) which is quite minimal (only 13 characters were changed/added!)
Please use the script at your own risk! Not sure about what kind of security/privacy problems this modification may bring!