OSC 52 Issue
hegga opened this issue · 4 comments
Hi!
Thanks for an excellent tmux plugin! I use this extensively every day. However, at the moment I am trying to transition to using OSC 52 for remote copying over SSH.
I use the Kitty terminal, and I have the following in my kitty.conf:
clipboard_control write-clipboard write-primary no-append
I have also created a osc52.sh which looks like this:
#!/bin/bash
date >> ~/osc52.log
printf "\033]52;c;$(base64 | tr -d '\r\n')\a"
The date line is just there for logging purposes so that I know when the script has been executed.
Executing the script like shown below works as a charm and copies the text to my local clipboard over a SSH connection (inside of a tmux session):
echo testing | osc52.sh
My extrakto config looks like this:
set -g @extrakto_clip_tool_run "fg"
set -g @extrakto_clip_tool "osc52.sh"
set -g @extrakto_popup_size "68%,32%"
However, if I invoke extrakto by pressing prefix+Tab, selecting the desired text, I seem to end up in a copy/view mode which does not display anything. The logfile of the script shows that is has been run, but nothing has been copied to my clipboard. Can you think of any reason why this is not working?
Thanks again for a excellent piece of software, it really meets my needs.
- You are running tmux + extrakto on a server to which you are connected via ssh?
- In you terminal you only have ssh (no tmux)?
- What do you mean by copy/view mode?
- Did you forget
set -g set-clipboard on
? see wiki
- Yes
- On my local machine it's just the terminal SSH'ing to the remote machine to a tmux session, yes. (No local tmux session)
- Please have a look at the attached screenshot, here I have initiated extrakto and selected some text for copying, and then this happens. The script is executed, but nothing is copied to my clipboard. This shows the behaviour on MacOS, both I've tried Linux as well, and the same thing happens there.
❯ tmux show -s set-clipboard
set-clipboard on
Running tmux version 3.3a
❯ tmux -V
tmux 3.3a
That looks very strange indeed. Not sure how/why you get into this mode. Maybe some conflicting tmux options like remain-on-exit?
Please let us know if you find the reason/solution.