Skip to content

feat: add Ghostty as a supported SSH/Telnet terminal on macOS - #351

Open
Wisdom12333 wants to merge 1 commit into
jumpserver:devfrom
Wisdom12333:pr@dev@feat_ghostty_terminal
Open

feat: add Ghostty as a supported SSH/Telnet terminal on macOS#351
Wisdom12333 wants to merge 1 commit into
jumpserver:devfrom
Wisdom12333:pr@dev@feat_ghostty_terminal

Conversation

@Wisdom12333

Copy link
Copy Markdown

Summary

  • Add a new built-in macOS plugin for Ghostty alongside the existing Terminal.app, iTerm2, and SecureCRT options under Settings → 应用配置 → 命令行连接 → SSH.
  • Ghostty exposes no "do script" AppleEvent like Terminal.app/iTerm2, and driving it via open -na --args -e only cold-starts cleanly once — a second connection while it's already running triggers a native "Allow Ghostty to execute...?" confirmation and, if approved, opens a broken extra tab. The SSH launch path (go-client/pkg/awaken/awaken_darwin.go) instead drives Ghostty through its own AppleScript dictionary (new surface configuration / new tab in ... with configuration / new window with configuration), which works identically whether Ghostty is cold or already running, with no confirmation dialog.
  • Repeat connections check the existing window count so they land as a new tab in the current window rather than opening a new window each time.
  • Adds the plugin manifest/connect config/icon (plugins/macos/macos.ghostty/), registers it in plugins/macos/index.json, wires up the Settings UI icon, and updates README/README_CN/docs to mention Ghostty as a supported terminal.

Test plan

  • go build ./... && go vet ./... && go test ./... in go-client — all pass
  • cargo check --release in src-tauri — clean (only pre-existing, unrelated warnings)
  • Manually built and ran the full .app locally (Tauri release build) and verified against a real JumpServer server:
    • Cold start: connecting via SSH opens exactly one Ghostty window with one tab, and the SSH session connects correctly (not a local shell)
    • Warm state: a second connection while Ghostty is already open adds a new tab to the same window, with no "Allow Ghostty to execute" dialog and no broken/duplicate tab
    • A failed/fast-exiting SSH command keeps the surface open (via "wait after command") instead of instantly closing

Adds a new built-in macOS plugin for Ghostty alongside Terminal.app and
iTerm2. Ghostty has no "do script" AppleEvent, so the SSH launch path
drives it through its own AppleScript dictionary instead of `open -na
--args`, which avoids a security confirmation dialog and a broken extra
tab that appear once Ghostty is already running. Repeat connections
land as tabs in the existing window instead of new windows.
@Wisdom12333

Copy link
Copy Markdown
Author
Snipaste_20260727_1148 Snipaste_20260727_1149

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.

1 participant