Summary
On my Omarchy install, the terminal keybind launches Ghostty through xdg-terminal-exec. That uses the Ghostty desktop file, which launches Ghostty with --gtk-single-instance=true.
When I run OpenCode inside tmux from a Ghostty window opened this way, Ghostty can crash. Because it is single-instance mode, all Ghostty windows from that shared process can close.
If I launch Ghostty by typing ghostty in another terminal, the same OpenCode plus tmux flow does not crash.
What I expected
The terminal keybind should launch Ghostty the same way as typing ghostty, or at least should not force a mode that can take down every Ghostty window when one surface crashes.
What happened
The keybind path launches:
/usr/bin/ghostty --gtk-single-instance=true
Typing ghostty launches:
The --gtk-single-instance=true path is the one that crashes all shared Ghostty windows for me.
Reproduction
On Omarchy with Ghostty as the default terminal:
- Press the terminal keybind.
- Run:
- Interact with OpenCode.
- Ghostty can crash. In single-instance mode, other Ghostty windows from the same process can close too.
Direct launch works:
Then:
This does not crash for me.
Evidence
Omarchy keybind uses xdg-terminal-exec:
$terminal = uwsm-app -- xdg-terminal-exec
bindd = SUPER, BACKSPACE, Terminal, exec, $terminal --working-directory="$(omarchy-cmd-terminal-cwd)"
xdg-terminal-exec --print-cmd returns:
/usr/bin/ghostty
--gtk-single-instance=true
The selected desktop file is:
/usr/share/applications/com.mitchellh.ghostty.desktop
It has:
Exec=/usr/bin/ghostty --gtk-single-instance=true
Local workaround
I added a user desktop file override:
~/.local/share/applications/com.mitchellh.ghostty.desktop
With:
Exec=/usr/bin/ghostty
DBusActivatable=false
After that, xdg-terminal-exec --print-cmd returns:
Now the terminal keybind works and the OpenCode plus tmux flow is stable.
Versions
Omarchy on Arch Linux
Hyprland on Wayland
Ghostty 1.3.1-arch2
tmux 3.6a
OpenCode 1.14.25
Related
I also opened a Ghostty discussion because Ghostty should not segfault either:
ghostty-org/ghostty#12460
Summary
On my Omarchy install, the terminal keybind launches Ghostty through
xdg-terminal-exec. That uses the Ghostty desktop file, which launches Ghostty with--gtk-single-instance=true.When I run OpenCode inside tmux from a Ghostty window opened this way, Ghostty can crash. Because it is single-instance mode, all Ghostty windows from that shared process can close.
If I launch Ghostty by typing
ghosttyin another terminal, the same OpenCode plus tmux flow does not crash.What I expected
The terminal keybind should launch Ghostty the same way as typing
ghostty, or at least should not force a mode that can take down every Ghostty window when one surface crashes.What happened
The keybind path launches:
Typing
ghosttylaunches:The
--gtk-single-instance=truepath is the one that crashes all shared Ghostty windows for me.Reproduction
On Omarchy with Ghostty as the default terminal:
Direct launch works:
Then:
This does not crash for me.
Evidence
Omarchy keybind uses
xdg-terminal-exec:xdg-terminal-exec --print-cmdreturns:The selected desktop file is:
It has:
Local workaround
I added a user desktop file override:
With:
After that,
xdg-terminal-exec --print-cmdreturns:Now the terminal keybind works and the OpenCode plus tmux flow is stable.
Versions
Related
I also opened a Ghostty discussion because Ghostty should not segfault either:
ghostty-org/ghostty#12460