Skip to content

Linux/Flatpak: "Flatpak launcher repair" writes a .desktop with an invalid Exec that hides the app from GNOME (no taskbar icon, missing from app grid) #662

Open

Description

@luicfrr

Is there an existing issue for this problem?

  • I have searched the existing issues

CrealityPrint Version

7.3.1.6378

Operating System (OS)

Linux

OS Version

Fedora Linux 45, GNOME Shell 51.1 (Wayland), Flatpak 1.18.4

Additional system information

CPU: Intel Core 7 150U
Memory: 16 GB
Display Card: Intel integrated graphics (Mesa 26.2.6)
Package: Flatpak, app ID io.github.crealityofficial.CrealityPrint (runtime org.gnome.Platform//51)

Printer

N/A (not printer-related, happens at application startup)

How to reproduce

  1. Install CrealityPrint 7.3.1.6378 as a Flatpak with app ID io.github.crealityofficial.CrealityPrint (any package where FLATPAK_ID is set at runtime).
  2. Launch the app once.
  3. Open ~/.local/share/applications/io.github.crealityofficial.CrealityPrint.desktop.
  4. Look at the running window in the GNOME taskbar/dock, and search for CrealityPrint in the app grid.
  5. Optional, to confirm that GIO no longer lists the app:
    python3 -c "import gi; gi.require_version('Gio','2.0'); from gi.repository import Gio; print([a.get_id() for a in Gio.AppInfo.get_all() if 'creality' in a.get_id().lower()])"

Actual results

On every start the "Flatpak launcher repair" code writes this file (same desktop ID as the one exported by Flatpak, but in a higher-priority directory):

Exec=././/bin/flatpak run --branch=master --arch=x86_64 --command=entrypoint --file-forwarding io.github.crealityofficial.CrealityPrint @@u %U @@
  • ././/bin/flatpak is a relative path that doesn't exist, so GIO rejects the entry.
  • Because it has the same desktop ID, it also shadows the valid Flatpak export in /var/lib/flatpak/exports/share/applications/. g_app_info_get_all() returns no CrealityPrint entry at all (the python check above prints []).
  • GNOME Shell therefore cannot associate the window (app_id "CrealityPrint", sandboxed app ID io.github.crealityofficial.CrealityPrint) with any app. The taskbar shows a generic button without icon, and the app disappears from the app grid.
  • --branch=master and --command=entrypoint are hard-coded and don't match the installed package (branch stable, different command), so the crealityprintlink:// handler declared in this file can never work either.

The template is hard-coded in the binary (strings bin/CrealityPrint):

FLATPAK_ID
Flatpak launcher repair failed to open desktop file:
[Desktop Entry]
...
Exec=././/bin/flatpak run --branch=master --arch=x86_64 --command=entrypoint --file-forwarding

Expected results

Running inside Flatpak should not break the desktop integration that Flatpak already provides:

  • Preferably, skip the "launcher repair" entirely when running under Flatpak. The desktop file, icons and MIME/URL-scheme handlers are exported by Flatpak from the manifest.
  • If it is kept: don't write anything when an exported desktop file with the same ID already exists, and build a valid Exec (absolute host path /usr/bin/flatpak, branch/arch/command read from /.flatpak-info instead of hard-coded master/entrypoint).

Project file & Debug log uploads

Project file: not applicable (happens at startup, no project involved).

Log file attached. With the bad file replaced by a symlink to the Flatpak export, the app logs on every start:
[warning] Flatpak launcher repair failed to open desktop file: ~/.local/share/applications/io.github.crealityofficial.CrealityPrint.desktop

crealityprint-log.zip

Checklist of files to include

  • Log file
  • Project file

Anything else?

Workaround: replace the generated file with a symlink to the Flatpak export. From inside the sandbox the target doesn't exist, so the app can't overwrite it:

ln -sfn /var/lib/flatpak/exports/share/applications/io.github.crealityofficial.CrealityPrint.desktop
~/.local/share/applications/io.github.crealityofficial.CrealityPrint.desktop

After that the app is listed by GIO again and the taskbar button shows the proper icon.
Related but different: #656 (StartupWMClass in the AppImage desktop entry, X11).

Activity

  1. added
    bug
    on Nov 13, 2026
  2. tuzzmaniandevil commented on Nov 29, 2026

    @tuzzmaniandevil

    @hemiao2023 Any chance we can get this fix in asap?

  3. luicfrr commented on Nov 29, 2026

    @luicfrr
    ContributorAuthor

    I have a flatpak build with this fix and a lot of other fixes included. Take a look into #661

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions