^[control-codes live in libghostty-vt

Operating system commands

OSC I Set Icon (dtterm)

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.

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.