copy and/or paste sometimes stops working between guest and host

I typically have guests up and running at a minimum of 1 week at a time at work, sometimes up and running for several weeks before I have to reboot them. But every once in a while, I need to shut down a guest and restart it partway through the week because copy and/or paste has stopped working.

Copy/paste is typically in one of these states:

copy/paste works in both directions (all is fine)

copy/paste works independently on host and guest, but clipboard is no longer shared between the two

copy from the guest can be pasted in the host, but copy from the host does not paste in the guest. (the guest clipboard only has whatever was last copied in the guest)

the reverse of 3. -- copy from host can be pasted in guest, but copy from guest doesn't make it to the host

I typically start using my shared folder and a temporary text file to transfer bits of data I need to share until such a time as I can safely restart the guest. But this is annoying to have to do.

Unfortunately, I don't know what causes this problem to happen. I figured I'd open this ticket to start a discussion with development so the next time it happens I can help debug the situation.

I move to my guest and click paste in my text editor...and I get nothing. Same thing when I try CTRL+V, and also the same thing when I try SHIFT+INS. But in a 2nd copy of gedit on my host, I can paste the new text, so I know the copy worked.

The other direction is working fine. I can copy a line in my guest, and paste it into the host without any problem. The problem today is unidirectional.

Fixing shared clipboard issues is on my todo list, but I'm afraid that it is not something I can look at immediately, as there are a number of other things I have to deal with first. (As usual, I'm afraid I can't give a time estimate). I will certainly get back to you when I start looking at this though.

By the way, if you do start having clipboard issues in a Linux guest, restarting the VBoxClient daemon can help. This is started under the user ID of the currently logged in user, not as root, although it is setuid vboxusers (or vboxadd, can't remember now) to access /dev/vboxadd.

You might want to try out the Guest Additions from the 3.0 beta release. Do make a backup or take a snapshot before installing them just in case (I can't be 100% sure that they will work correctly with 2.2, although I think they will), but there aren't any particularly dangerous changes in the Linux Additions.

Hard to say really, but I will close it as a lot has happened to the clipboard code since the last comment here. Anyone with clipboard issues please look for a more recent ticket to add a comment to, or open a new one if you can't find a relevant ticket.