VirtualBox

Ticket #3755 (closed defect: fixed)

Opened 5 years ago

Last modified 2 years ago

shared clipboard is not working in VB 2.2.0

Reported by: stephanecharette Owned by:
Priority: major Component: clipboard
Version: VirtualBox 2.2.0 Keywords: shared clipboard
Cc: Guest type: Linux
Host type: Linux

Description

Shared clipboard is not working for many of us in VB 2.2.0. Some people cannot get the clipboard to work at all (myself included) while others report that it works for a short amount of time and then stops working. Various hosts and guests are reported to be affected.

A thread is ongoing about this topic on the forum:  http://forums.virtualbox.org/viewtopic.php?f=7&t=16474

Attachments

vbox.log.tar.gz Download (45.3 KB) - added by jhowk 5 years ago.
ubuntu-904-2009-05-28-02-05-02.log Download (40.1 KB) - added by misiu_mp 5 years ago.
ubuntu guest on fedora host
simoncpu-2009-09-02-17-03-23.log Download (47.3 KB) - added by simoncpu 5 years ago.
Linux amd64 host with FreeBSD i386 guest
VBox.log Download (60.2 KB) - added by Cyklista 4 years ago.
viewclipformats.cpp Download (3.3 KB) - added by michael 4 years ago.
X11 clipboard format viewer, source code
viewclipformats.tar.gz Download (6.8 KB) - added by michael 4 years ago.
X11 clipboard format viewer, 32bit and 64bit binaries

Change History

comment:1 Changed 5 years ago by myxiplx

Confirmed, I get the same problem here, since upgrading to 2.2, the clipboard in my Windows XP SP3 guest does not work at all. This is a huge bug.

The clipboard functionality has been flakey since 1.6, it worked fine then, but the shared clipboard has never worked properly in any release since that.

However now it's completely and utterly broken. I'm now hunting for something to disable to render my guest OS usable again.

comment:2 Changed 5 years ago by myxiplx

Just a quick comment - stopping the VirtualBox Guest Additions Service restores clipboard functionality in windows, but restarting that service doesn't re-establish the shared clipboard.

comment:3 Changed 5 years ago by michael

Stephen: I am currently working on the X11 host and guest clipboard code, and I hope that the next version will fix a number of issues. xiplx: could you report your issue in a separate defect? The Windows (host and guest) clipboard code is separate from the X11 (Linux, Solaris, BSD) code, and maintained by a different person. Thanks!

comment:4 follow-up: ↓ 5 Changed 5 years ago by michael

Sorry, Stephane, not Stephen! I need more sleep :)

comment:5 in reply to: ↑ 4 Changed 5 years ago by jhowk

Also going to tack onto this issue. Ubuntu 8.10 running 2.2.0 with XP. Shared clipboard works for a very short time that then stops. Guest actually aborted as well, but not 100% sure that it related. I've attached the log as well...

Changed 5 years ago by jhowk

comment:6 Changed 5 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

Please reopen this bug if the problem persists with VirtualBox 2.2.2.

comment:7 Changed 5 years ago by misiu_mp

  • Status changed from closed to reopened
  • Resolution fixed deleted

As of 2.2.2 I do not have a working clipboard sharing with linux host and linux guest. I run Ubuntu (8.04 and 9.04) on a Fedora host (11 prerelease). Log signifies the appropriate services are being started. The VBoxClient daemons are running on the guests. Bidirectional clipboard sharing is enabled.

Changed 5 years ago by misiu_mp

ubuntu guest on fedora host

comment:8 Changed 5 years ago by michael

misiu_mp: a few diagnostic questions. Did this work with 2.2.0? Were you able to try a Windows guest (or even a Windows host with the same Linux guests)? Did you update the Guest Additions to version 2.2.2 (probably not very relevant in this case)? Do the host and guest clipboards work apart from the clipboard sharing? Do you have any clipboard managers (klipper, glipper, synergy, rdesktop...) running on host or guest? Can you get the clipboard working by fiddling around with copying and pasting on the host/guest in any combinations? And does "ps" on the guest specifically show that "VBoxClient --clipboard" is running? Could you try killing it (SIGTERM, not SIGKILL!) and restarting it?

Thanks!

comment:9 Changed 5 years ago by misiu_mp

I never used 2.2.0. I Might be able to run windows guest soon, but this will have to wait for a while. The clipboards work on host and guest separately. No managers for clipboard. I thought i've tried doing copy-paste before and it didnt work, but just now I tried again and it does work! Both ways. VBoxClient --clipboard is running. Restarting it doesn't help.

comment:10 Changed 5 years ago by michael

I didn't quite get the "I tried again and it does work!" bit - is everything working as intended so that we can close this ticket, or is something still not working as it should?

comment:11 Changed 5 years ago by misiu_mp

Copy pasting using the context menu works, but middle-mouse-button doesnt. This is an issue since programs that support context-menu copy or ctrl-c copy are limited to those coming from gnome or kde. Some formidable programs it doesnt work with include emacs, gitk, xterm & many more.

comment:12 Changed 5 years ago by michael

This is a known limitation, mainly due to the fact that the shared clipboard was originally designed for Windows guests which don't have the concept of select and paste. There is another open ticket for this which I will look for when I am back from holiday. It will be fixed if there ever comes a day when there is nothing more urgent to be done, but that will probably be a long time in coming :)

comment:13 Changed 5 years ago by misiu_mp

I guess this bug can be closed then. Please point to the X related ticket first though.

comment:14 Changed 5 years ago by stephanecharette

No, misiu_mp, do not close. This isn't about middle-mouse-button. Some of us are experiencing problems where copy-and-paste between the host and guest suddenly stops working completely. I haven't tried this weekend's update to VB yet as I didn't see any reference to clipboard fixes. I'm running 2.2.2, and every once in a while the shared clipboard stops working until the guest (or host?) is restarted. Forum thread linked at the top of this ticket shows many people suffering from the same problem.

Any update on this problem, Michael, or anyone else?

comment:15 Changed 5 years ago by reagle

I previously reported problems with the clipboard, and with 2.2.4 I was ecstatic the keyboard/Klipper wasn't locking up. But I've noticed that while I don't have crashes/lockups, the clipboard does stop working eventually. The only consistent fix is to reboot the guest XP; I can sometimes get it back by "save the machine state" and then restoring (which is faster) but not always.

2.2.4-47978_Ubuntu_intrepid running XP with 2.2.4 additions.

comment:16 Changed 5 years ago by romarin12

Dear All,

Your friend may be:

sudo VBoxClient --clipboard

I use this on the guest when the shared clipboard stops working, which happens from times to times for no apparent reason. Interestingly this fix does not work all the time...

Host: Vista HPE x32 and Vista UE x64
Guest: Fedora 10 with VBadds
VB: 2.2.4

Cheers,

Olivier

comment:17 Changed 5 years ago by michael

The 3.0 beta version contains some clipboard fixes for X11 guests (specifically changing VBoxClient to use the same clipboard code as the host, which has been heavily reworked and bug-fixed recently). If anyone feels like trying out the beta, please give feedback as to whether it improves things with the clipboard.

comment:18 Changed 5 years ago by reagle

I tried it briefly, and didn't encounter any problems. However, it did not get a good testing.  I use VirtualBox for speech recognition in a XP guest on my Linux host (hence a lot of cut and pasting) but I had to abandon the Beta because there was a lot of poping/clicking in my USB microphone recording, interfering with NaturallySpeaking.

Running Vbox 2.2.4 on Ubuntu Intrepid with the 3B Guest Additions still installed doesn't help the clipboard problem -- if that tells you anything.

comment:19 Changed 5 years ago by michael

If the clipboard works at all with VBox 2.2.4 and the 3.0 beta Guest Additions (should be the case actually) then it tells me that the problem isn't fixed in 3.0 beta. Does restarting

VBoxClient --clipboard

(no sudo needed!) help for you?

comment:20 Changed 5 years ago by reagle

I've seen mention of that, but on Ubuntu Intrepid there is no VBoxClient command. There is a clipboard option in VBoxManage, but that's to set the property for the VM. In its stead, I created a shortcut to a .bat file that does this on the XP guest:

@echo off
sc stop VBoxService
sc start VBoxService
exit

but that doesn't seem effective.

Two other things I've noticed...

  1. Sometimes the pasted text to the XP guest has a square character at the end (even when I copy a word from the host in the middle of a sentence, so it's not like it's a LF/CR).
  1. *Sometimes* if I want to paste from guest to host and it's not working, I can get it going again by copying text in host first, then recopy text in guest to paste in host

Again, I'm using 2.2.4-47978_Ubuntu_intrepid with a XP guest, using KDE 3.5.10 and its Klipper.

comment:21 Changed 5 years ago by michael

reagle: ah, I missed that you are using a Windows guest. Would you be able to try a Linux guest to see if you have the same issues? An Ubuntu 9.04 guest is very quick to install. I'm afraid I'm only competent to talk about issues with the X11 host/guest clipboard :)

comment:22 Changed 5 years ago by reagle

As this is an intermittent problem (usually occurs at around 10 minutes of using MS Word with NaturallySpeaking and copying/pasting to/from KDE), I don't think trying an Ubuntu guest would emulate that.

comment:23 Changed 5 years ago by reagle

Still trying to find some sort of solution. So I thought I would use VBox in a headless mode, and see if the clipboard worked better in that instance.

VBoxHeadless --startvm "urd-xp"; rdesktop localhost -r clipboard:CLIPBOARD -u reagle -p -

However, the clipboard ends up failing under this scenario too.

Ubuntu Intrepid KDE 3.5.10 with Klipper

comment:24 Changed 5 years ago by michael

When the shared clipboard stops working, you might try the following in your Windows guest, to see if it makes a difference. Using the Windows task manager, stop the process "VBoxTray", and then restart it (on my guest it is found under C:\Program Files\Sun\VirtualBox Guest Additions\VBoxTray.exe). (I hope what I have described is correct for Windows guests :) )

comment:25 Changed 5 years ago by reagle

Thanks, I've added that to a batch file that's clickable from my start bar:

@echo off tskill "VBoxTray" /a sc stop VBoxService sc start VBoxService start c:\WINDOWS\system32\VBoxTray.exe exit

I'll report back if it works later. Presently, I've added and am testing a Klipper/linux addition for a Python file-based shared clipboard [1] so I can avoid VBox's all together, and it seems to be working quite well.

[1]: http://www.devx.com/opensource/Article/37233/1954

comment:26 follow-ups: ↓ 28 ↓ 34 Changed 5 years ago by michael

Could those people still experiencing clipboard problems in VirtualBox 3.0.4 please post updates to this ticket?

comment:27 Changed 5 years ago by BUGabundo

Michael I've been experiencing this for the last two months. Host is Debian squeese with Win XP guest $ apt-cache policy virtualbox-3.0 virtualbox-3.0:

Installed: 3.0.2-49928_Debian_lenny Candidate: 3.0.2-49928_Debian_lenny Version table:

* 3.0.2-49928_Debian_lenny 0

100 /var/lib/dpkg/status

I'm upgrading now to 3.0.4 and will try to report back

comment:28 in reply to: ↑ 26 Changed 5 years ago by BUGabundo

Replying to michael:

Could those people still experiencing clipboard problems in VirtualBox 3.0.4 please post updates to this ticket?

A co-worker with Ubuntu 9.04 host and XP guest running 3.0.4 just reproduced this. I'm installing it now to test it on debian.

comment:29 Changed 5 years ago by michael

I believe that this issue is fixed in the upcoming release of VirtualBox. If you would like to give it a try, the links below are to test builds of version 3.0.5 (see  here for information and warnings about test builds).

Guest Additions (for non-Linux/Solaris hosts running Linux or Solaris guests, reinstalling the Additions should be sufficient):  http://www.virtualbox.org/download/testcase/VBoxGuestAdditions-r51123.iso

32bit Linux hosts:  http://www.virtualbox.org/download/testcase/VirtualBox-2009-08-17-16-12-29-lin32-3.0-3.0.5-r51168.run

64bit Linux hosts:  http://www.virtualbox.org/download/testcase/VirtualBox-2009-08-17-16-20-19-lin64-3.0-3.0.5-r51168.run

OpenSolaris hosts:  http://www.virtualbox.org/download/testcase/VirtualBox-2009-08-17-09-38-22-sol-rel-3.0-3.0.5-SunOS-r51123.tar.gz

comment:30 Changed 5 years ago by simoncpu

Hi,

I've just installed the 64-bit Linux host, but when I start my FreeBSD VM, the OS crashes:

 http://i32.tinypic.com/jp7amp.jpg

[ simon.cpu ]

Changed 5 years ago by simoncpu

Linux amd64 host with FreeBSD i386 guest

comment:31 Changed 5 years ago by michael

simoncpu: I don't think that your problem is relevant to the other issues discussed in this ticket. To the others, if you still have clipboard issues in 3.0.4, you could give the 3.0.6 beta versions a try to see if that fixes them. I think that by now most issues should be solved.

comment:32 Changed 4 years ago by ipse

I still experience this bug in VBox 3.1.4. Clipboard works for a (short) while and then stops copying from the host to the client. My host is Ubuntu 9.10 x64, client is Windows XP SP3 Eng.

comment:33 Changed 4 years ago by patrickgeoffray

Problem still there for me with VB 3.1.4 (host is WinXP SP3, client is Ubuntu 9.04 32bit). I have to restart the client to reset the clipboard after 1-2 weeks.

comment:34 in reply to: ↑ 26 Changed 4 years ago by bigRing

Replying to michael:

Could those people still experiencing clipboard problems in VirtualBox 3.0.4 please post updates to this ticket?

I have been using several different versions of VirtualBox (currently 3.1.6r59338) on Windows7 running a virtual Ubuntu 9.10 release and I have never been able to use a bi-directional clipboard.

Thanks, Tim

comment:35 Changed 4 years ago by bigRing

I also just tested my new virtual XP Pro client and Win 98 client (also on Windows7 with VB 3.1.6) and neither of those have no clipboard sharing.

comment:36 Changed 4 years ago by spartan.the

Upgraded VirtualBox to 3.1.8.

Still the issue exists in form "it works for some time and then stops working". Actually direction guest->host worked OK but host->guest did not.

Host: WinXP, Guest: WinXP.

comment:37 Changed 4 years ago by Cyklista

I have the same problem (host Ubuntu 10.04 64 bit, guest Win XP home 32 bit) Since a couple of time copying over the clipboard from host to guest does not work. Also in the last version of VB 3.2.4. Sometimes it works for a moment and then it stops working. Actually it doesn't work only when I copy a text from OpenOffice in Host to any program in guest. Copying from a text editor (Gedit) works ok, so I have first to copy the text from OpenOffice to Gedit and then from Gedit to the guest system, but this solution is very uncomfortable and annoying. Is there any chance to solve this problem?

comment:38 follow-up: ↓ 39 Changed 4 years ago by michael

Cyklista: could you please run VirtualBox with the environment variable VBOX_RELEASE_LOG=+shared_clipboard.e.l.l2.l3.f set and first copy a text from gedit, then try from OpenOffice, and finally shut down the guest? Then attach the log file (check that it contains additional logging about the clipboard first though).

comment:39 in reply to: ↑ 38 Changed 4 years ago by Cyklista

I have uploaded this log file. I hope it is the right one.

comment:40 Changed 4 years ago by michael

It looks like the right file, but missing the information I need. Can you try

$ VBOX_RELEASE_LOG=+shared_clipboard.e.l.l2.l3.f VirtualBox --startvm <VM name>

from a terminal? There should be a lot more clipboard bits in the log file between the lines where it says it is starting the clipboard service and those where it says it is stopping it.

Changed 4 years ago by Cyklista

comment:41 Changed 4 years ago by Cyklista

Is that OK now?

comment:42 Changed 4 years ago by michael

Perfect. Now I just have to see if I can find out something useful from the log information...

comment:43 Changed 4 years ago by michael

From the log, after the text "text copied from GEDIT" (good thinking!) was transferred, there was a notification that new clipboard data was available on the host, but the request from VirtualBox for information about the new data failed because the application with the data failed to respond within a reasonable time:

00:01:40.899 clipConvertX11Targets: pValue=0000000000000000, *pcLen=0, *atomType=-2147483647, XT_CONVERT_FAIL=-2147483647

(The "XT_CONVERT_FAIL=-2147483647" is just a reminder to myself of what number corresponds to XT_CONVERT_FAIL. Note that *atomType equals XT_CONVERT_FAIL.)

Any ideas about things which might cause OOo to be slow or fail to respond on your system? Needless to say, it works fine in my test here (VirtualBox development code somewhere around 3.2.2/3.2.4, Oracle/Ubuntu OOo 3.2, pasting to Notepad in a Windows XP guest).

comment:44 Changed 4 years ago by Cyklista

Replying to michael:

From the log, after the text "text copied from GEDIT" (good thinking!) was transferred, there was a notification that new clipboard data was available on the host, but the request from VirtualBox for information about the new data failed

But the data is available for other applications in Host system. Sometimes (but seldom) by copying from O.O. to Gedit by pressing CTRL+V first time nothing happens an by pressing CTRL+V again the content of the clipboard appears 2 times.

because the application with the data failed to respond within a reasonable time:

Is it possible (and useful) to make the timeout a little bit longer?

Any ideas about things which might cause OOo to be slow or fail to respond on your system?

O.O. is not very fast at all, but now both O.O. and VB are powered by Oracle... Needless to say, it works fine in my test here By me it works also sometimes (but only for the first 5-6 times. Perhaps it is a question of O.O. settings on my system. I try to reinstall it including removing the folder in my home directory

comment:45 Changed 4 years ago by michael

I will attach a small test application (source code and binaries for 32bit and 64bit Intel machines) which roughly duplicates what the VirtualBox clipboard code does to read the available clipboard formats - in fact it is mainly code copied and pasted from VirtualBox. It would be interesting if you could run it when OOo has something in the clipboard (and VirtualBox can't cope with it) to see what it prints out.

And yes, I know OOo is also an Oracle product, but

1) I was asking if you could think of reasons why it might be slow on your system - not in general 2) I don't know any of the people working on it, and they are on the other side of Germany!

And more seriously,

3) I am looking to fix any problems VirtualBox might have (particularly ones I might have introduced), and if other applications work with OOo there is at least a chance that we have one of those.

Regarding the occasional issues with Gedit you mentioned, are you running any sort of clipboard manager, or Java applications that do things with the clipboard?

Changed 4 years ago by michael

X11 clipboard format viewer, source code

Changed 4 years ago by michael

X11 clipboard format viewer, 32bit and 64bit binaries

comment:46 Changed 4 years ago by Cyklista

OK. Thank you! I will try it on weekend. At the moment it works, but I didn't change anything in the settings. Sometimes it worked for a moment and then it stopped. The printout of the 64 bit version after copying to the clipboard from OpenOffice is:

Found clipboard format: text/plain;charset=utf-8
Found clipboard format: text/plain;charset=UTF-8
Found clipboard format: UTF-8
Found clipboard format: UTF8_STRING
Found clipboard format: COMPOUND_TEXT
Found clipboard format: STRING
Found clipboard format: application/x-openoffice-embed-source-xml;windows_formatname="Star Embed Source (XML)"
Found clipboard format: text/richtext
Found clipboard format: text/html
Found clipboard format: application/x-openoffice-link;windows_formatname="Link"
Found clipboard format: application/x-openoffice-objectdescriptor-xml;windows_formatname="Star Object Descriptor (XML)";
classname="8BC6B165-B1B2-4EDD-aa47-dae2ee689dd6";typename="OpenOffice.org 3.2 Dokument tekstowy";viewaspect="1";
width="16999";height="2995";posx="0";posy="0"
Found clipboard format: MULTIPLE

and the 32 bit version:

Found clipboard format: text/plain;charset=utf-8
Found clipboard format: text/plain;charset=UTF-8
Found clipboard format: UTF-8
Found clipboard format: UTF8_STRING
Found clipboard format: COMPOUND_TEXT
Found clipboard format: STRING
Found clipboard format: application/x-openoffice-embed-source-xml;windows_formatname="Star Embed Source (XML)"
Found clipboard format: text/richtext
Found clipboard format: text/html
Found clipboard format: application/x-openoffice-link;windows_formatname="Link"
Found clipboard format: application/x-openoffice-objectdescriptor-xml;windows_formatname="Star Object Descriptor (XML)";
classname="8BC6B165-B1B2-4EDD-aa47-dae2ee689dd6";typename="OpenOffice.org 3.2 Dokument tekstowy";viewaspect="1";
width="16999";height="2995";posx="0";posy="0"
Found clipboard format: MULTIPLE

1) I have no idea why it is so slow. About 1 year ago I had no problems with the clipboard sharing. Could it be because of Google Desktop indexing tool?

3) No I have no clipboard manager. I tried it some time ago hoping to solve the problem, but it didn't help.

comment:47 Changed 4 years ago by michael

The 64bit and 32bit versions should be identical, I just uploaded both for convenience of anyone with a 32bit system who might need it. It would make most sense to run the utility straight after a failed copy from OOo to the guest - if you still get output like above and still can't copy to the guest after that then I will have to rethink what might be going wrong! I assume that Google Desktop indexing is in the guest?

comment:48 Changed 4 years ago by Cyklista

Today it doesn' work again. The output of the script is:

Found clipboard format: text/plain;charset=utf-8
Found clipboard format: text/plain;charset=UTF-8
Found clipboard format: UTF-8
Found clipboard format: UTF8_STRING
Found clipboard format: COMPOUND_TEXT
Found clipboard format: STRING
Found clipboard format: application/x-openoffice-embed-source-xml;windows_formatname="Star Embed Source (XML)"
Found clipboard format: text/richtext
Found clipboard format: text/html
Found clipboard format: application/x-openoffice-link;windows_formatname="Link"
Found clipboard format: application/x-openoffice-objectdescriptor-xml;windows_formatname="Star Object Descriptor (XML)";classname="8BC6B165-B1B2-4EDD-aa47-dae2ee689dd6";typename="OpenOffice.org 3.2 Dokument tekstowy";displayname="file:///home/przemyslaw/t?umaczenia/2010/1099-2010.odt";viewaspect="1";width="16999";height="2995";posx="0";posy="0"
Found clipboard format: MULTIPLE

Google Desktop is running on the host system. I always copy short text pieces of max. 50 signs from an OpenOffice text document or spreadsheet on host to a database program in guest.

comment:49 Changed 2 years ago by frank

  • Status changed from reopened to closed
  • Resolution set to fixed

Please reopen if still relevant with VBox 4.1.6.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use