Question - Shared Clipboard graphics

Discussions related to using VirtualBox on Windows hosts.
Post Reply
rjbeep
Posts: 2
Joined: 21. Aug 2013, 14:49

Question - Shared Clipboard graphics

Post by rjbeep »

Hi folks,

I've read that graphics are not supported in the shared clipboard *except* if you are using a Windows host...

I'm running Windows 8 as the host and Ubuntu 13.04 in a VM. Shared clipboard is working fine for text, but I still get nothing if I try to cut and past an image.
I have the Display settings for the VM set to:
  • Video Memory = 64MB
    Monitor Count = 1
    Extended Features: 3D Acceleration Enabled (have tried both enabled and disabled with same result)
I haven't been able to find a definitive answer on this. Does anybody have cut and paste of graphics between windows 8 host and Ubuntu guest working? If so, can you pass on any guidance? Specifically, I'm trying to use the Windows 8 "Snipping Tool" to grab parts of the screen into the clipboard and paste the clips back into different applications in Ubuntu.

Thanks very much for any help!
rjb
Last edited by rjbeep on 21. Aug 2013, 15:12, edited 1 time in total.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Shared Clipboard graphics

Post by mpack »

rjbeep wrote:I've read that graphics are not supported in the shared clipboard *except* if you are using a Windows host...
Where did you read that? AFAIK the only thing you can copy and paste is text. Period.
rjbeep
Posts: 2
Joined: 21. Aug 2013, 14:49

Re: Question - Shared Clipboard graphics

Post by rjbeep »

I read it over in the Mac forum... they were commenting on the Windows host.

viewtopic.php?f=8&t=35227#p183675

you'll have to put the link back together. Board is not allowing me to post links until I've been a member for more than one day. see the last post in that thread.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Question - Shared Clipboard graphics

Post by mpack »

Well, whadyaknow. I just tested it, and I was indeed able to copy a bitmap image from an XP guest to an XP host via the clipboard. Of course those two OS share a compatible graphics clipboard format, I imagine it would be hard to implement universal support. Clipboard was set to bidirectional. VBox v4.2.16, but GAs version was 4.1.26 (I had neglected to update them recently). I couldn't find mention of this capability in the manual.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Question - Shared Clipboard graphics

Post by Perryg »

Yes there was work done recently that allowed for clipboard bitmap (not sure when it was officially released though)
I tested it with png, and jpg and it failed for me though.

Don does it work now for you with other formats?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Question - Shared Clipboard graphics

Post by mpack »

Perry, when an application puts an image on the Windows clipboard then it has to conform to a clipboard standard format (basically it has to be a DIB, the memory resident equivalent of a BMP). It doesn't matter what the source file format is. E.g. if it's a JPEG then the reading app decodes it and creates a DIB in memory to hold the decompressed image. If you ask the viewing app to copy the image to a clipboard then it copies that memory DIB and puts the copy on the clipboard - etc.

What I did exactly (remember to check clipboard is set to bidirectional) was go to "www.bing.com" and save the fancy background image to a JPEG on the desktop inside my XP guest. I double clicked this so it opened in Windows Image Viewer -- hence this procedure supports any file format which Windows Image Viewer supports (I know it supports BMP, JPEG and PNG since I use those on a daily basis). I clicked the icon that transfers the resident image to the "Paint" app. I then chose Edit | Select all, then Edit | Copy - all inside the guest. I then ran a paint program I have on my XP host (an old copy of PaintShopPro v8), and selected Edit|Paste as new image there. Bing's background image appeared in a window in PaintShopPro
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Question - Shared Clipboard graphics

Post by Perryg »

Thanks Don,
Good to know. I see that working properly in my DEV build (SVN) but I did not know they had released the code yet. You would think they would have posted that in the change log. But if they did I missed it.

Since I work in the future I have features that are only available there until release and that does make it confusing some times. (see the new 4.3.0 beta feature additions) :wink:
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Question - Shared Clipboard graphics

Post by Perryg »

Well there you have it. It was officially released with the 4.3 beta version.
Shared Clipboard/X11: support for BMP-format images, contributed by François Revol
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Question - Shared Clipboard graphics

Post by mpack »

Strange. I could swear I've seen that credit before, but I can't find it now. I must admit that anyway the significance would have escaped me since there was mention of X11 but no mention of Windows.

Returning to the OPs question...
rjbeep wrote: I've read that graphics are not supported in the shared clipboard *except* if you are using a Windows host.
That credit line that Perry posted seems to claim that the data is transferred to X11 hosts too. However I don't know how Linux clipboards work, I don't know if apps will typically be able to recognize the DIB format. Presumably there would be no point in supporting X11 hosts if they didn't.
Post Reply