tmux with mosh

  • Terminal emulator supporting OSC52
    • iTerm2, Preference -> General -> Applications in terminal may access clipboard
    • mlterm, –osc52=true
  • latest mosh from git (tagged releases are too old, both client and server)
  • latest tmux
  • Override the OSC 52 sequence generated by tmux by adding the following line to your tmux.conf
    • set-option -ag terminal-overrides ",xterm-256color:Ms=\\E]52;c;%p2%s\\7"

Reference

tmux + mosh OSC 52 clipboard paste hack
tmux in practice: integration with the system clipboard