How to create a Tor Browser shortcut for both runner and menu?

This is what I did, already:

tar -xf tor.tar.xz
mv tor-browser_en-US ~/.local/share/tor

After that, I tried creating the shortcut in two different ways. Both of them resulted in the same error:

first attempt

ln -s $HOME/.local/share/tor/start-tor-browser.desktop $HOME/.local/share/applications/start-tor-browser.desktop

second attempt

~/.local/share/tor/start-tor-browser.desktop --register-app

Both methods creates an icon, indeed. Although, Tor Browser won't open, at all.

This is the output, when I try to run start-tor-browser.desktop directly from the terminal:

cd ~/.local/share/applications
./start-tor-browser.desktop
/usr/bin/env: ‘./Browser/execdesktop’: No such file or directory

Update

This is the content of start-tor-browser.desktop:

#!/usr/bin/env ./Browser/execdesktop
#
# This file is a self-modifying .desktop file that can be run from the shell.
# It preserves arguments and environment for the start-tor-browser script.
#
# Run './start-tor-browser.desktop --help' to display the full set of options.
#
# When invoked from the shell, this file must always be in a Tor Browser root
# directory. When run from the file manager or desktop GUI, it is relocatable.
#
# After first invocation, it will update itself with the absolute path to the
# current TBB location, to support relocation of this .desktop file for GUI
# invocation. You can also add Tor Browser to your desktop's application menu
# by running './start-tor-browser.desktop --register-app'
#
# If you use --register-app, and then relocate your TBB directory, Tor Browser
# will no longer launch from your desktop's app launcher/dock. However, if you
# re-run --register-app from inside that new directory, the script
# will correct the absolute paths and re-register itself.
#
# This file will also still function if the path changes when TBB is used as a
# portable app, so long as it is run directly from that new directory, either
# via the shell or via the file manager.
[Desktop Entry]
Type=Application
Name=Tor Browser
GenericName=Web Browser
Comment=Tor Browser is +1 for privacy and −1 for mass surveillance
Categories=Network;WebBrowser;Security;
Exec=sh -c '"/home/personal/.local/share/tor/Browser/start-tor-browser" --detach || ([ ! -x "/home/personal/.local/share/tor/Browser/start-tor-browser" ] && "$(dirname "$*")"/Browser/start-tor-browser --detach)' dummy %k
X-TorBrowser-ExecShell=./Browser/start-tor-browser --detach
Icon=/home/personal/.local/share/tor/Browser/browser/chrome/icons/default/default128.png
StartupWMClass=Tor Browser
4

1 Answer

I got this working by doing the following:

Go to the to directory where your unpacked browser is, e.g.

cd /opt/tor-browser-linux64-10.5.8_de/tor-browser_en

Then execute

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

This will copy start-tor-browser.desktop to ~/.local/share/applications

Now move it manually to ~/Desktop

It appears on your desktop now. Right click to make it executable. Try if it is basically working by starting the browser. If yes, move it back to ~/.local/share/applications and press the "option (Windows)" key on your keyboard to launch the app launcher view of Ubuntu. Start typing "tor" => the Tor Browser will appear. Launch it, then it will appear it in the left sidebar. Right click on the icon and add it to the favorites. That's it.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like