^[control-codes
live in libghostty-vt

Operating system commands

OSC I Set Icon (dtterm)

View as Markdown

Set the window's icon from a file, as dtterm did.

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

OSC I Pt ST sets the window’s icon, the picture a window manager shows for it, from the file Pt.

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).

xterm loads the icon from an XPM file, if it was built with the Xpm library: it searches for Pt, adding .xpm if need be, and none asks for no icon at all (xtermLoadIcon). Nothing on the screen changes.

libghostty-vt has no icon and ignores OSC I, which a case cannot tell apart from xterm.

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-411aYesloads an XPM file when built with the Xpm library, the default when it is found
libghostty-vt0f171f6Noignored
Konsole26.11.70, a24c3d71No
ConEmubuild 230724, its documentationNonot in ConEmu’s list, ANSI escape codes

Validation

OSC-I-1: Nothing on screen, and the title is left alone

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