16

I'm using Ubuntu 17.10 with GNOME shell and Numix-Circle icon theme.

When I hover over the Numix icon for Nightly Web Browser, which is pinned to the dock I get the title "Nightly Web Browser".

enter image description here

But when I launch the program, another icon pops up at the bottom, with the name "Nightly".

enter image description here

25

You need to add a proper StartupWMClass line to the .desktop launcher corresponding to the application (refer to this). Follow these steps:

  1. Open Files and go to your /usr/share/applications folder. Look for the "Nightly" file (i.e. the launcher for the application you want to fix) and copy it.
  2. Paste the file in ~/.local/share/applications. It should look like a file with the name <filename>.desktop.
  3. Right click on this .desktop file and open with Text Editor.
  4. Launch "Nightly" (i.e. the application you want to fix) from "Activities".
  5. Run xprop WM_CLASS in Terminal.
  6. Place the cursor over the opened "Nightly" window. The cursor should turn into a crosshair already. Click. You should get a WM_CLASS string for "Nightly" in Terminal.
  7. In the .desktop file opened in Text Editor and add the following line

    StartupWMClass=OBTAINED-VALUE
    

    In place of OBTAINED-VALUE put a value you got from step 6 without any quotes.

  8. Save the .desktop file.
  • 2
    I am trying to do the same with PyCharm. Got "sun-awt-X11-XFramePeer", "jetbrains-pycharm-ce" as the output for step 6. I used StartupWMClass=jetbrains-pycharm-ce and it works. – d4nyll Jan 11 '18 at 15:59
  • 3
    9. Rename .desktop file to OBTAINED-VALUE.desktop (e.g. jetbrains-phpstorm.desktop instead phpstorm.desktop), works in Ubuntu 18.04 – Aleksey Deryagin Jul 12 '18 at 16:29
  • 1
    Thank you for the answer. It would be really nice to have an explanation of what happens. I don't want to blindly follow some instructions. What is going on and what does the fix do? Would be great if someone could help out. – marts Jan 26 at 12:03
  • 1
    @marts Please go through this for an explanations: askubuntu.com/questions/367396/… – pomsky Jan 26 at 12:05
  • @marts Thanks a lot for pointing it out, I've edited the answer to include this. – pomsky Jan 26 at 12:06

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.