Skip to content
forktty_
PTY persistence

Keep plain terminal processes alive with dtach.

ForkTTY restores workspace metadata and scrollback by default. For generic terminal panes, optional dtach-backed persistence can keep the real process tree alive when the GTK UI exits and reattach on relaunch.

Quick start

Install dtach through your distro or from source, restart ForkTTY so PATH is refreshed, then confirm broker detection before enabling persistence.

Debian or Ubuntu package
sudo apt update && sudo apt install dtach
Fedora package
sudo dnf install dtach
Universal source fallback
git clone https://github.com/crigler/dtach.git && cd dtach && ./configure && make && sudo make install
Verify ForkTTY sees the broker
forktty capabilities | grep -i pty

Why dtach is needed

The embedded Ghostty GTK ABI does not expose a PTY handoff primitive. ForkTTY therefore uses dtach as a small detach/reattach broker for plain terminal workloads when persistence is explicitly enabled.

What persists

Plain terminal processes such as shells, REPLs, editors, and dev servers can survive a UI restart when dtach is on PATH and persistence is enabled. Agent panes keep using provider resume flows; SSH and browser surfaces are not wrapped.

How to enable it

Install dtach for your distro, restart ForkTTY so it is on PATH, enable Settings > Worktrees > Persist terminal processes, and confirm broker availability with forktty capabilities.

  • Debian/Ubuntu/Fedora/openSUSE/Alpine/Gentoo usually have native packages.
  • Arch/CachyOS users can install from AUR or build upstream dtach from source.
  • Explicit pane close invalidates the broker socket so stale surface ids do not reattach to reused panes.

Questions

Does PTY persistence apply to agent panes?
No. Agent panes use provider-specific resume metadata. The dtach broker is only for plain terminal surfaces.
Is PTY persistence enabled by default?
No. It is opt-in from Settings > Worktrees and only activates when dtach is available.
Does it preserve full scrollback?
It preserves the running process through the broker. ForkTTY also has bounded scrollback replay, but the broker is not a full terminal history database.

Explore related ForkTTY pages

Get the alpha build

AppImage and .deb packages are published on GitHub Releases for Linux x86_64.

View releases