I need to copy a large text from Chrome Browser to a text editor (Gedit or Geany). The text contains around 40000 rows and each row looks like this:
{"source":"Twitter for iPhone","text":"RT @DonaldJTrumpJr: Trump fixed the VA after Obama-Biden left it in shambles/scandal\n\nTrump is trying to end forever wars. Biden voted for…","created_at":"Mon Sep 07 01:03:01 +0000 2020","retweet_count":22536,"favorite_count":0,"is_retweet":true,"id_str":"1302774341290078208"},
I tried many times but both Gedit and Geany did not work. I had to copy this text to my email and email it to myself. I still need to figure out how to get it from the Chrome Browser to my text editor.
The copy seems successful because I can paste the contents to my email. When I paste the contents to Gedit and Geany, nothing happened. Is there a limit about how much text I can copy and paste in Fedora 32?
Weird.
I created a file containing 8000 lines of random words and I opened it with Chrome. And copy&paste from Chrome to Gedit works.
I created a file containing 8000 lines with the example text you wrote in the first post, and I can reproduce the fact that copy&paste from Chrome doesn’t work. Looking at gpaste history, the copied text doesn’t even go to the clipboard, and at the same time the clipboard is empty.
However copy&paste works if I open the file using Firefox.
I would not know what is different between systems, but i am using F32, with kernel 5.8.7, gnome 3.36.6-1.fc32 gedit 2:3.36.2-1.fc32 and chrome 85.0.4183.102-1
I tried what alciregi did but used a file that I created using vim. I pasted 41,926 copies of the line posted by yifan in his first post into that file then saved it.
I then opened that file with chrome, copied the entire contents into the clipboard and pasted it into gedit which I then saved to a new file. I had no problems copying/pasting from chrome or gedit.
I wonder how much memory is installed in yifan’s and alciregi’s PCs. I have 16GB and had no problems, but I can see where inadequate memory and needing to use swap might interfere, especially when doing a copy/paste.
My computer has got 32 GB RAM installed. So, I also reproduced @alciregi’s attempt:
I copied the one line from here, opened gVim and made 40000 copies into the opened file. Then saved it without any issues. gVim was super fast in doing this.
Then I opened the file in Firefox, it complained about some JSON compatibility error - it probably expected one big JSON and not 40000 small JSONs - but I could copy it and paste into Gedit with no issues. It just was not that quick as with gVim.
I did the same with Chrome. Chrome did not complain about anything, but loading the file took more than a minute. Then it could be copied using the right click and Copy, but when I wanted to paste it into Gedit, there was nothing in the clipboard.
So, I can confirm that this is not a Gnome, or clipboard issues, that must be a Chrome issue. The question is, whether it might be actually a feature that protects the system from being overloaded with huge files?