Ubuntu – How to copy text from the program “screen” to the clipboard

gnu-screen

I want to copy some text from screen to my clipboard. I know how to get into copy and paste mode in screen, but I want that text to go to my clipboard so I can paste it on the browser, for example.

How do I do this? Thanks!

Best Answer

  • In most programs, you would select text and press Ctrl + C to copy it. Pasting text would be done by pressing Ctrl + V. In the terminal emulator program, Ctrl + C has a special meaning, it interrupts (stops) programs by default.

    Your terminal emulator program may have other shortcuts defined. For example, Konsole and Gnome Terminal uses Ctrl + Shift + C for copying the selected text. Alternatively, select text and copy it by using the Copy option in the Edit menu or the context menu.

    If the output of your program is large, you might want to enable the scrollback buffer of screen. That can be done by adding the below line to the ~/.screenrc file:

    termcapinfo xterm ti@:te@