bugGNU Screen - Bugs: bug #63217, Add OSC 52 support to set OS...


bug #63217: Add OSC 52 support to set OS clipboard (includes patch)

Submitter:  None
Submitted:  Sat 15 Oct 2022 03:06:38 PM UTC
Votes: 100
Category:  Feature Request Severity:  3 - Normal
Priority:  * 5 - Normal Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Release:  4.99.0
Fixed Release:  None Planned Release:  None
Work Required:  None
* Mandatory Fields

Add a New Comment Rich Markup

Sat 29 Oct 2022 06:41:13 PM UTC, comment #2: 

Sure thing, I've merged your patch and mine to support OSC 10/12/52.

Best regards,

Nieko Maatjes

(file #53920)

Tue 18 Oct 2022 07:37:53 PM UTC, comment #1: 

If you are in that part of the code anyway, can you also fix the sequence for auto-detecting light/dark themes? I can attach a patch for that although not compatible with the already posted one.

-Neal Fultz

(file #53878)

Sat 15 Oct 2022 03:06:38 PM UTC, original submission:  


The OSC 52 escape sequence allows for programs to write to the OS's clipboard, which e.g. makes it possible to copy text programmatically, and/or from a remote session without having to use the mouse.

Screen sorts of supports this when wrapping the OSC 52 sequence in DCS markers, e.g. like this:
printf "\033P\033]52;c;$(printf "%s" "test" | base64)\a\033\\"

However, this doesn't work in nested screens.

The included patch adds OSC 52 support to screen itself, so the DCS markers are no longer necessary. (They continue to work just fine, though.)

Best regards,

Nieko Maatjes



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #53920:  screen-osc-10-12-52.diff added by None (4KiB - text/x-patch)
file #53878:  screen-osc.patch added by None (5KiB - text/x-patch)
file #53860:  screen.diff added by None (3KiB - text/x-patch)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by saurik (Voted in favor of this item)

    There are 100 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.


    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-02-13 saurik Carbon-Copy- Added saurik
    2022-10-29 None Attached File- Added screen-osc-10-12-52.diff, #53920
    2022-10-18 None Attached File- Added screen-osc.patch, #53878
    2022-10-15 None Attached File- Added screen.diff, #53860

    Back to the top

    Powered by Savane 3.13-9c15.
    Corresponding source code