3 ms·
I just use tmux's native copy/paste mechanism, using the keyboard. Using that it's possible to get the full scrollback buffer, or any part of it.
by pmoriarty 10y ago
I just use tmux's native copy/paste mechanism, using the keyboard. Using that it's possible to get the full scrollback buffer, or any part of it.
- aidenn0 10y agoAnd I want to paste it into a non-terminal application running locally while the tmux is on a remote host?
- fiddlerwoaroof 10y agoYou can always use ssh and something like xclip or pbcopy. Also, I always use mosh for ssh (when possible) so that I can recover my connection if I run into network issues. Since mosh works by synchronizing a virtual screen, I don't get scrollback at all without tmux or the like.
- jacobush 10y agoThis. I like terminal scrollback but it's gone for me.
- fpqc 10y agoI just added a feature to tmux-git that makes the tmux clipboard propagate up into higher clipboards for nested tmux. https://github.com/tmux/tmux/commit/4ede35c48c089abe3fca0d94dbeac44b2ac442a1 https://github.com/tmux/tmux/commit/4ede35c48c089abe3fca0d94... Keep in mind that your terminfo has to support this, so make sure your ncurses-term package is the latest release from Jan 28. I also made a patch for st to support OSC 52 propagation into Xorg, but it was rejected by the st maintainers because it uses base64 (as the OSC de-facto spec from xterm dictates). The patch for st is however in a branch of the Wayland-fork of st https://github.com/michaelforney/st/tree/selection https://github.com/michaelforney/st/tree/selection Another option if you use nested copies of tmux is to use this feature to get the remote clipboard into the local one, then yank with xclip.
- jdormit 10y ago'xclip -selection clipboard' works fine for this use case. [Edit] Assuming you have SSH configured to forward to your local X server [0]. [0] http://unix.stackexchange.com/a/16697 http://unix.stackexchange.com/a/16697
- aidenn0 10y agoUnfortunately many ssh servers gratuitously disallow X11 forwarding; tcp forwarding can accomplish the same, but then setting up DISPLAY &ct. need to be done manually.
- fpqc 10y agoIn the latest git builds of tmux (with the latest terminfo db from ncurses), you can have clipboards propagate from remote tmux to local tmux (nested configuration) using the new OSC52 control sequence implemented in a patch from 2 weeks ago. Also, if your terminal emulator (rxvt, xterm on Linux and mintty on Windows) support OSC52 escape sequences for clipboard setting, this means you don't need X11 forwarding anymore, since you can set your X11 clipboard from tmux. If anyone can help me get in touch with the libvte people, I want to patch OSC 52 support in there as well, since this is a great feature that should _not_ be relying on X11 forwarding or whatever.