Score:0

Click on Ubuntu 21.04 icons (left navigation) opens new icon rather than adding a red dot

us flag

My OS:

Distributor ID: Ubuntu
Description:    Ubuntu 21.04
Release:        21.04
Codename:       hirsute

Note that I do not use the Wayland display server protocol that's used by default by Ubuntu 21.04. Since this is apparently buggy in the current version I had to switch back Xorg. How that's done is described here.

In Ubuntu's navigation on the left every new instance of a program is indicated by another red bullet next to it, so the number of bullets tells how many instances are open. In case of thunderbird, for example, every new email window also gets another dot. For some programs (like kile, but also others) that does however not seem to work as shown here:

bug for kile

You can see that the kile program icon (in blue) which is part of the navigation -- and onto which I clicked to open it! -- does not show any red bullets. Instead it opens another instance (which correctly gets the red dot), and this one uses a default icon. Clearly that's a bug/wrong! How can this be resolved? As said, this behavior is not specific to kile, it also happens with others.

Please also note that this seems (extremely) closely related to the following StackOverflow post, though that one also does not have any answer (and although it's also in Ubuntu 21.04, it seems to still use Wayland). I do not regard it a duplicate, since there are differences: That post talks about this phenomenon when creating a new starter on the desktop, which is not what I did. I just click on the correct icon in the navigation. (And as said: I deactivated Wayland, which the other user apparently didn't.)

What's causing that and how can it be fixed?

user535733 avatar
cn flag
What's typically causing it is either the .desktop file provided by the package or the image that the .desktop file points to. It's fairly easy for you to fix for yourself once you check those tow items. If you discover the details of the problem, be sure to file a proper bug report so you can get it fixed for everybody.
Prof.Chaos avatar
us flag
Thank you for the hint! Once I found time to look into what you said and I fixed it I'll post an official bug report as suggested (on top of answering the question here and the one I linked).
Prof.Chaos avatar
us flag
I think I have to bail.^^ I've checked out the kile.desktop in /usr/share/applications -- but I don't see what should be wrong with it. There's a line Icon=Kile, but I can't tell whether this is right since I've no clue how my OS knows what that means, i.e., where to look for this file called "Kile". Any idea?
Prof.Chaos avatar
us flag
Furthermore, I think there are actually two issues: one is that the new instance of the program has a wrong symbol, and the other one is that it opens a new instance instead of just putting a red dot next to it. So I'm pretty much clueless what to look for in that regard. One idea: I'm not sure but it could be that opening a new instance happens for exactly those entries which I added via alacarte (but not sure).
Prof.Chaos avatar
us flag
Just for the sake of completeness: here the file: [Desktop Entry] Type=Application Exec=kile %U Icon=/home/ProfChaos/icons/Kile.svg X-DocPath=kile/index.html Comment=(La)TeX development environment Terminal=false Name=Kile GenericName=LaTeX Frontend MimeType=text/x-tex;text/x-kilepr; Categories=Qt;KDE;Office;Publishing; X-DBUS-ServiceName=net.sourceforge.kile (Just to be save I've replaced the symbol with an absolute path to an existing file.)
Score:1
us flag
  1. Install the xprop tool if you don't have it.

    sudo apt install x11-utils
    
  2. Get the WM Class of your Kile application.

    Launch Kile.

    Open a terminal, and execute the following:

    xprop | grep WM_CLASS
    

    The cursor will change to a cross ("+") shape. Click on the headerbar of your Kile window with this cursor.

    In the terminal, y ou will see an output like:

    WM_CLASS(STRING) = ...
    

    Note this value.

  3. Update your *.desktop file.

    In the terminal, execute:

    sudo nano /usr/share/applications/org.kde.kile.desktop
    

    Scroll to the end of the file, press Enter to add a new line, and type the following. Replace <WM_CLASS> with the value you noted from step 2.

    StartupWMClass=<WM_CLASS>
    

    Press CtrlX, then Y, and then Enter to save your changes and exit the Nano editor.

Now, when you launch Kile, you will see one icon in the dock (multiple) indicators for running instances.

Score:0
us flag

Solved! I realized that this is actually a duplicate of this question about duplicate items.

Well, I don't need to say much because the solution provided by pomsky is absolutely perfect! Just follow his detailed step-by-step instruction and everything works. :)

(Let me know in the comments if you believe that I should copy his instruction in here again.)

Prof.Chaos avatar
us flag
(I just flagged my question as a duplicate.)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.