2

I frequently use Tox for communication, in particular the μTox client. I recently switched to Ubuntu from Debian, and am finding it a nice alternative, but I have one constant problem; because I often use μTox, I wish to pin it to the taskbar. I have written a custom .desktop entry and it shows up in the Unity Dash, but because of the way μTox is written, when I click on it in the Dash, it opens first the actual μTox process, but that then hides itself and opens a different window called μTox (Alpha) (version: 0.8.1), meaning I am unable to pin it to the taskbar as it is a child process of the original utox process my .desktop file runs.

So how can I pin μTox to the taskbar?

Jacob Vlijm
  • 85,475

1 Answers1

0

It took me a while before I understood what you actually meant, but here is the answer:

Missing WM_CLASS

When you say:

"when I click on it in the Dash, it opens first the actual μTox process, but that then hides itself and opens a different window called μTox (Alpha) (version: 0.8.1)"

...it is a small misinterpretation of what is happening; there is no second process, but the launcher you created and the application do not "meet" each other in the Unity Launcher. In other words: the home-made launcher does not recognize the window, μTox is calling, as "his".

How to solve

You can simply solve it by including the WM_CLASS to your launcher, so it will correctly recognize the μTox -window:

StartupWMClass=utox

A simple launcher that worked fine here:

[Desktop Entry]
Name=Some Tox
Exec=/home/jacob/Downloads/utox
Type=Application
StartupWMClass=utox

Of course you need to replace the path in the line Exec=/home/jacob/Downloads/utox

...But you might want to include an icon. If so add the line:

Icon=/path/to/toxicon.png

enter image description here

...and your issue should be solved :)

How to find the WM_CLASS?

  • Open a terminal, type

    xprop WM_CLASS
    

    Press Return and click on the μTox window.

enter image description here

Jacob Vlijm
  • 85,475