[Precise Puppy 5.5] Tor Browser: Run as Root
- By default,
start-tor-browsercould not run as root
- Tor would unexpectedly exit
Install Tor Browser
- Start the web browser and visit https://www.torproject.org
- Click Download Tor
- Click Download Tor Browser Bundle 32-bit for GNU/Linux
- Open it with
pupzip (default)and extract the contents
The browser can be launched from the command line by going to the installed directory and running the script
Tor Browser Should Not be Run as Root
start-tor-browser will display the warning message:
The Tor Browser should not be run as root. Exiting.
A simple alteration to the script fixed this issue.
- Edit the file
start-tor-browserusing a text editor like geany.
- Search for “root” will find the conditional statement
if [ "`id -u`" -eq 0 ]; then complain "The Tor Browser Bundle should not be run as root. Exiting." exit 1 fi
- Comment out or delete the line
The script would now continue running without exiting at this stage.
What I found was that instead of deleting the line “exit 1” (which worked but threw up a warning dialogue box that had to be clicked “OK” to get rid of), simply replacing everything after “then” with “return” worked perfectly;
if [ "`id -u`" -eq 0 ]; then complain "The Tor Browser Bundle should not be run as root. Exiting." exit 1 fi Do the below instead
if [ "`id -u`" -eq 0 ]; then return fi
Tor Unexpectedly Exited
start-tor-browser would then display the “Tor unexpectedly exited” error messages:
Okay. Not much info. Looking at the terminal window showed the following messages:
Specifically, the line
[warn] /root/tor/tor-browser_en-US/Data/Tor is not owned by this user (root, 0) but by ftp (1000). Perhaps you are running Tor as the wrong user?
indicated the issue.
- From the terminal,
chown -R root
to recursively change ownership from ftp to root.
- The Tor Browser will now run without issue.
When using “chown” to change ownership, cd ../ to outside of the tor-browser_en-US directory and change ownership of the entire directory itself;
# cd to wherever the path of directory “tor-browser_en-US” is…
# chown -R root tor-browser_en-US
Now, you will have the latest version of the Tor Browser Bundle working flawlessly as root, within Puppy Linux!