-
-
Notifications
You must be signed in to change notification settings - Fork 47
Remote Copy via OSC52
Christian Zangl edited this page Jul 6, 2022
·
4 revisions
NOTE: you only need this if you run tmux and extrakto on a server to which you connect via ssh. DO NOT USE if you run tmux and extrakto locally.
When you run a tmux session via ssh, you can copy from the remote system to your local machine via the OSC 52 escape sequence/protocol.
Set in tmux.conf
:
# allow OSC52 to set the clipboard
set -g set-clipboard on
set -g @extrakto_clip_tool_run "tmux_osc52"
Create a shell script osc52
(and chmod +x
) somewhere in your PATH
:
#!/bin/bash
printf "\033]52;c;$(base64 | tr -d '\r\n')\a"
You can test if it works with echo hello | osc52
when in a ssh session - the text should appear on your local clipboard.
Use it in extrakto with (tmux.conf
):
# allow OSC52 to set the clipboard
set -g set-clipboard on
set -g @extrakto_clip_tool_run "fg"
set -g @extrakto_clip_tool "osc52"