13

A few days ago I upgraded from 20.10 to 21.04. Since then Copy-paste sometimes(!) does not work.

It seemed random, but after some experimentation I think it is when I try to copy from Firefox to some other application. (The other application can be Chrome, VSCode, the terminal). The other application freezes for a few seconds and the paste does not work. However I can paste back to Firefox. Even more strangely, sometimes I can copy from Firefox to other applications as well.

Any idea what's going on?

sudo apt-get install firefox

firefox is already the newest version (88.0.1+build1-0ubuntu0.21.04.2).

szabgab
  • 427

3 Answers3

4

Ubuntu 21.04 uses Wayland by default, try to log out and make sure you are login using the Xorg/Xserver.

In the login page, look for an option to select which session you like to use. see this example pic login screen with drop-down having two options "Ubuntu" and "Ubuntu with Xorg"

Rabin
  • 155
  • 4
4

So to answer your question

Any idea what's going on?

Firefox has reoccurring bugs when using it under Wayland (i.e. on modern Ubuntu or Fedora):

So you might follow these issues to be notified once it is fixed.

Until then you might indeed have to use X11 instead of Wayland.

0

Well, time has passed and this is still broken.

I recently installed Ubuntu 22.04 and haven't decided whether to revert to using Xorg myself. Here is a workaround for the common case where you need to copy from Firefox and paste into a Terminal window under Wayland:

sudo apt install wl-clipboard

Then when you need to paste into the terminal window use wl-paste.
For example,to execute the pasted text:

`wl-paste`

Note that wl-copy is also available if you need to insert text into the clipboard.

Keith
  • 1