• Welcome to Peterborough Linux User Group (Canada) Forum.
 

Copy-paste working only every other time in Ubuntu 19.10

Started by fox, November 19, 2019, 07:40:52 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

fox

This is bizarre. I noticed it sometime after upgrading Ubuntu 19.04 to 19.10. When I select text to copy it and then go to paste it, it works only every other time. After successfully pasting, if I go to copy something else and then paste it, nothing happens. Go back to same (or other) text, copy and paste, and it works. Literally every other time, and it doesn't matter what I copy from or paste to. It also doesn't matter whether I copy/paste by right-clicking or using the keyboard.

I've never seen this behaviour before in the 10 years plus that I have been using Linux. It's occurring on my 2011 iMac,but not my xps 13, and it isn't happening on my newer iMac running the current version of Mint. Googling this has turned up nothing. I have no idea how clipboards work in Linux, but I suspect that mine isn't working on this distro. By the way, I don't have this problem on the Mac side.
Ubuntu 23.10 on 2019 5k iMac
Ubuntu 22.04 on Dell XPS 13

Jason

#1
That really is weird!

Are you using the built-in desktop (customized Gnome, right) or another one? As you might remember, I'm using Plasma so I can't test for this. I use the Clipboard that comes with Plasma so you might want to see if Gnome has a clipboard that you can remove (might be a plugin) and see if that makes any difference.

       
  • When you go to paste after copying, is the option greyed out if you're doing it with the mouse?
  • Did you install another program or plugin recently that might be interfering?
  • Although it sounds like this isn't the case, have to ask: have you ruled out the mouse/touchpad as the problem?
  • Does it still occur after a reboot (i.e. have you turned it off and on again)?
* Zorin OS 17.1 Core and Windows 11 Pro on a Dell Precision 3630 Tower with an
i5-8600 3.1 GHz 6-core processor, dual 22" displays, 16 GB of RAM, 512 GB Nvme and a Geforce 1060 6 GB card
* Motorola Edge (2022) phone with Android 13

fox

#2
Quote from: Jason Wallwork on November 19, 2019, 12:44:50 PM

Are you using the built-in desktop (customized Gnome, right) or another one? As you might remember, I'm using Plasma so I can't test for this. I use the Clipboard that comes with Plasma so you might want to see if Gnome has a clipboard that you can remove (might be a plugin) and see if that makes any difference.


       
  • When you go to paste after copying, is the option greyed out if you're doing it with the mouse?
  • Did you install another program or plugin recently that might be interfering?
  • Although it sounds like this isn't the case, have to ask: have you ruled out the mouse/touchpad as the problem?
  • Does it still occur after a reboot (i.e. have you turned it off and on again)?
All good questions.
- I am using the default Gnome desktop.
- Option to paste isn't greyed out when using the mouse.
- I recently installed MineTime (calendar program). I tried disabling it from starting up at startup, but no effect.
- I tried different mice and keyboards (though all Apple). Still having the effect.
- Yes, it occurs after a reboot.

I'm not sure if Gnome uses a particular clipboard. It might be instructive to see what happens when I'm using another desktop environment, but with Ubuntu, sometimes installing another DE interferes with Gnome, or if one goes to remove it, you can't because it removes other stuff that you need.
Ubuntu 23.10 on 2019 5k iMac
Ubuntu 22.04 on Dell XPS 13

fox

OK, turns out that nothing is wrong with mouse, keyboard, distro or desktop environment, at least not on their own. It's certain applications! The problem happens in Word 2010, WPS Writer and LibreOffice Writer, but not TextMaker 2018 or the Terminal! What I mean is that if I copy FROM those three every second copied text isn't getting copied. However, if I copy from TextMaker or the Terminal, I can paste back into those OR into any of the applications that aren't copying every time. This is really bizarre. I have no idea how to troubleshoot this!
Ubuntu 23.10 on 2019 5k iMac
Ubuntu 22.04 on Dell XPS 13

fox

More to report. I downloaded a copy of Ubuntu 19.10 and put it on a usb stick to boot it live. Using the live distro and LibreOffice, I was able to replicate the copy-paste error with one exception. When copying the second item after a paste, pasting would put in the first item, as opposed to nothing.

Next, I downloaded the Cinnamon Desktop. Running on this desktop, there is no copy-paste problem in any app I tried.

Next, I rebooted into Gnome and used LibreOffice Writer, which wasn't working before. I did a bunch of cutting and pasting, but only with the keyboard and not the mouse. Pasting then with the keyboard worked reliably when I pasted into Writer itself or a browser, but not MS Word 2010.

Summary:
- occurs on 2011 iMac but not xps 13
- occurs only in Ubuntu 19.10, not earlier versions
- occurs in Gnome but not Cinnamon
- occurs only when copying from certain apps but not others
- in certain apps where mouse copying doesn't work, keyboard copying (cmd-c) does
- pasting is not a problem anywhere as long as text is copied from an app that doesn't have the copy problem

Conclusion: the problem is with the Gnome Desktop running on this particular iMac (and possibly others I don't have), and since I didn't have the problem before, it is either specific to Gnome 3.34 or Ubuntu 19.10.
Ubuntu 23.10 on 2019 5k iMac
Ubuntu 22.04 on Dell XPS 13

ssfc72

Mint 20.3 on a Dell 14" Inspiron notebook, HP Pavilion X360, 11" k120ca notebook (Linux Lubuntu), Dell 13" XPS notebook computer (MXLinux)
Cellphone Samsung A50, Koodo pre paid service

Jason

I just fixed your post above so what I said was shown as a quote properly. You forgot a closing bracket in the first tag.

And yes, good detective work!

To solve your problem, you could try installing a separate clipboard manager program for Gnome. Then it should take over control. And also, if the paste isn't working because the copy didn't initially worked, you'll know because the manger shows the recently copied stuff to the clipboard.

I wonder if copy/paste doesn't work with Word 2010 because it's running under WINE or CrossOver Office (forget which you use).
* Zorin OS 17.1 Core and Windows 11 Pro on a Dell Precision 3630 Tower with an
i5-8600 3.1 GHz 6-core processor, dual 22" displays, 16 GB of RAM, 512 GB Nvme and a Geforce 1060 6 GB card
* Motorola Edge (2022) phone with Android 13

fox

I actually did try a clipboard manager, but it didn't seem to help.

I run Word 2010 in CrossOver. Cut and paste seems to work OK there within a document, but not always between docs in different apps.

Incidentally, although Cinnamon seems to work fine in Ubuntu, I still prefer Gnome, despite the cut and paste problem. It's a question a aesthetics. In Mint, I can modify Cinnamon to give me a nice looking desktop. I tried doing same in Ubuntu (with Cinnamon), but I couldn't get the bar looking right - icons either too big or too small to look aesthetically pleasing on the bar.
Ubuntu 23.10 on 2019 5k iMac
Ubuntu 22.04 on Dell XPS 13

Jason

Quote from: fox on November 19, 2019, 11:33:21 PM
In Mint, I can modify Cinnamon to give me a nice looking desktop. I tried doing same in Ubuntu, but I couldn't get the bar looking right - icons either too big or too small to look aesthetically pleasing on the bar.

Did you accidentally write the order of those desktops backwards above? It sounds like you're saying that Cinnamon is easier to make look like Gnome in Ubuntu than the other way around? Unless I misunderstood what you're saying.
* Zorin OS 17.1 Core and Windows 11 Pro on a Dell Precision 3630 Tower with an
i5-8600 3.1 GHz 6-core processor, dual 22" displays, 16 GB of RAM, 512 GB Nvme and a Geforce 1060 6 GB card
* Motorola Edge (2022) phone with Android 13

fox

No, I said what I meant to say. But the meaning was unclear. I was referring to Cinnamon in both distros. I added that information to my posting to make this clear.

I'm very happy with Cinnamon in Mint on my 2015 iMac. I originally installed Mint on it because the earlier versions of Ubuntu (i.e. those using kernel 4.15 or earlier), were having trouble with my video card. Current versions of Ubuntu work fine on that iMac, but I got used to Mint and I have no incentive to change it. Ubuntu is still my go-to distro, and is thus installed on my home computer and my laptop.
Ubuntu 23.10 on 2019 5k iMac
Ubuntu 22.04 on Dell XPS 13

Jason

Thanks for the clarification. I thought you were saying that you were trying to make Ubuntu with its native desktop look more like Cinnamon look more like Cinnamon.

I didn't even know Cinnamon was a desktop option to add to Ubuntu. Makes you wonder how long before there will be an official flavour of Ubuntu (i.e. Ubuntu Cinnamon).  I wonder if MATE might be a better option for you since there is an official flavour for Ubuntu.
* Zorin OS 17.1 Core and Windows 11 Pro on a Dell Precision 3630 Tower with an
i5-8600 3.1 GHz 6-core processor, dual 22" displays, 16 GB of RAM, 512 GB Nvme and a Geforce 1060 6 GB card
* Motorola Edge (2022) phone with Android 13

fox

One can add almost any desktop to vanilla Ubuntu. I think that there might be one exception where it interferes with Gnome, but I can't remember which one it is. I picked Cinnamon because I know I can modify it to look pretty much like Gnome, at least in Mint. In Ubuntu there seem to be some customizations that don't work like they do in Mint, or at least I haven't figured out how to make them work. I'm less enamoured with Mate; looks old-fashioned to me.

At any rate, I did some more playing with Cinnamon on Ubuntu and improved it somewhat. What I still don't like is the size and spacing of apps pinned to the dock. I can modify them somewhat, but can't make them look like they do in Gnome. There they are the right size and spacing relative to the width of the dock. Appearance means a lot to me on the desktop; more than having the right-click copy work every time on my mouse. So I've retained the Cinnamon desktop and will try to figure out how to improve its customization, but meanwhile, I'm working in Gnome.
Ubuntu 23.10 on 2019 5k iMac
Ubuntu 22.04 on Dell XPS 13

fox

I did a bit more sleuthing and established that what is not working in the copy-paste sequence (on certain apps) is the copy (or cut) commands from the right-click of the mouse. But once something is cut or copied with the keyboard, the mouse right-click works OK to paste it. I'm not sure that helps any further in diagnosis, but it does establish that the problem isn't the generic contextual menu from the mouse. Instead, it is the use of the mouse for particular contextual menu options (cut and copy). And even then, the problem only occurs with every second cut/copy option. I don't know what that means!

I did the testing for this in LibreOffice Writer. It is true both within a document and between documents. I also got the same result when cutting/copying text in Writer and pasting it in either MS Word 2010 or Firefox.
Ubuntu 23.10 on 2019 5k iMac
Ubuntu 22.04 on Dell XPS 13

fox

Further testing. I went back to my Dell xps 13 and plugged in a mouse. Turns out that the problem shows up on the xps as well. I missed it before because I was using the keyboard to cut or copy.
Ubuntu 23.10 on 2019 5k iMac
Ubuntu 22.04 on Dell XPS 13

fox

I had been hoping that this problem would be solved with updates, but I don't think so. But I also tried this in several applications to see if it might be application-specific. The answer is yes and no. I can reproduce the problem 100% of the time in LibreOffice Writer. But the problem doesn't seem to happen at all in Gedit, Firefox, Simplenote or Textmaker 2018. It does seem to happen still in MS Office 2010 (running in Crossover). In all cases I tested this within a document, not between. I see mention of copy/cut/paste problems like this on the internet, but they don't seem specific to Ubuntu 19.10 gnome or even to Linux. Nevertheless, I don't have the problem in this distro with the Cinnamon desktop, and I certainly haven't seen it on any Mac or Windows 10 installation that I have. Incidentally, this is in x server, not Wayland, which doesn't work on my iMac.
Ubuntu 23.10 on 2019 5k iMac
Ubuntu 22.04 on Dell XPS 13