How to make TOR Browser Bundle work as root
Posted: Fri 07 Dec 2012, 04:33
I found a way to make the latest Tor Browser Bundles work with versions of puppy that use root as the default user (I used Precise 5.4.2), that is easy and straightforward:
Download the appropriate (32 or 64 bit) Tor Browser Bundle from the Tor Project website
https://www.torproject.org/download/dow ... sy.html.en
Extract the files to whatever directory you want.
Open the "tor-browser_en-US" directory, then right click on "start-tor-browser" and select "open as text". Scroll down until you find this piece of error output code:
if [ "`id -u`" -eq 0 ]; then
complain "The Tor Browser Bundle should not be run as root. Exiting."
exit 1
fi
Delete the above code, then save your changes to the file. Now execute the file as root (just left click). For me, this simple change allows Tor to be run as root without any problems. Try it and see if it works for you.
I've been banging my head against the wall for ages trying to figure out how to download and use the most up to date versions of TOR privacy/anonymity software with my various versions of Puppy over the years. It seemed that as soon as someone posted a .pet they'd made of the latest TOR package, TOR issued some dire warning that everyone needed to upgrade NOW to the different version to avoid newly discovered security flaws.
Well, I was invariably disappointed when my newly download GNU/Linux TOR browser bundles (they work with ALL linux distro's....simply unpack and run!) said "you shouldn't be running as root...exiting". My subsequent compilation efforts of the TOR source code using the .devx sfs's on earlier versions of Puppy always ran into a quagmire of dependencies that also needed compiling--a never ending rabbit hole of confusing layers of dependencies.
When that failed, I researched how to create/login as different users in Puppy (Fido, Spot) and tried downloading the TOR browser bundles and running them as Fido or Spot, but there were always errors that prevented Vidalia from communicating with TOR because some files had permissions that were set when the file was download through the root user etc...ad naseum.
Basically, never ending obstacles to what should have been a simple fix. Little did I know, it actually was.
So finally, I just opened up the "start-tor-browser" file inside the "tor-browser_en-US" directory in a text editor and sat down and read all of the error messages and the logic behind them. What I discovered was this:
if [ "`id -u`" -eq 0 ]; then
complain "The Tor Browser Bundle should not be run as root. Exiting."
exit 1
fi
What it's saying is this: "if the user id (id -u) equals 0 (0=root), then send this nasty message and exit the program."
I thought, "well, they say the Tor Browser Bundle SHOULD NOT be run as root, not that it WILL NOT RUN as root...what if I just delete this line of code and try executing the file again?"
WALLAH! Tor initialized, Vidalia opened and the secure firefox browser appeared. It was a seeming miracle.
I understand the desire of the Tor Project people to make Tor more accessible to everyone, but their supposedly user-freindly, no-set-up-required GNU/Linux browser bundle was severely biased against being used by the large community of Puppy linux users. Sure running as root can be dangerous, but if you're concerned about your privacy and booting from a live cd without saved sessions on an HD, running as root is very safe. They should display a warning about running as root, but then allow it to be overridden by simply checking a box that says "I understand the risks".
Try it and post your results!
Download the appropriate (32 or 64 bit) Tor Browser Bundle from the Tor Project website
https://www.torproject.org/download/dow ... sy.html.en
Extract the files to whatever directory you want.
Open the "tor-browser_en-US" directory, then right click on "start-tor-browser" and select "open as text". Scroll down until you find this piece of error output code:
if [ "`id -u`" -eq 0 ]; then
complain "The Tor Browser Bundle should not be run as root. Exiting."
exit 1
fi
Delete the above code, then save your changes to the file. Now execute the file as root (just left click). For me, this simple change allows Tor to be run as root without any problems. Try it and see if it works for you.
I've been banging my head against the wall for ages trying to figure out how to download and use the most up to date versions of TOR privacy/anonymity software with my various versions of Puppy over the years. It seemed that as soon as someone posted a .pet they'd made of the latest TOR package, TOR issued some dire warning that everyone needed to upgrade NOW to the different version to avoid newly discovered security flaws.
Well, I was invariably disappointed when my newly download GNU/Linux TOR browser bundles (they work with ALL linux distro's....simply unpack and run!) said "you shouldn't be running as root...exiting". My subsequent compilation efforts of the TOR source code using the .devx sfs's on earlier versions of Puppy always ran into a quagmire of dependencies that also needed compiling--a never ending rabbit hole of confusing layers of dependencies.
When that failed, I researched how to create/login as different users in Puppy (Fido, Spot) and tried downloading the TOR browser bundles and running them as Fido or Spot, but there were always errors that prevented Vidalia from communicating with TOR because some files had permissions that were set when the file was download through the root user etc...ad naseum.
Basically, never ending obstacles to what should have been a simple fix. Little did I know, it actually was.
So finally, I just opened up the "start-tor-browser" file inside the "tor-browser_en-US" directory in a text editor and sat down and read all of the error messages and the logic behind them. What I discovered was this:
if [ "`id -u`" -eq 0 ]; then
complain "The Tor Browser Bundle should not be run as root. Exiting."
exit 1
fi
What it's saying is this: "if the user id (id -u) equals 0 (0=root), then send this nasty message and exit the program."
I thought, "well, they say the Tor Browser Bundle SHOULD NOT be run as root, not that it WILL NOT RUN as root...what if I just delete this line of code and try executing the file again?"
WALLAH! Tor initialized, Vidalia opened and the secure firefox browser appeared. It was a seeming miracle.
I understand the desire of the Tor Project people to make Tor more accessible to everyone, but their supposedly user-freindly, no-set-up-required GNU/Linux browser bundle was severely biased against being used by the large community of Puppy linux users. Sure running as root can be dangerous, but if you're concerned about your privacy and booting from a live cd without saved sessions on an HD, running as root is very safe. They should display a warning about running as root, but then allow it to be overridden by simply checking a box that says "I understand the risks".
Try it and post your results!