Skip to content

Fix silent launch failure for apps whose desktop id ends in .desktop (Telegram) - #6418

Merged
dhh merged 2 commits into
basecamp:quattrofrom
glafeara:fix-launch-ids-ending-in-desktop
Jul 29, 2026
Merged

Fix silent launch failure for apps whose desktop id ends in .desktop (Telegram)#6418
dhh merged 2 commits into
basecamp:quattrofrom
glafeara:fix-launch-ids-ending-in-desktop

Conversation

@glafeara

Copy link
Copy Markdown
Contributor

Fix silent launch failure for apps whose desktop id ends in ".desktop" (Telegram)

Problem

Since the quattro shell, Telegram cannot be launched from the app menu at all: selecting it shows the "Launching Telegram…" OSD, then nothing happens. No process is spawned and nothing is logged. Launching /usr/bin/Telegram from a terminal works fine, and reinstalling the package doesn't help (see #6312, closed for lack of detail — this is that bug).

Root cause

AppLibrary.launch() runs gtk-launch <entry.id>. Quickshell's DesktopEntry.id is the desktop file basename with the final .desktop extension stripped, so for Telegram's org.telegram.desktop.desktop the id is org.telegram.desktop.

gtk-launch (both GTK3 and GTK4) only appends the .desktop suffix when the argument doesn't already end with it. Since Telegram's id itself ends in .desktop, gtk-launch treats it as a complete file name and looks for a file literally named org.telegram.desktop, which doesn't exist:

$ gtk-launch org.telegram.desktop
gtk-launch: no such application org.telegram.desktop

$ gtk-launch org.telegram.desktop.desktop   # works

The error is discarded by execDetached, so the failure is completely silent. Telegram is typically the only installed app with a reverse-DNS id ending in .desktop, which is why everything else launches normally.

Fix

Pass the full file name to gtk-launch by appending .desktop to the id. This is unambiguous for both naming styles:

  • bitwardenbitwarden.desktop ✅ (same result as before)
  • org.telegram.desktoporg.telegram.desktop.desktop ✅ (previously broken)

Also adds a regression assertion to test/shell.d/app-search-test.sh.

Testing

  • bash test/shell.d/app-search-test.sh — all 21 assertions pass, including the new one.
  • Verified on an affected machine (Arch, omarchy quattro, telegram-desktop 7.0.6): gtk-launch org.telegram.desktop reproducibly fails, gtk-launch org.telegram.desktop.desktop launches Telegram; with the patched shell the menu launches Telegram again.

gtk-launch only appends the .desktop suffix when the argument doesn't
already end with it. Apps whose desktop id itself ends in .desktop --
notably Telegram (org.telegram.desktop.desktop) -- were therefore looked
up as a nonexistent file and silently failed to launch from the menu,
while every other app worked.

Passing the full file name to gtk-launch resolves the entry
unambiguously for both naming styles.
Copilot AI review requested due to automatic review settings July 28, 2026 18:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a Quickshell app-menu launch failure for desktop entry IDs that themselves end with .desktop (notably Telegram’s org.telegram.desktop), by ensuring gtk-launch receives the actual desktop file name (<id>.desktop) so the correct *.desktop file is resolved.

Changes:

  • Update AppLibrary.launch() to invoke gtk-launch with id + ".desktop" to handle IDs ending in .desktop.
  • Add a shell test assertion to prevent regressions for the *.desktop.desktop resolution case.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
shell/services/AppLibrary.qml Append .desktop when calling gtk-launch so IDs like org.telegram.desktop resolve correctly.
test/shell.d/app-search-test.sh Add regression assertion confirming the launch command uses id + ".desktop".

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread shell/services/AppLibrary.qml Outdated
Comment on lines +81 to +83
// Pass the full file name: gtk-launch only appends ".desktop" when the
// argument doesn't already end with it, so ids that themselves end in
// ".desktop" (e.g. org.telegram.desktop) would otherwise never resolve.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reworded in 432a422 — now says "the file name with its extension".

Copilot AI review requested due to automatic review settings July 28, 2026 18:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

test/shell.d/app-search-test.sh:109

  • The assertion message says "full file name", which can still be read as implying a filesystem path. For consistency with the in-code comment ("file name with its extension"), consider rewording the test message to explicitly mention the extension instead of "full".
  'app library launches by full file name so ids ending in .desktop (org.telegram.desktop) resolve'

@dhh
dhh merged commit fa6b5fc into basecamp:quattro Jul 29, 2026
@glafeara
glafeara deleted the fix-launch-ids-ending-in-desktop branch July 30, 2026 07:42
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

Successfully merging this pull request may close these issues.

3 participants