VirtualBox

Opened 15 years ago

Closed 12 years ago

#3755 closed defect (fixed)

shared clipboard is not working in VB 2.2.0

Reported by: Stéphane Charette Owned by:
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 (6)

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

Download all attachments as: .zip

Change History (55)

comment:1 by myxiplx, 15 years ago

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 by myxiplx, 15 years ago

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 by Michael Thayer, 15 years ago

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 by Michael Thayer, 15 years ago

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

in reply to:  4 comment:5 by jhowk, 15 years ago

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...

by jhowk, 15 years ago

Attachment: vbox.log.tar.gz added

comment:6 by Frank Mehnert, 15 years ago

Resolution: fixed
Status: newclosed

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

comment:7 by Michal Pomorski, 15 years ago

Resolution: fixed
Status: closedreopened

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.

by Michal Pomorski, 15 years ago

ubuntu guest on fedora host

comment:8 by Michael Thayer, 15 years ago

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 by Michal Pomorski, 15 years ago

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 by Michael Thayer, 15 years ago

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 by Michal Pomorski, 15 years ago

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 by Michael Thayer, 15 years ago

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 by Michal Pomorski, 15 years ago

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

comment:14 by Stéphane Charette, 15 years ago

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 by Joseph Reagle, 15 years ago

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 by romarin12, 15 years ago

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 by Michael Thayer, 15 years ago

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 by Joseph Reagle, 15 years ago

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 by Michael Thayer, 15 years ago

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 by Joseph Reagle, 15 years ago

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 by Michael Thayer, 15 years ago

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 by Joseph Reagle, 15 years ago

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 by Joseph Reagle, 15 years ago

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 by Michael Thayer, 15 years ago

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 by Joseph Reagle, 15 years ago

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 by Michael Thayer, 15 years ago

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

comment:27 by BUGabundo, 15 years ago

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

in reply to:  26 comment:28 by BUGabundo, 15 years ago

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 by Michael Thayer, 15 years ago

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 by simoncpu, 15 years ago

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 ]

by simoncpu, 15 years ago

Linux amd64 host with FreeBSD i386 guest

comment:31 by Michael Thayer, 15 years ago

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 by Alexander Chemeris, 14 years ago

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 by Patrick Geoffray, 14 years ago

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.

in reply to:  26 comment:34 by Tim Turnquist, 14 years ago

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 by Tim Turnquist, 14 years ago

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 by spartan.the, 14 years ago

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 by Przemek, 14 years ago

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 by Michael Thayer, 14 years ago

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).

in reply to:  38 comment:39 by Przemek, 14 years ago

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

comment:40 by Michael Thayer, 14 years ago

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.

by Przemek, 14 years ago

Attachment: VBox.log added

comment:41 by Przemek, 14 years ago

Is that OK now?

comment:42 by Michael Thayer, 14 years ago

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

comment:43 by Michael Thayer, 14 years ago

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 by Przemek, 14 years ago

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 by Michael Thayer, 14 years ago

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?

by Michael Thayer, 14 years ago

Attachment: viewclipformats.cpp added

X11 clipboard format viewer, source code

by Michael Thayer, 14 years ago

Attachment: viewclipformats.tar.gz added

X11 clipboard format viewer, 32bit and 64bit binaries

comment:46 by Przemek, 14 years ago

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 by Michael Thayer, 14 years ago

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 by Przemek, 14 years ago

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 by Frank Mehnert, 12 years ago

Resolution: fixed
Status: reopenedclosed

Please reopen if still relevant with VBox 4.1.6.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use