screen-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Support for OSC 52?


From: Neal Fultz
Subject: Re: Support for OSC 52?
Date: Thu, 8 Sep 2022 09:52:04 -0700

You could try adding OSC code 52 to ansi.c and friends; eg in the patch I just emailed I added codes 10/12.

Once it's built in to screen's terminal emulator, you no longer need to use the \eP escapes to send the message directly to the outer terminal, screen will propagate it correctly even when nested.

On Thu, Sep 8, 2022 at 3:09 AM Nieko Maatjes <screen@nieko.net> wrote:
Hi Neal!

On Fri 02 Sep 2022 at 07:55:24 -0700, Neal Fultz wrote:
> > In my Alacritty terminal (on Debian testing, with TERM=xterm-256color),
> > if I run the following, it puts "test" in my OS clipboard:
> >
> > printf "\033]52;c;$(printf "%s" "test" | base64)\a"
> >
> > However, when run from within screen 4.09.00 (with an empty screenrc),
> > this doesn't work. (I.e., the OS clipboard stays unaltered.)
>
> I would recommend trying the helper functions from hterm:
> https://chromium.googlesource.com/apps/libapps/+/master/hterm/etc
>
> echo 123 | osc52
>
> works fine with hterm -> ssh -> screen 4.08
>
> You can read the script to see the extra escaping they do.

Thanks! The osc52 helper indeed works fine for Alacritty -> SSH ->
screen 4.09.00.

I regularly use nested screens (local+remote), and then the helper
doesn't work anymore. I got it working again like this:

# sed -E -e 's:^:\x1bP:' -e 's:$:\x1b\\:' | \
sed -E -e 's:^:\x1bP\x1bP:' -e 's:$:\x1b\x1b\\\x1b\\\\:' | \

Not sure if there's a better way.

--
N: Nieko Maatjes
I: nieko.net
E: screen@nieko.net
K: nieko.net/data/key
O: Nieko @ IRCNet

reply via email to

[Prev in Thread] Current Thread [Next in Thread]