Bug 495405

Summary: Session desktop files leftover after removing Kate distro package
Product: [Applications] kate Reporter: Justin Zobel <justin>
Component: sessionsAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED INTENTIONAL    
Severity: normal CC: christoph, waqar.17a
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Justin Zobel 2024-10-27 01:04:09 UTC
So I noticed an issue on my PC today with Kate. I removed it using my package manager but there's still a menu entry for it, confused I looked and found ~/.local/share/applications/org.kde.kate.desktop and this is a problem because kate is no longer installed and it calls Exec=kate -b %U

It's because I have a default session set I think? 

So is there a way we can do sessions without this left over desktop file that is now broken?

A note as well, I removed Kate from my distro packages as I wanted to run it instead from git master and installed the nightly Flatpak which isn't listed in my app launchers because of this file taking precedence.
Comment 1 Christoph Cullmann 2024-10-31 22:11:50 UTC
I don't think that will work as that file is needed for this feature:

commit f31ab88fc109dd09b6666e8d3146799b047da74f
Author: Kai Uwe Broulik <kde@privat.broulik.de>
Date:   Mon Nov 27 11:16:51 2017 +0100

    Add Sessions as jump list actions
    
    This adds Kate sessions as jump list actions that allow to launch Kate with a specific session from application launchers and task manager.
    
    CCBUG: 383249
    
    Differential Revision: https://phabricator.kde.org/D7203
Comment 2 Justin Zobel 2024-11-01 07:11:12 UTC
That is really unfortunate as it kills Kate opening at all if the user were to switch from Kate from their distro to Kate from a Flatpak.

Only because I know those .desktop files are there did I know to remove them to fix it launching.
Comment 3 Waqar Ahmed 2024-11-01 07:16:17 UTC
I dont think we can do anything about this.
Comment 4 Christoph Cullmann 2024-11-03 16:06:09 UTC
Can not see how we shall solve that. We need the desktop file for that feature and I see no way that we could clean it up.