Fix error Tor Browser Bundle should not be run as root in Linux

Fix error Tor Browser Bundle should not be run as root in Linux

 

Tor Service | Onion Router
Tor Service | Onion Router

 

 

Installing TOR service in Kali

apt-get install tor

Downloading Tor Browser

Go to the Tor Project official website to download Tor Browser.

Extracting Tor Browser

Extract the Tor Browser from Archive Manager or through Terminal. Check on How to Extract/Unarchive files using Terminal in Linux, to know more about how to use Terminal to Extract files in Kali Linux and other Linux-based Operating Systems.

Installing Tor Browser

With the extracted directory as the working directory in Terminal, run the following command to run an instance of Tor Browser. Do not quit the Terminal yet.

./start-tor-browser.desktop

This should open Tor Browser unless you are using the Root account, where it shows the Error;
The Tor Browser Bundle should not be run as root

If yours ran with no exceptions, you can jump to the registering section to be able to access Tor Browser from the list of your Applications or even in your Favourites.

 

 

How to fix Error after Updating Tor Browser in Kali Linux, Ubuntu, Linux Mint & other Linux OS |
How to fix Tor Browser not launching after updating

The part that explains in detail how to Fix the error, “The Tor Browser Bundle should not be run as root”, also works for you if you recently updated Tor Browser and it failed to launch even after trying unsuccessful fixes in your Linux OS. When you update Tor Browser through the browser or even through terminal (if for example you selected to update after it automatically detected a newer version exists), it may result in an error in launching. The reason is that, the new version could overwrite the ‘start-tor-browser’ configuration file, which while installing it for the first time, you may have changed it to accept running as root.

 

 

Fixing the error “The Tor Browser Bundle should not be run as root”

Tor throws an exception (error) when you try to run it as Root.
Fixing this can be a problem if you don’t have the right information but ‘too easy’ with thetqweb.
Simply locate the directory where your extracted Tor Browser is located, which should be something like ‘/tor-browser_en-US’. Navigate inside the directory where there is a directory ‘Browser’ and a file ‘start-tor-browser.desktop’. Enter into the ‘Browser’ directory and locate manually or search for the file ‘start-tor-browser’.
Open it with a text editor of your choice. On your Keyboard, press Ctrl+F to Find the word ‘Root’ in the script or manually locate the code;

 

 

Comment the code by inserting ‘#’ before each line of code, -like;

#if [ “`id -u`” -eq 0 ]; then
# complain “The Tor Browser Bundle should not be run as root. #Exiting.”
# exit 1
#fi

 

Save and exit.

By running the following command you should now be able to open an instance of Tor Browser;

./start-tor-browser.desktop

 

Registering Tor Browser

It would be tiresome to always change the working directory to the location of Tor Browser every time you want to run Tor Browser. To solve this you need to register Tor Browser as a Desktop Application. This Way you can access it from ‘Applications/ Usual applications/ Internet/ Tor Browser‘ or by searching for it in ‘Show Applications‘.
Assuming your working directory has still not changed in terminal enter the command;

./start-tor-browser.desktop –register-app

On hitting enter, the success result should be;

root@kali:/home/tor-browser_en-US# ./start-tor-browser.desktop –register-app
Launching ‘./Browser/start-tor-browser –detach –register-app’…
Tor Browser has been registered as a desktop app for this user in ~/.local/share/applications/

By simply navigating through Internet applications or searching in applications, you should be able to access the Tor Browser.

You can copy the commands here and paste it in your terminal using the combination Shift+Ctrl+C on your keyboard

 

Was this information helpful? Check out more Hacking computers articles on thetqweb’s Hacq Linux Series.

Consider buying thetqweb.com a coffee [buymeacoffee.com/thetqweb.com] if this information was helpful. Even the least is most significant! This site is supported by generous donations such as yours! Click on the floating Purple Coffee Cup on the bottom-right side, or click on the “Buy me a Coffee” tab on the site! Thank You in Advance!

 

Alternatively, check out this great Tor Darknet Series:

Fix error Tor Browser Bundle should not be run as root in Linux
Hacking | thetqweb