Bug 336489

Summary: when changing desktop file exec on first kickoff starts old entry
Product: [Frameworks and Libraries] frameworks-kservice Reporter: Harald Sitter <sitter>
Component: generalAssignee: KIO Bugs <kio-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: alexkde, bugseforuns, kdelibs-bugs-null, mklapetek, notmart, postix
Priority: NOR    
Version First Reported In: 5.51.0   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Harald Sitter 2014-06-20 11:10:08 UTC
When one changes the command of a desktop entry in plasma5 and tries to launch the application via kickoff it will start the old command. A logout and login fixes this and makes kickoff update as expected whenever the command is changed subsequently.
This only appears to affect entirely new sessions.

Reproducible: Always

Steps to Reproduce:
1. get neon5 iso to test
2. boot & login
3. start firefox via kickoff's applications tab (firefox starts -> quit it again)
4. right click on kickoff icon, select edit applications (kmenuedit starts)
5. find firefox in kmenuedit and change the command to e.g. kate
6. try to start firefox via kickoff's application tab again (firefox starts, expected kate -> quit it)
7. change command to e.g. kwrite
8. try to start the firefox entry again (again, firefox starts)....
9. logout & login again
10. try to start the firefox entry via kickoff (kwrite starts)
11. edit the command again, set it to firefox
12. try to start (firefox starts)
Comment 1 Marco Martin 2014-06-20 12:51:12 UTC
As the problem happens on both kickoff and kicker, it really looks like is a sycoca issue.
not emitting databaseChanged when the session started with the xdg folders not exising (and therefore created from scratch)
Comment 2 David Faure 2015-09-20 09:47:24 UTC
I have reworked all this in KF 5.15, there's no DBus signal involved anymore, and apps (like kickoff / kicker) will notice changes on disk automatically. Can you test if this is still an issue with 5.15, and otherwise close the report?
Comment 3 alexkde 2018-10-27 16:46:08 UTC
I could reproduce this bug on Plasma 5.14.2.

Additionally I found that the new updated command is indeed correctly set at the KDE Menu Editor.
Comment 4 alexkde 2018-10-27 16:49:52 UTC
(In reply to alexkde from comment #3)
> I could reproduce this bug on Plasma 5.14.2.
> 
> Additionally I found that the new updated command is indeed correctly set at
> the KDE Menu Editor.

I could not confirm step 11. and 12. from the OT. In my case kwrite still starts.
Comment 5 alexkde 2018-10-27 17:10:56 UTC
I digged a little bit deeper and made the following observations:

1. Set Kate as a favorite app at the Kicker.
2. Right click on Kate -> Change application -> Program
3. Set command to something else, like "dolphin" and press "OK"
4. Click on the Kate's entry at the favorite page

Though the command has changed, Kate still starts.

5. At the Kicker type "Kate" and click on the found Kate's entry

Dolphin now starts.

6. Remove Kate from the favorites and add it again to the favorites

Dolphin now always starts when you click on the Kate's entry from the Kicker's favorite page.