copy-pastebyobu

Straightforward way of copying text from byobu to system clipboard?


I frequently want to copy snippets of command outputs to the web browser. Doing so is nice and simple in gnome-terminal (mouse-select, right-click, copy) but seems to be not so straightforwardly possible in byobu.

The procedure for copying outlined in the docs is: Enter scrollback using alt-pgup or alt-pgdn, press the spacebar to start highlighting text, use up/down/left/right/pgup/pgdn to select the text, and press enter to copy the text. You can then paste the text using alt-insert or ctrl-a-].

However, this doesn't copy to system clipboard (and seems to involve quite a few keystrokes)

This source suggests using xsel https://askubuntu.com/questions/33789/how-do-i-integrate-byobus-copy-buffer-with-the-x-clipboard which doesn't work for me and would be rather less convenient anyway(what if I want to scroll up to several commands earlier that ran in a different context?)

What I would like is, ideally, a way to copy to the system clipboard that works in the same as gnome-terminal eg. highlight -> ctrl+shift+c or right-click copy or some way to integrate the byobu copy buffer with the system copy buffer.

I'm using Ubuntu 16.04 with Gnome and byobu 5.106-0ubuntu1


Solution

  • As pointed out in this comment, holding the shift key seems to be the solution to your problem. So: