| title | tmux session/window names → KDE Konsole tabs (incl. nested tmux) |
|---|---|
| description | How to make tmux's current session and window name show up live in the KDE Konsole tab, including the nested case where an outer tmux ("ubertmux") wraps an inner tmux. |
| last-updated | 2026-05-07 |
Make Konsole's tab text track the current tmux session | window, live, even when an outer tmux (e.g. ubertmux) wraps an inner tmux.
- Konsole tab shows e.g.
work | editorinstead ofbash/tmux/ a stale program name. - Switching session or window inside (inner) tmux updates the Konsole tab immediately.
- Works through one layer (Konsole → tmux) and through two layers (Konsole → outer tmux → inner tmux).
1. Inner tmux — ~/.tmux.conf:
set -g set-titles on
set -g set-titles-string "#S | #W"2. Outer / nested tmux (only if you run tmux-inside-tmux, e.g. ubertmux) — its config:
set -g set-titles on
set -g set-titles-string "#T"
set -g automatic-rename-format '#{?#{==:#{pane_title},},#{pane_current_command},#{pane_title}}'3. Konsole — Settings → Edit Current Profile → Tabs:
- Tab title format:
%w : %d : %n - Remote tab title format:
%w (%H/%u)
%w is the placeholder for the OSC title that tmux sends. Without %w Konsole silently ignores everything tmux emits.
printf '\e]2;HELLO_KONSOLE\a'If the tab does not change to HELLO_KONSOLE, your Konsole profile is missing %w — fix that before debugging tmux.
tmux emits an OSC escape (ESC ] 2 ; <text> BEL) whenever its rendered set-titles-string changes. Konsole captures that as the window title and renders it in the tab via %w. In the nested case, an outer tmux also captures the inner OSC as the pane's pane_title (#T) — so the outer can re-emit #T upward and reuse #T as its own window-tab name, preserving the inner identity through both layers.
10-inner-tmux.md— inner tmux config + format choices.20-outer-tmux-nested.md— propagation through a wrapping outer tmux.30-konsole-profile.md— Konsole profile tab-title format codes.KDE-Konsole-Tab-Naming-claude.md/...-perplexity.md— original AI-conversation sources kept for provenance.
- shibuido/ubertmux — the outer-tmux setup this gist's nested case is written for. The
20-outer-tmux-nested.mdfile documents the OSC-propagation config that pairs with it.