paint-brush
tmux in practice: copy text from remote session using SSH remote tunnel and systemd serviceby@alexeysamoshkin
7,154 reads
7,154 reads

tmux in practice: copy text from remote session using SSH remote tunnel and systemd service

by Alexey Samoshkin6mNovember 27th, 2017
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

In <a href="https://medium.com/@alexeysamoshkin/tmux-in-practice-integration-with-system-clipboard-bcd72c62ff7b" target="_blank">previous post of “tmux in practice” series</a> we’ve discussed various solutions to share copied text from <a href="https://hackernoon.com/tagged/tmux" target="_blank">tmux</a> session to system clipboard. While this is rather easy to setup when it comes to local session (just pipe selected text to <code class="markup--code markup--p-code">pbcopy</code> or <code class="markup--code markup--p-code">xclip</code> or <code class="markup--code markup--p-code">xsel</code>), things get complicated when you work with remote tmux session. You need some mechanizm to transport data from remote machine to local system’s clipboard. You’re lucky if your terminal emulator handles <a href="https://sunaku.github.io/tmux-yank-osc52.html" target="_blank">OSC 52 ANSI escape sequences</a>. However, only few terminal emulators support this feature: it would work out of the box on OSX in iTerm, and most likely fail on <a href="https://hackernoon.com/tagged/linux" target="_blank">Linux</a> (unless you’re using basic xterm).

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - tmux in practice: copy text from  remote session using SSH remote tunnel and systemd service
Alexey Samoshkin HackerNoon profile picture
Alexey Samoshkin

Alexey Samoshkin

@alexeysamoshkin

L O A D I N G
. . . comments & more!

About Author

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
Stackexchange
Askubuntu
Ounapuu
Aryan
Email-database