Bug 403983 - Launchers from alternative locations(e.g. ~/Desktop) are not identified correctly, duplication of windows etc.
Summary: Launchers from alternative locations(e.g. ~/Desktop) are not identified corre...
Status: CONFIRMED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Task Manager and Icons-Only Task Manager (show other bugs)
Version: 5.23.90
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Eike Hein
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-06 06:13 UTC by Andrew Shark
Modified: 2023-04-11 21:32 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
gimp app in the task manager (41.84 KB, image/png)
2022-01-30 18:55 UTC, galder
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Shark 2019-02-06 06:13:59 UTC
SUMMARY
In some cases we can see that application's pinned icon is independent from its launched icon. It happens when you used desktop file from non-standard  location (i.e. not from /usr/share/applications). Adding StartupWMClass=something to desktop file does not solve the problem.

STEPS TO REPRODUCE
1. cp /usr/share/applications/gimp.desktop $HOME/Desktop/gimp.desktop
2. chmod +x $HOME/Desktop/gimp.desktop
3. drag the gimp.desktop file on Desktop and drop it to latte dock
4. launch gimp

OBSERVED RESULT
When gimp starts, another icon will appear in dock

EXPECTED RESULT
Pinned icon should be highlighted, second icon should not be appeared

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.14.5
Qt Version: 5.12.1
KDE Frameworks Version: 5.54.0
latte-dock 0.8.5-1

ADDITIONAL INFORMATION
Second icon appears pixelated, but it is another bug.
Comment 1 Michail Vourlakos 2019-02-06 06:45:02 UTC
(In reply to Ashark from comment #0)
> EXPECTED RESULT
> Pinned icon should be highlighted, second icon should not be appeared
> 

1. are you sure this should happen?
2. Latte is not using its own mechanism to support launchers and their identification, it uses plasma libtaskmanager. That means that you should be able to reproduce this with plasma taskmanagers as well

From my knowledge launchers can be placed only at two official places:

/usr/share/applications (global)
~/.local/share/applications (home folder)

and at the same time the home folder desktop files have higher priority that the global folder
Comment 2 Andrew Shark 2019-02-06 07:21:43 UTC
1. I expect this as a user point of view. But not sure what is developers point of view.
2. Yes, actually it is reproducible with standard panel.
2.1. cp /usr/share/applications/gimp.desktop $HOME/Desktop/gimp.desktop
2.2. chmod +x $HOME/Desktop/gimp.desktop
2.3. drag the gimp.desktop file on Desktop and drop it to taskbar
2.4. launch gimp
Gimp pinned icon will still be there while gimp is started.
If we replace that "desktoped" icon with "global" icon, it would be disappeared while gimp is running.
Note: we are speaking about pinning desktop files. It is possible to place gimp widget there which is always shown and it is normal.
Comment 3 galder 2022-01-30 15:48:49 UTC
Looks like an old issue. Setting it to needs more info.
Please try with a newer version(plasma 5.23.5) and if this is not an issue any more let us know.
Bugs placed into NEEDSINFO status will receive a reminder if the ticket:

    Is at least 15 days old
    Has not received any comment within 15 days

If a bug remains in NEEDSINFO for another 15 days with no comment, it will be closed as RESOLVED > WORKSFORME.
If a bug remains in NEEDSINFO with a comment provided within less than 15 days, no action will be taken (as it does not meet the above criteria).
Comment 4 Andrew Shark 2022-01-30 17:48:46 UTC
Still fully reproducible. Both with standard panel and with latte dock.
I am not using latte dock currently, but I installed it to check. The KDE Plasma version is 5.23.90.
Comment 5 galder 2022-01-30 18:29:54 UTC
I tried with latest stable 5.23.5
Im using snap gimp version
cp /var/lib/snapd/desktop/applications/gimp_gimp.desktop  $HOME/Desktop/gimp.desktop
chmod +x $HOME/Desktop/gimp.desktop
open gimp
pin  gimp in task manager
I don't see any duplicated icon

Regards
Galder
Comment 6 galder 2022-01-30 18:55:38 UTC
Created attachment 146079 [details]
gimp app in the task manager
Comment 7 Andrew Shark 2022-01-30 19:03:06 UTC
See video for reproducing: https://www.youtube.com/watch?v=i0VDTfSmSyY
Comment 8 galder 2022-01-30 23:14:45 UTC
Hello
thanks for video.
I can reproduce the issue. 
It looks like only happens when:
 gimp icon is dragged to the task manager or Latte.
It doesn't happen when:
gimp has been opened directly from that icon and then manually is pinned to task manager or latte
 or
when the application is directly pinned from the main menu.

It seem that the application is set as no icon app  launcher but is missing some metadata and works like a normal icon launcher.

I hope this helps developers to reproduce the issue.

Regards
Galder
Comment 9 galder 2022-01-30 23:16:22 UTC
I can reproduce in current master plasma 5.24.80