Running Ubuntu 16.04 64-bit, I have installed Tor-Browser from Ubuntu Repository (via terminal). But when I run it, it runs as Firefox. While its icon in dash is its own, when it runs, it shows Firefox icon while switching between windows. On the top panel also it shows Firefox web browser instead of Tor-Browser.

enter image description here

This is the current content of /usr/share/applications/torbrowser.desktop:

[Desktop Entry]
Name=Tor Browser
Comment=Launch Tor Browser
Exec=torbrowser-launcher %u

(the line related to icon is altered by myself)

If I open a normal Firefox window, both Firefox and Tor-Browser appear under Firefox icon.

Before migrating to 16.04, I didn't have this problem in 15.10 in which I installed Tor-Browser from its website.


The issue is caused by the fact that Tor Browser and Firefox share a string in their WM_CLASSS property:

If you open a terminal, type

xprop WM_CLASS

and click on the window of Firefox, you will get:

WM_CLASS(STRING) = "Navigator", "Firefox"

...and with Tor Browser:

WM_CLASS(STRING) = "Navigator", "Tor Browser"

As a result, the firefox.desktop file (and its icon in Unity/Dash) assumes the Tor Browser window is "his".

How to solve

  • Run the command:

    cp '/usr/share/applications/torbrowser.desktop' ~/.local/share/applications && gedit ~/.local/share/applications/torbrowser.desktop

    This will copy the global torbrowser.desktop to ~/.local/share/applications, and subsequently open it with gedit.

  • Now add to the very end of the file the line:

    StartupWMClass=Tor Browser

    Save and close the file. This way, the Tor Browser's .deskop file will recognize its own windows.

  • Log out and back in, and it should be fixed.

    enter image description here

| improve this answer | |
  • Thanks. This solved the problem. More than than, I want to thank you for your excellent explanation. Should I report this as a bug to Ubuntu? – Mostafa Ahangarha May 10 '16 at 16:43
  • 2
    I think it should be reported to the Tor Browser developers, they should alter their WM_CLASS or at least the .desktop file they ship with the browser. Glad it works! – Jacob Vlijm May 10 '16 at 16:44

Before migrating to 16.04, I didn't have this problem in 15.10 in which I installed Tor-Browser from its website.

One thing to try would be to install Tor Browser from the version on their website: https://www.torproject.org/projects/torbrowser.html.en -- that might fix the issue for you.

If you'd like to get this issue fixed in the official Ubuntu package, I'd recommend filing an official Ubuntu bug against the torbrowser-launcher package.

| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.