Repository navigation
Conversation
Ghostty's build substitutes @GhostTy@ in dist/linux/app.desktop.in and dist/linux/dbus.service.in with the absolute path of the build prefix, so the desktop entry shipped in the AppImage points at /__w/ghostty-appimage/ghostty-appimage/ghostty-<ver>/zig-out/bin/ghostty. quick-sharun copies that entry into $APPDIR verbatim (stripping only DBusActivatable), and bundle-appimage.sh then copies zig-out/share/* into AppDir/share after quick-sharun ran, which brings the unsanitized entry back together with a dbus-1 service file aimed at the build machine. Any tool that extracts the embedded entry (appimaged, or a manual copy into ~/.local/share/applications/) gets a TryExec that cannot exist, so the desktop environment hides the entry or fails to launch it (pkgforge-dev#127). Rewrite Exec/TryExec to the binary name the README documents (install ./Ghostty-*.AppImage $HOME/.local/bin/ghostty), drop DBusActivatable and do not ship the unusable dbus-1 service file. Verified against the files extracted from the current tip AppImage (Ghostty-1.3.2-main+a4aacd9, sha256 0ff324551791220ec4a5d41cb562e7f2b272559cfb2c4ff0288a81c911939a57): both entries end up as TryExec=ghostty / Exec=ghostty --gtk-single-instance=true (new-window action included), desktop-file-validate is clean, shellcheck --severity=warning --shell=sh and shfmt -s -d pass. Refs pkgforge-dev#168
Member
|
dbus activation is disabled automatically by quick-sharun: https://github.com/pkgforge-dev/Anylinux-AppImages/blob/aab8d07500fb9972c8e6bb44afd92b8742dc0c92/useful-tools/quick-sharun.sh#L3537-L3539 |
Author
|
Withdrawing this: the DBus part is already handled by quick-sharun for the entry that matters, and my impact claim did not hold (see the analysis in #168). I may follow up with a minimal Exec/TryExec-only patch if the second desktop copy in the image turns out to be unintentional. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
The AppImage ships a desktop entry whose
Exec/TryExecpoint at the CI build directory, plus a D-Bus service file with the same path andDBusActivatable=true:Cause chain:
dist/linux/app.desktop.in/dbus.service.inuse@GHOSTTY@, whichzig buildsubstitutes with the absolute build prefix (inside CI:/__w/ghostty-appimage/ghostty-appimage/ghostty-<ver>/zig-out/bin/ghostty).bundle-appimage.shpasses that generated file asDESKTOP=…; quick-sharun copies it into$APPDIRverbatim and only stripsDBusActivatable.bundle-appimage.shthen doescp -rf ./ghostty-<ver>/zig-out/share/* ./AppDir/share/after quick-sharun, which re-adds the unsanitized entry (share/applications/…desktop, stillDBusActivatable=true) and addsshare/dbus-1/services/…service.Integration tools that extract the embedded entry (appimaged, or a manual copy into
~/.local/share/applications/) therefore get aTryExecthat cannot exist, and KDE/GNOME hide the entry or fail to launch it — the symptom in #127, which is still reproducible on the current tip build.The change
After that
cp, rewrite the absolute paths to the binary name the README documents (install ./Ghostty-*.AppImage $HOME/.local/bin/ghostty), removeDBusActivatable(quick-sharun deliberately strips it from the top level entry; the copy brought it back) and don't ship the unusabledbus-1service file.Verification
Ran the new block against the files extracted from the current tip AppImage (
Ghostty-1.3.2-main+a4aacd9-x86_64, sha2560ff324551791220ec4a5d41cb562e7f2b272559cfb2c4ff0288a81c911939a57):I did not run the full CI build (needs the Arch container); the patch only touches files that are already in
AppDirat that point, and the transformation above is exactly what runs there.Fixes #168. Happy to follow up with a guard in
repo-management.sh validate-appimage(grep -q '/__w/'on the embedded entry → fail) if you want the regression covered by CI as well.