SetProfile esc code doesn't work - probably disabled.

11 views
Skip to first unread message

Piotr Kolasiński

unread,
Jun 14, 2026, 6:59:21 PM (7 days ago) Jun 14
to iterm2-discuss
I try to change current profile by using ESC sequence 
When I first time run it - the question about access was displayed - but unfortunately I probably clicked "No".

Now when I try to send this sequence -m nothing happens.

Could someone tell  me how to enable this feature?  Or maybe some other reason exists why it doesn't work?

Additionally the description  is probably wrong - there are not semicolons between OSC 1337, SetProfile and \a, like in other cases.


Piotr




George Nachman

unread,
Jun 19, 2026, 3:36:42 PM (3 days ago) Jun 19
to iterm2-...@googlegroups.com
1. Open Settings > Advanced (the gear icon, then the "Advanced" tab).
2. In the search box at the top, type "Prevent control sequences from changing the current profile".
3. Set that option to No.

You're right that it doesn't use semicolons as separators between the parts. The actual format is:

ESC ] 1337 ; SetProfile=ProfileName BEL

or written out: \033]1337;SetProfile=ProfileName\007

There is exactly one semicolon, the standard one right after 1337. After that it's a single key=value pair (SetProfile=ProfileName) terminated by BEL (\a) or ST (ESC \). So unlike OSC sequences that take multiple semicolon-separated arguments, this one has no internal semicolons. A quick test from the shell:

printf '\033]1337;SetProfile=Default\007'

Replace Default with the exact name of the profile you want to switch to.


--
You received this message because you are subscribed to the Google Groups "iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discus...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/iterm2-discuss/81ef29ca-432a-4f69-a94c-5cc534ec890cn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages