OSC I Set Icon (dtterm)
Set the window's icon from a file, as dtterm did.
OSC I Pt ST
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
| Terminal | Version | Support | Notes |
|---|---|---|---|
| VT220 | manual, 2nd ed., 1984 | No | OSC is not among the controls it recognizes (§4.2) |
| VT510 | manual, 1st ed., 1993 | No | ignores an OSC string (chapter 4) |
| xterm | patch 412, xterm-411a | Yes | loads an XPM file when built with the Xpm library, the default when it is found |
| libghostty-vt | 0f171f6 | No | ignored |
| Konsole | 26.11.70, a24c3d71 | No | |
| ConEmu | build 230724, its documentation | No | not 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