copy and paste does not always work

Asked by Kev

This seems to be a consistent problem. When one copies using right mouse click and paste using the same some times the paste option is gone, that means the data being copied has gone ( not stored on clipboard). I have noticed that if you keep the file that you are copying from open and past elsewhere then it works most of the time.
Like copy text from the net to openoffice ( I am generating a Ubuntu tweak file of all the useful bits that worked for me so that if I have to start from scratch I do not have to trawl the net again). This has been frustrating when I have closed say Firefox after doing a highlight and copy, then close the browser and try to paste in the open office file... pasted data gone?????? any ideas.... seems clipboard is not working as well as it could... any ideas any one... thanking you in advance for your help.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
zimbatm
Solved:
Last query:
Last reply:
Revision history for this message
Best zimbatm (zimbatm) said :
#1

Hi Kev,

you are absolutely right, this is a confusing situation. Just so that you better understand, then I'll give you the solution : there are actually two clipboards in the X-windowing system. The first works with highlighting to copy, and middle-mouse click to paste. The second-one works with the keyboard shortcuts Ctrl-C and Ctrl-V like on Windows. Both systems work by keeping a pointer to the selected data. In short, if you close your source application, you won't be able to paste the selected text.

Now there is a solution, it is called a "clipboard manager". Both Gnome and KDE desktop environments provide one on their default installation. What it does is simply make a copy the copied text so that you can close the source application, because in fact it is now the clipboard manager that acts as the source.

I made some tries on my Gnome desktop, apparently it only works for the Ctrl-C-Ctrl-V clipboard. Make sure that you have the "gnome-settings-daemon" running. ( You can check by launching System -> Admin -> System Monitor and go in the Processus tab )

Cheers,
  zimbatm

Revision history for this message
Kev (kevvroxx) said :
#2

Thanks zimbatm, that solved my question.

Revision history for this message
Kev (kevvroxx) said :
#3

sorry was too hasty in saying this was solved... tried the Ctrl-C-Ctrl-V thing and closed sourse application and no luck pastinf in open office or other such programs... I did check "gnome-settings-daemon" running. ( You can check by launching System -> Admin -> System Monitor and go in the Processus tab ) it was running but am not sure how to check if "clipboard manager" is running...

Revision history for this message
zimbatm (zimbatm) said :
#4

Yes, I forgot to mention that the application must support the Ctrl-C-Ctrl-V mode.

Revision history for this message
Kev (kevvroxx) said :
#5

thanks again Zimbatm.. does this mean that the document I am pasting to will need to have this support by default? or do I need to turn this on somewhere in Ubuntu?
 I would have thought by now with all the smart people making this great OS that this fundimental aspect of a Gui would have been well and truly sorted like ........ dare I say it shuuuuu quietly windows. :)

Revision history for this message
Kev (kevvroxx) said :
#6

what is this xclipboard I've seen on hardy... is it what you were talking about and how do I get it working? Sorry about the persistant question regarding this but I was a user of the "dark side OS" and was never plagued by this type of error... perhaps I should just change my ways of not closing programs before I've pasted.

Revision history for this message
zimbatm (zimbatm) said :
#7

"does this mean that the document I am pasting to will need to have this support by default?". Yes, Ctrl-C-Ctrl-V must be supported by the program. I don't know if you've heard of GTK or QT, if not it doesn't matter, but nowadays programs mostly use these toolkits that have Ctrl-C-Ctrl-V support integrated. If you encounter a program where you can't paste like this, use the select-to-copy-middle-mouse-to-paste method.

"I would have thought by now with all the smart people making this great OS that this fundamental aspect of a Gui would have been well and truly sorted like ........ dare I say it shuuuuu quietly windows. :)"

Hehe, it's true that Linux is not perfect. In that case, you can see that there are even two competing techniques. It is sometimes the price to pay for not having a big boss saying "do it like this or I'll fire you!". In return, you also often get tools that no company would have paid for but that are truly useful.

"what is this xclipboard I've seen on hardy... is it what you were talking about and how do I get it working? Sorry about the persistant question regarding this but I was a user of the "dark side OS" and was never plagued by this type of error... perhaps I should just change my ways of not closing programs before I've pasted."

Ok, let's get to the point :) If you are using Gnome, try try installing the "glipper" package. Then right-click on the toolbard on the top of the screen and select "Add to the board" or something similar (my install is in french). Then select the "Clipboard manager". Tell me if it works !

Revision history for this message
Kev (kevvroxx) said :
#8

Zimbatm thanks you for your advice... I will try your ideas and well I still like Ubuntu and have all but switched over from Xp now... this small issue is nothing in the big picture... once again many thanks... I will consider this thread or question now closed... I will let you know it it works as soon as I can.

Revision history for this message
Kev (kevvroxx) said :
#9

Yip it worked.... I copied my previous text and closed firefox the opened and pasted... that's it.... thanks