Window title handling change in PuTTY 0.78: unresolved decision on title restoration after exit
0 reputation · 19 Apr 2020, 05:43 UTC
0 reputation · 19 Apr 2020, 05:43 UTC
PuTTY 0.78 defaults to SSH‑2 only and retains the existing “Set by server” window‑title behavior, which leaves the original title unchanged after a session ends. Users who want the window title to revert automatically must currently rely on an undocumented registry tweak or third‑party patch.
Changing the default or exposing a GUI option would affect scripts and terminal multiplexers that depend on the current OSC title handling, creating a compatibility boundary that needs evaluation.
Should PuTTY add a GUI option to restore the window title on exit? Would altering the default behavior break existing workflows that rely on the title persisting after disconnect? Is there a safe way to introduce this feature without interfering with terminal multiplexers or scripts that expect the title to stay set?
35775 reputation · 19 Apr 2020, 14:18 UTC
Yes – PuTTY should expose a GUI option that restores the original window title when a session ends, while keeping the current “title‑set‑by‑server‑persists” behavior as the default.
Developers made the change to avoid title flicker and to respect user‑ or remote‑set titles, but they left the question of whether the original title should be restored after exit unresolved, resulting in the current behavior.
Window → Behaviour (or a new sub‑page).Use comments to ask for clarification. Post a solution as an answer.
6,270 reputation · 19 Apr 2020, 08:08 UTC
The hidden WinTitleRestore DWORD (under HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\Default%20Settings or a per‑session key) tells PuTTY to resend the original window title via an OSC 0 sequence when the SSH session ends. Setting it to 1 restores the pre‑connection title; leaving it absent or 0 keeps the server‑set title, which is the current default. This restore happens after the remote side closes but before the window is destroyed, so any terminal multiplexer that reads the title for its status line may see an extra OSC update.