I hope that you find this article when you have the same trouble that I had figuring out how to copy text to the system clipboard on Linux in Byobu’s scrollback mode.
What To Do
- Enter Scrollback mode by pressing
- Scroll until you can see the text that you’d like to copy.
- Turn Mouse mode to on by pressing
Alt+F12. You’ll see “Mouse: ON”
Shiftand use the mouse/trackpad to select the text that you’d like to copy. You’ll see the selected text highlighted. Press
Shift+Ctrl+cto copy. If you have a system clipboard viewer, then verify that the selected text has reached the clipboard.
- Turn Mouse mode back to off by pressing
Alt+F12again. You’ll see “Mouse: OFF”
- Leave Scrollback mode by pressing
Shift while selecting the text seems to be the critical part. Without
Shift, Byobu (screen?) pastes the text immediately then discards it, rather than pasting it into the system clipboard. You can imagine how frustrating that was for me.
Stack Overflow, “Straightforward way of copying text from byobu to system clipboard?”. Thank you to user
gcuendet. This told me that we need
Shift when selecting the text to copy.