Thursday, July 25, 2013

Installing the Tor Browser Bundle for all users on Linux

The Tor Browser Bundle provides a great way to browse the web anonymously through the Tor network. It is super simple to use and in addition to providing anonymity by routing your connection through multiple computers on the network it also blocks a lot of potential data leaks that could reveal your identity. It includes a patched version of Firefox with the HTTPS Everywhere and NoScript extensions.

Now the Tor Browser Bundle is intended to run without installation, even from a flash drive, but what if you want to install the Tor Browser Bundle to be available for all users on the system and show up in their application menus? I often install the official Mozilla build of Firefox and Thunderbird in /usr/local/bin, owned by my primary user (as described here). That way, all users on the system can use the applications and automatic updates work for my user, which updates the application for everyone. However, this approach will not work for the Tor Browser Bundle as it needs to be owned by the user to work properly. It may be possible to get a single installation to work globally by adjusting permissions (although I'm not certain if this might still introduce a security flaw), but the way I went was to configure the system to install it for all new users automatically.

First, put the Tor Browser Bundle directory in /etc/skel. The contents of this directory are automatically copied to each new user's home directory when it is created. Of course, you will have to do this manually for existing users (or perhaps write a script to do it, if you have a lot of users already set up). Next, create the file /etc/skel/.local/share/applications/torbrowser.desktop with these contents:

[Desktop Entry]
Type=Application
Name=Tor Browser
GenericName=Anonymous Web Browser
Exec=./tor-browser_en-US/start-tor-browser %u
Icon=/usr/local/share/icons/torbrowser128.png
Comment=Browse the Web Anonymously
Terminal=false
X-MultipleArgs=false
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/vnd.mozilla.xul+xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;
StartupWMClass=Firefox-bin
StartupNotify=true


Now copy /etc/skel/tor-browser_en-US/App/Firefox/icons/mozicon128.png  to /usr/local/share/icons/torbrowser128.png. Each new user will get their own copy of the Tor Browser Bundle in their home directory, with a launch icon in the applications menu.

 Tor Browser on the Gnome 3 menu

 Tor Browser on the KDE 4 menu

Tor Browser running on KDE 4

Note that you will have to adjust these directions if your locale is not en-US. As a final caveat, browsing through Tor is slower due to being routed through multiple computers and popular plugins like Flash are disabled for security reasons. But this is the best way to browse the web with a reasonable degree of anonymity.

No comments:

Post a Comment