Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Desktop entries with same X-FLATPAK value but different EXEC statement are ignored #248

Open
dd217 opened this issue Oct 25, 2024 · 0 comments

Comments

@dd217
Copy link

dd217 commented Oct 25, 2024

When a Flatpak app uses multiple desktop entries (such as LibreOffice, which has separate files for each component), the launcher only displays the first desktop entry located in ~/.local/share/flatpak/exports/share/applications. This occurs because all desktop entry files have the same X-FLATPAK value, even though the Exec commands differ. This de-duplication behavior change was introduced in commit 8cc0d28.

The relevant code is:

if deduplicator.contains(de.appid.as_ref()) {
    // Treat Flatpak and system apps differently in the cache so they don't
    // override each other
    let appid = de.flatpak().unwrap_or_else(|| de.appid.as_ref());
    if deduplicator.contains(appid) {
        return None;
    }
}

Steps to Reproduce:

  1. Install a Flatpak app with multiple desktop entries (e.g., LibreOffice).
  2. Ensure that the desktop entry files contain different Exec commands but the same X-FLATPAK value. This happens by default with the LibreOffice installation via FlatPak.
  3. Launch the launcher and search for any of the app components listed in separate desktop entry files.
  4. Only the first desktop entry is shown in the launcher, while the others are ignored.

Expected Behavior:

All desktop entries for a Flatpak app with different Exec commands should be displayed individually in the launcher, even if they share the same X-FLATPAK value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant