Ghostty + tmux
Configuration Guide
Complete setup guide for running tmux inside Mitchell Hashimoto's Ghostty terminal emulator — featuring Metal GPU rendering, Kitty graphics passthrough, terminfo SSH fixes, and OSC 52 clipboard sync.
24-bit RGB True Color & Terminfo Setup
Configure Metal GPU 24-bit RGB truecolor rendering and Kitty keyboard/graphics passthrough.
# Enable full 24-bit truecolor support in tmux for Ghostty
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",*256col*:Tc"
set -ga terminal-overrides ",xterm-ghostty:Tc"
# Enable Kitty/Sixel image graphics passthrough (Yazi / Chafa / Timg)
set -g allow-passthrough on
set -ga update-environment TERM
set -ga update-environment TERM_PROGRAM
# Enable Kitty Progressive Keyboard Protocol (Ctrl+Shift+Key shortcuts)
set -s extended-keys on
Optimized Ghostty Configuration & Auto-Launch
Native configuration file settings for clean font rendering, clipboard permissions, and automatic tmux attachment.
# Ghostty + Tmux Production Configuration
font-family = "JetBrains Mono"
font-size = 14
font-thicken = true
theme = "dark"
# Terminfo & Clipboard Permissions
term = "xterm-ghostty"
clipboard-write = allow
clipboard-read = allow
clipboard-paste-protection = false
# Auto-start or attach to tmux session 'dev' on open
command = tmux new-session -A -s dev
# Window & Cursor Tuning for Tmux Status Bars
window-padding-x = 4
window-padding-y = 4
cursor-style = block
cursor-style-blink = false
# Keybindings & Meta Key Forwarding
macos-option-as-alt = true
keybind = super+ctrl+f=toggle_fullscreen
Fixing Remote SSH `xterm-ghostty` Terminfo
Compile and export local Ghostty terminfo definitions to remote Linux servers to avoid terminal rendering bugs.
# Export local xterm-ghostty terminfo to remote SSH server
$ infocmp -x xterm-ghostty | ssh user@remote-host "tic -x -"
OSC 52 System Clipboard Synchronization
Synchronize tmux copy buffer directly to system clipboard across SSH connections without external helpers.
# Enable OSC 52 clipboard synchronization
set -s set-clipboard on
# Use vi keybindings in copy mode
setw -g mode-keys vi
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel
Ghostty Standalone vs cmux (Ghostty GUI)
Understanding when to use raw terminal multiplexing vs native macOS AI agent workspaces.
⚡ Ghostty + tmux CLI
Run native cross-platform terminal sessions across local macOS and remote SSH Linux servers with persistent session detach/attach.
🤖 cmux GUI Workspace
Native macOS graphical window built on Ghostty's engine, tailored for coordinating multiple parallel AI agents (Claude Code, Cursor, Aider). Read our cmux vs tmux comparison guide →
Frequently Asked Questions
Common setup questions regarding Ghostty and tmux integration.
What terminfo should I set for Ghostty with tmux?
Inside ~/.tmux.conf, set default-terminal "tmux-256color". In Ghostty (~/.config/ghostty/config), set term = "xterm-ghostty" or fallback to xterm-256color.
How do I fix unknown terminfo on remote SSH servers?
Execute infocmp -x xterm-ghostty | ssh remote-host "tic -x -" to compile Ghostty's terminal definition file into the remote host's ~/.terminfo/ directory.
Does Ghostty support Kitty graphics image previews in tmux?
Yes. Set set -g allow-passthrough on in your ~/.tmux.conf to enable terminal image preview tools like Yazi, Chafa, and Timg inside tmux panes.
Explore Related Documentation
Deepen your tmux integration knowledge with these related guides.
Claude Code in tmux →
Orchestrate persistent AI agent subshells, logging, and 3-pane developer layouts.
Mastering ~/.tmux.conf →
Build custom status bar colors, border indicators, and keybinding shortcuts.
iTerm2 Integration Guide →
Compare native iTerm2 Control Mode (tmux -CC) with standard CLI multiplexing.