1

I use xterm that comes with XQuartz on my macbook. However OSC 52 control sequence doesn't seem to work. Here's how to repro:

  1. open xterm
  2. in the shell, issue printf '\e]52;c;%s\007' $(printf 'test off' | base64)
  3. try to "paste" in somewhere else, e.g., TextEdit

I don't see the text "test off" being copied in TextEdit. So seems my xterm's OSC 52 support is broken.

How can I fix it or further root cause it?


from these sources, it looks like xterm does support OSC 52:

KFL
  • 269
  • 2
    ctlseqs.html tells you why. You'd need to enable it which would be an unwise thing to do as that would introduce security vulnerabilities. – Stéphane Chazelas Aug 16 '21 at 09:32

1 Answers1

4

As commented by Stéphane, xterm does support this feature. You can enable it from the Font Menu -> allow window ops, or by xresource string:

allowWindowOps: true

This is documented in xterm's man page.

One can selective disallow a subset of window ops as @cyqsimon mentioned: with disallowedWindowOps (see man xterm). However I have not had time to figure out the proper ops to disallow to only allow-list copy/paste ops.

KFL
  • 269