Page 1 of 1

Copy GNU Screen buffer in guest to host's clipboard?

Posted: 25. Mar 2017, 12:16
by ugultopu
I am using Ubuntu as guest. I don't have X installed in it. I would like to copy the GNU Screen buffer of the guest to host's clipboard. How can I accomplish this?

My host is macOS Sierra. and my VirtualBox version is 5.1.18.

Re: Copy GNU Screen buffer in guest to host's clipboard?

Posted: 25. Mar 2017, 15:47
by mpack
AFAIK, you can't. A clipboard is a GUI concept, designed to transfer data between app windows.

I'm also not sure what you mean by a "GNU Screen Buffer", but perhaps you refer to a Linux feature I'm not familiar with. AFAIK if you don't have a GUI then all you have a text terminal. The terminal output can be redirected to a file in the normal way, and you can copy that file to a shared folder. That's the only practical way I know to do it.

Going a different tack entirely: Win7 and later hosts have a feature called the snipping tool which can be used to grab the contents of windows and store them on a clipboard. If don't know if OSX has anything similar - no doubt it could have. Plus the data on the clipboard will be an image of course, not text.

Re: Copy GNU Screen buffer in guest to host's clipboard?

Posted: 27. Mar 2017, 00:36
by socratis
VirtualBox has also the "Take screenshot (HostKey+E)" capability, so you don't even need the host OS's support for that, but in any event, OSX does have a built-in tool (or two). Preview and Grab both can do what mpack is suggesting.
mpack wrote:Plus the data on the clipboard will be an image of course, not text.
Ah, for that, I usually use some of the online OCR engines. Some are better that others, mostly because the worse are trying to interpret the text as something that makes sense in English, which is not always the case in a CLI.