Skip to content

Work around broken Ghostty D-Bus activation so Ghostty launches from the menu - #15780

Closed
ekollof wants to merge 2 commits into
omacom:quattrofrom
ekollof:fix/ghostty-menu-dbus-activation
Closed

ekollof wants to merge 2 commits into
omacom:quattrofrom
ekollof:fix/ghostty-menu-dbus-activation

Conversation

@ekollof

@ekollof ekollof commented Oct 18, 2026

Copy link
Copy Markdown

Fixes #15779.

Problem

After installing Ghostty, launching it from the app menu silently does nothing, while running ghostty from another terminal works. The shipped desktop file sets DBusActivatable=true, so menu launches go through D-Bus activation handled by app-com.mitchellh.ghostty.service --initial-window=false — which never starts (Main process lacks handler for reload signal USR2, refusing service startup, see issue for journal evidence).

Fix

Install a local desktop override (~/.local/share/applications/com.mitchellh.ghostty.desktop) with DBusActivatable=false so launchers run Exec directly, until the packaging is fixed upstream:

  • migrations/1792279674.sh repairs existing installs idempotently (preserves user customizations in an existing override, only touches the DBusActivatable line; no-ops when Ghostty isn't installed or the system file no longer opts into D-Bus activation).
  • omarchy-install-terminal applies the same override for fresh ghostty installs.

Verification

  • Migration tested against temp HOME: fresh install, re-run (idempotent, single DBusActivatable= line), pre-existing customized override (custom Exec preserved), override without the key (appended), Ghostty absent (no-op, exit 0).
  • Resulting desktop file passes desktop-file-validate.
  • ./test/all: the only failures (7 files, incl. default-apps-test.sh) also fail on the clean base tree — pre-existing environment issues, none related to this change.

Live GUI launch could not be exercised from the headless shell used here; the override content matches the manually verified workaround. A screen recording of menu launch is best captured on real hardware.

…the menu

The ghostty package ships DBusActivatable=true with a user service that fails to start, so menu launches silently do nothing while direct Exec works. Install a local desktop override with DBusActivatable=false via migration for existing installs and via omarchy-install-terminal for fresh ones. Fixes omacom#15779.
@greptile-apps

greptile-apps Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; both previous findings are fixed and no new blocking issues were found.

Summary

The PR disables Ghostty’s broken D-Bus launch path through a local desktop override.

  • Ghostty menu launches use the desktop entry’s regular command.

Both previous findings are addressed. No new actionable issues were found. This review checked the code without running the tests or a live menu launch.

Reviews (2) · Last reviewed commit: "Repair existing Ghostty overrides in the..." · Reviewed by Greptile

Comment thread bin/omarchy-install-terminal Resolved
Comment thread migrations/1792279674.sh Resolved
@omarchybot omarchybot added the bug Something isn't working label Oct 18, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Thanks for the detailed report in #15779. The failure is real, but only with Arch extra's Ghostty build. The Ghostty Omarchy ships doesn't have it, so this needs the maintainer to decide whether it should land at all.

What was checked. I tested on a disposable worker built from the Omarchy ISO (systemd 262, uwsm 0.27.0), launching Ghostty the way the app menu does (uwsm-app -- gtk-launch com.mitchellh.ghostty.desktop, from shell/services/AppLibrary.qml:93):

  • With Omarchy's own build (ghostty 1.3.1-3 from the [omarchy] repo, which pacman.conf lists ahead of [extra]), on base quattro with no override, D-Bus activation starts app-com.mitchellh.ghostty.service and a window opens. The bug does not reproduce. This is the package that omarchy install terminal ghostty and pacman -S ghostty install.
  • With Arch extra's ghostty 1.3.1-2 installed explicitly, no window opens, and the journal shows exactly what the issue quotes: lacks handler for reload signal USR2, refusing service startup.
  • With extra's build and this PR's migration applied, the window opens. Re-running the migration is idempotent. Removing the override brings the failure back.
  • ./test/cli passes at c390dea, and so do test/shell.d/default-apps-test.sh, migrate-wrapper-test.sh and migrate-scope-test.sh.

What was found.

  • Scope. Both bin/omarchy-install-terminal:41 and migrations/1792279674.sh:15 act on DBusActivatable=true, which Omarchy's working build carries too. So every Ghostty user gets a permanent copy of the package's desktop file in ~/.local/share/applications, and that copy shadows any later fix to the package's own file. Omarchy's AGENTS.md prefers getting packaging bugs fixed upstream over papering over them. The smaller response would be to find out why this machine has extra's build rather than Omarchy's, and to report the extra build's failure to Arch or Ghostty.
  • Collision with Keep Ghostty terminals in the active working directory #8033 (older, open, aimed at quattro). That PR ships Omarchy's own com.mitchellh.ghostty.desktop, which already has DBusActivatable=false and an Exec without --gtk-single-instance=true. It installs that file only when none exists yet. If this PR lands first, the override it writes keeps --gtk-single-instance=true (bin/omarchy-install-terminal:43, migrations/1792279674.sh:29), so Keep Ghostty terminals in the active working directory #8033's file never reaches those users and its working-directory fix doesn't apply to them. If Keep Ghostty terminals in the active working directory #8033 lands first, it already fixes menu launches for everyone it installs its file for.
  • Greptile's two points: (a) is accurate. install-terminal skips an existing override even if that override still says DBusActivatable=true. (b) is accurate about where the key lands, but it causes no launch failure. That branch only runs when the override has no DBusActivatable key at all, and a missing key already means false.

I pushed nothing: whether this should land is a decision for the maintainer, not a defect to fix.

Second opinion. Codex Medium reviewed the diff and the worker results. It agreed on the scope and the #8033 collision, and independence is not guaranteed. It added one thing: the --gtk-single-instance=true that this override keeps on the command line would also override the gtk-single-instance = false that #8033 writes into the Ghostty config. Neither of us could tell why extra's binary lacks the SIGUSR2 handler when systemd checks for it at startup, while Omarchy's has it.

Next. This waits on the maintainer: land it as a workaround for extra's build, rely on #8033, or close it in favour of an upstream report.

@ekollof

ekollof commented Oct 18, 2026

Copy link
Copy Markdown
Author

Addressed the two concrete override findings in f8dd82c. Installation now repairs an existing local override while preserving custom keys. Both installation and migration use desktop-file-edit to set DBusActivatable=false in the main Desktop Entry group, including when Desktop Action groups follow it. Focused regression coverage exercises the production migration and install branch, preservation of custom Exec/Name, main-group insertion and migration idempotence; it passes.

This does not settle the scope question: the worker reproduced the failure with Arch extra's Ghostty build, while Omarchy's build worked. The overlap with #8033 and its single-instance/working-directory behavior remains for the maintainer to decide. This follow-up does not claim to implement #8033 or fix the package itself.

@omarchybot omarchybot added the verified Omarchy Triage has verified that this issue is ready for final review label Oct 18, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Re-reviewed at f8dd82c. The new commit fixes both override findings from the last round, and I found no new defect. The scope question and the overlap with #8033 are unchanged, so this still waits on the maintainer.

What was checked. I tested on a disposable worker built from the Omarchy ISO, with Arch extra's ghostty 1.3.1-2 installed, launching Ghostty the way the app menu does (uwsm-app -- gtk-launch com.mitchellh.ghostty.desktop):

  • With no override, no window opens, and the journal shows lacks handler for reload signal USR2.
  • After migrations/1792279674.sh, a window opens. The override passes desktop-file-validate, DBusActivatable=false sits in [Desktop Entry] ahead of [Desktop Action new-window], and a second run leaves the file byte-identical.
  • I also tried an existing override with a custom Exec and DBusActivatable=true. The migration set the key to false in the main group, kept the custom Exec, and the window opened.
  • With the override removed, the failure comes back.
  • ./test/cli passes, and so do ghostty-activation-test.sh, default-apps-test.sh, migrate-wrapper-test.sh and migrate-scope-test.sh.
  • desktop-file-edit comes from desktop-file-utils, which gtk4 requires, so it is present wherever Ghostty is.

What was found.

I pushed nothing.

Second opinion. Codex Medium reviewed the delta and the worker results. It found no defect, agreed that the scope and #8033 questions remain, and independence is not guaranteed. It noted two limits of the new test that do not cause a false pass today: the install-branch check looks for DBusActivatable=false anywhere in the file rather than in [Desktop Entry], and a future early exit in the sourced migration would end the test quietly.

Next. The maintainer decides whether to land this as a workaround for extra's build, rely on #8033, or close it in favour of an upstream report.

@ekollof

ekollof commented Nov 2, 2026

Copy link
Copy Markdown
Author

Thanks. I’d keep this as the workaround for Arch extra’s Ghostty build unless the maintainer prefers #8033; Omarchy’s own build doesn’t reproduce it, but extra’s package is what many users have.

@omarchybot omarchybot removed the verified Omarchy Triage has verified that this issue is ready for final review label Nov 17, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Ghostty 1.4.0 fixes the bug this pull request works around, and both Arch extra and Omarchy's repo have shipped it since October 28. I could not reproduce the failure on current quattro with either build, so I took the verified label off. This now waits on the maintainer, and I recommend closing it.

What changed since the last review. The head is still f8dd82c. Two things moved around it:

What was checked. I used a disposable worker built from the Omarchy ISO, with the Omarchy checkout at base quattro 3b36b9e, systemd 262.2, the colour scheme set to prefer-dark, and no override in ~/.local/share/applications. I launched Ghostty the way the app menu does (uwsm-app -- gtk-launch com.mitchellh.ghostty.desktop):

  • Arch extra's ghostty 1.4.0-1, the build that failed every time on 1.3.1-2: 3 of 3 launches opened a window through D-Bus activation. The journal shows only Started Ghostty., with no lacks handler for reload signal USR2.
  • Omarchy's ghostty 1.4.0+omarchy.1: also 3 of 3.

I pushed nothing.

What merging it would do now. Both builds still ship DBusActivatable=true, and that is the only condition migrations/1792279674.sh:15 and bin/omarchy-install-terminal:41 check. So on a current machine, every Ghostty user would get a permanent copy of the package's desktop file, which shadows later packaging changes and has no removal path. A user who already has an override of their own would have its activation setting flipped. The clean-context review also found two conflicts with Omarchy's AGENTS.md: the new test/shell.d/ghostty-activation-test.sh tests a migration, which AGENTS.md asks not to do, and the copy-and-edit block appears twice instead of living in one bin/ helper.

Second opinion. Codex Medium reviewed the diff, the base branch's AGENTS.md and these results. It agreed that the bug is not established on any fully updated build, that the migration and install branch would still act on 1.4.0, and that verified no longer describes the pull request. Its agreement is not guaranteed to be independent. It added that the new test runs extracted snippets against a fixture and never a menu launch, so it would pass even while the reported failure persists.

Next. The maintainer decides whether to close this as superseded by Ghostty 1.4.0, which is my recommendation, or to keep a workaround for unpatched builds someone has pinned. Keeping it would need a version check, a way to remove the override later and the duplicate block moved into one helper. #15779 can close as fixed by the 1.4.0 package update.

@ekollof

ekollof commented Nov 17, 2026

Copy link
Copy Markdown
Author

Closing as superseded. Ghostty 1.4.0 fixes the underlying bug (ghostty-org/ghostty#14399): the 1.3.1 Type=notify-reload startup race with a dark colour scheme is gone. Both Arch extra and Omarchy's package have shipped 1.4.0 since October 28, and omarchybot verified 3/3 menu launches on each build on a current ISO worker. Keeping the workaround would now copy the package's desktop file permanently, shadow later packaging changes, and flip DBusActivatable on existing user overrides, so it no longer earns its place. Thanks for the review.

@ekollof ekollof closed this Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ghostty installed via pacman doesn't launch from the app menu (D-Bus/systemd activation fails), works from a terminal

2 participants