^[control-codes
live in libghostty-vt

Operating system commands

OSC L Set Icon Name (dtterm)

View as Markdown

Set the icon name, as Sun's terminals and dtterm did.

OSC L Pt ST
ECMA-48
§8.3.89 OSC – Operating System Command, p. 51
xterm
Operating System Commands

OSC L Pt ST sets the icon name to Pt, as OSC 1 does, and leaves the window title alone.

Sun’s terminals and CDE’s dtterm set the title and the icon with a letter instead of a number, and xterm accepts their forms too: its Control Sequences document lists them in its table of the Sun and dtterm window operations. There is no ;: everything after the letter is the text, a ; included (do_osc).

It is also the form xterm answers in when it reports the icon name, CSI 20 t (see XTWINOPS), though a default xterm refuses that report.

libghostty-vt has no icon name, as the OSC 1 page says, and ignores OSC L. What a case can see, that the title is unchanged, is the same in both.

Support

TerminalVersionSupportNotes
VT220manual, 2nd ed., 1984NoOSC is not among the controls it recognizes (§4.2)
VT510manual, 1st ed., 1993Noignores an OSC string (chapter 4)
xtermpatch 412, xterm-411aYes
libghostty-vt0f171f6Noignored; it has no icon name
Konsole26.11.70, a24c3d71No
ConEmubuild 230724, its documentationNonot in ConEmu’s list, ANSI escape codes

Validation

OSC-L-1: The title is left alone

\e]2;Window\a
\e]LIcon\a
A
|A__|
title "Window"
cursor 1,2
Every example on these pages runs in your browser, in libghostty-vt compiled to WebAssembly.