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,754
- 5
- 29
- 46
- 283
- 3
- 10
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-browserscript tostart-tor-browser-only. - In
start-tor-browser-onlyreplace the line./App/vidalia --datadir Data/Vidalia/ -style Cleanlooksnear 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-browserscript. - Close the browser window. Now just the
tordaemon andvidaliaare running. Processes can communicate throughtorby using it as a socks proxy. - Start
start-tor-browser-onlyhttp://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.
- 1,851
- 1
- 16
- 44
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!