Bug 425537 - For applications with 2 variants of desktop files remembers the wrong one as pinned
Summary: For applications with 2 variants of desktop files remembers the wrong one as ...
Status: CONFIRMED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Task Manager and Icons-Only Task Manager widgets (show other bugs)
Version: master
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Eike Hein
URL:
Keywords:
: 435923 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-08-19 10:27 UTC by Bart Ribbers
Modified: 2025-01-29 23:30 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
The desktop file causing the mentioned problems (257 bytes, application/x-desktop)
2020-08-19 10:27 UTC, Bart Ribbers
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bart Ribbers 2020-08-19 10:27:42 UTC
Created attachment 130995 [details]
The desktop file causing the mentioned problems

SUMMARY
On my system Firefox provides 2 .desktop files: a regular one and a "Safe mode" on. I only ever want to launch the regular one except for very specific cases, so I pinned that one to my Latte dock. However, if I quit the application, then Latte for some reason has the "Safe mode" variant pinned. If I launch Firefox via the regular .desktop through for example KRunner then it does use the pinned entry for the launched application.

STEPS TO REPRODUCE
1. Add the attached desktop file to your system in either /usr/share/applications or $HOME/.local/share/applications
2. Pin "normal" Firefox to the Latte dock
3. Quit Firefox

OBSERVED RESULT
The pinned entry mentions the "Safe" variant rather than the regular one

EXPECTED RESULT
For it to have pinned the regular variant and not to launch the safe mode


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Alpine Linux edge
KDE Plasma Version: 5.19.4
KDE Frameworks Version: 5.73.0
Qt Version: 5.15.0
Comment 1 Nate Graham 2021-04-21 20:38:57 UTC
*** Bug 435923 has been marked as a duplicate of this bug. ***
Comment 2 Henrique Sant'Anna 2021-05-12 14:47:25 UTC
As reported at Bug 435923, I had installed Firefox Nightly and Firefox stable, than trying to pin Firefox Nightly from (and to) Icons-only Task Manager will pin Firefox stable instead. Also, pinning from launcher (drag and drop) will produce the correct pinned icon (Firefox Nightly), but once the task is started the task manager will create another icon associated to the started Firefox Nightly but with wrong icon (got from Firefox stable).

Trying to workaround this and get more details to this bug report, I removed any Firefox .desktop files from ~/.local/share/applications/, keeping only those in /usr/share/applications/. This didn't help and the problem persisted.

So I uninstalled Firefox stable, to remove /usr/share/applications/firefox.desktop and to leave only /usr/share/applications/firefox-nightly.desktop.

Than, after starting Firefox Nightly from Icons-Only Task Manager, the started task got a new icon from icon task manager, not related to Firefox Nightly, not even Firefox Stable (which was uninstalled), the new task icon was the orange icon from Wayland.
Comment 3 gudvinr+kde 2022-05-04 07:56:43 UTC
I have same issue with desktop shortcuts. Only difference is that I successfully used different shortcuts for different firefox profiles at different activities and mine were working fine until I switched to Wayland. Now if I start firefox it launches correct profile but creates pin for wrong firefox shortcut.
Comment 4 gudvinr+kde 2022-05-13 08:20:22 UTC
What I found so far:

In desktop file I put "StartupWMClass=firefox-whatever".
In command exec string I add "--class firefox-whatever".

In kwin debug consile for firefox window I see "resourceClass firefox".