ManualTerminal
tmux control mode
Run tmux -CC in a chan terminal, locally or over ssh, and work with its windows and panes as Chan windows and panes.
What you can do
- Run
tmux -CClocally or over ssh. Each tmux window opens as a Chan window, with its panes laid out as tmux has them. - Split, resize, and close panes with Chan's shortcuts and Hybrid Nav. tmux does the work and owns the layout.
- Manage the connection from its card on the Computers screen: new window, show, hide, detach.
- Detach and come back later. The tmux server keeps running.
- Script the panes with
cs terminal listandcs terminal write, like any other Chan terminal.
Turn it on and connect
-
Enable tmux control mode
It is off by default. Turn it on in Settings → Terminal → tmux control mode (tmux -CC), or from a terminal. tmux 3.2 or newer is required.
$chan config set terminal.tmux.enabled true -
Start tmux in a Chan terminal
On the local machine:
$tmux -CC new -A -s devOn another machine, over ssh:
$ssh -t user@host tmux -CC new -A -s dev -
Answer the banner, if one shows
A
tmuxyou ran directly connects at once. When another program is in front, such assshor Eternal Terminal'set, a banner names it and asks: Allow, Allow for this tab, or Deny. No answer in 60 seconds is a deny.
To skip the question for a program you run as a habit, list its name under terminal.tmux.trust in server.toml:
[terminal.tmux]
trust = ["ssh", "et"]
Windows and panes
- Each tmux window is a Chan window of its own. Its panes are tmux's panes, split as tmux lays them out.
- The desktop opens the first eight windows at connect; the rest are listed hidden on the card. In a browser, open each window from its row with Open window.
- A pane has no tab strip and no A and B sides. With tabs in the title bar, a
tmuxbadge takes the A/B button's place. - A pane is named after the command running in it:
bashat a prompt,topwhile top runs. - These windows are not saved. They last as long as the connection.
| You do | macOS | Windows, Linux | tmux does |
|---|---|---|---|
| Split right, split down | Cmd+/ Cmd+Shift+/ | Ctrl+Alt+/ Ctrl+Alt+? | Splits the pane. The new pane appears where tmux puts it. |
| New terminal | Cmd+T | Ctrl+Shift+T | Opens a new tmux window, in a Chan window of its own. |
| Click a pane | Makes it the active pane. | ||
| Drag a divider | Resizes its panes. The divider settles where tmux lays it out. | ||
| Hybrid Nav | Cmd+. | Ctrl+. | Nothing until Enter: splits and sizes are previewed, then asked for. Esc drops them. |
| Close a pane | Cmd+W | Ctrl+Shift+W | Kills the pane. |
| Close the window | Cmd+Shift+W | Ctrl+Alt+W | Kills the window. The prompt also offers Detach and Hide. |
The connection's card
A connection is a card on the Computers screen, beside the local machine and your devservers. Its rows are the connection's windows.
| The card is titled | When tmux runs |
|---|---|
tmux -CC on this machine | In a terminal of the local machine. |
tmux -CC on and the devserver's name | In a devserver's terminal. |
tmux -CC from and the command that reached it, such as tmux -CC from ssh -t user@host tmux -CC new -A -s dev | Behind another program, here ssh. |
- t asks tmux for a new window, and o detaches.
- Each row focuses, shows, or hides its window. Hiding the last shown window detaches.
- The terminal that ran
tmux -CCis the connection's control terminal. It takes no typing while connected. It is listed on the card of the machine where it ran, the local machine's or the devserver's, marked buried and with a Detach button, and not on the connection's card.
Detach or end
| You do | The tmux server |
|---|---|
| Detach, from a window's close prompt, from the card, or with o | Keeps running. Its Chan windows close and the card goes. |
| Hide the connection's last shown window | Keeps running. The connection detaches. |
| Select the card with its check, then turn it off or remove it | Ends, with every session it holds. |
| Close the control terminal's window, or exit tmux | The connection ends, and every window it opened closes. |
Details and limits
- Every window attached to the terminal shows the banner, and the first answer wins. A deny writes one newline, which detaches a real tmux.
- A peer that does not answer like tmux, or a tmux older than 3.2, is detached with a note in the terminal.
- Turning the setting off leaves a running connection alone.
tmuxitself is always trusted. - On the desktop the control terminal moves to a hidden control window while connected, and returns as an ordinary terminal window when the connection ends. In a browser it stays a tab in its window.
- A new pane reads as its tmux id, such as
tmux %3, for about a second, until tmux reports its command. cs terminal listlists the panes in thetmuxgroup. Session names are unique, so two panes at a shell arebashandbash-2there.- A label you give a window in Computers replaces tmux's name for it until you clear the label. It does not last across a reconnect.
- A window moved with tmux's own
move-windoworswap-windowkeeps its Chan window and panes. - A divider between nested splits that no single pane's resize reaches does not drag.
- Hybrid Nav stages no tabs and swaps no tiles in a tmux window, and its Tab does nothing there.