Kirill A. Korinsky wrote:
On Tue, 20 Oct 2026 09:02:00 +0200,
David Uhden Collado <[email protected]> wrote:

Please find attached a small patch extending the existing X11
clipboard handling to OpenBSD.

Under X11, the clipboard contents depend on the process retaining
ownership of the selection.

Codex already preserves the clipboard handle on Linux. This patch
enables the same mechanism on OpenBSD, where arboard also uses X11.

It introduces no new clipboard backend and leaves OSC 52 unchanged.

I have not yet tested the clipboard behavior interactively on OpenBSD.

So, you had send a diff which you haven't tested?

This diff enables some Linux-native logic and replaces OSC 52 commands?

May I ask you why does OSC 52 doesn't work for you?

As far as I know it is supported almost everywhere, but you may need to
enable it in your terminal and / or multiplexor, if you use one.


The patch does not replace or disable OSC 52. That code is unchanged,
and I am not claiming that OSC 52 is broken.

Codex also supports copying directly to the native clipboard through
arboard. On X11, the process must keep the clipboard owner alive until
the contents are retrieved.

Codex already handles this on Linux by retaining the arboard::Clipboard
object. On OpenBSD, the same X11 behavior applies, but the object is
dropped immediately because that code is restricted to Linux.

My patch only extends this existing lifetime handling to OpenBSD.
It does not change clipboard selection, copy order, or OSC 52.

The purpose is to support native X11 clipboard copying correctly,
regardless of whether the terminal supports OSC 52.

Reply via email to