Score:0

xsel not working properly after upgrade to 22.04

jp flag

I upgrade from Ubuntu 18.04 to 22.04 and having clipboard clearing issues using xsel

If I ctrl+c in a text editor and run xsel -cb; xsel -cp; xsel -cs in terminal, the clipboard doesn't clear (ctrl+v continues to paste content). Additionally, xsel -b does not return anything. However ctrl+v does paste the copied content with ctrl+c.

I also have a keyboard shortcut to clear the clipboard with the same behavior (command: bash -c "xsel -cb; xsel -cp; xsel -cs")

Now... once I use xsel in terminal with a copy command: echo hello|xsel -b everything works normally going forward.

The keyboard shortcut works as expected, even on subsequent ctrl+c content, until I log off the user or reboot the machine.

I've tried purging xsel and re-installing, but that has not resolved the issue. Any thoughts on how I can resolve?

Score:0
cn flag

xsel does not work because, upgrading to 22.04, you are now on Wayland rather than Xorg. Two options

Option 1. Replace xsel by a tool for the Wayland clipboard, e.g. wl-copy and wl-paste of the wl-clipboard package.

Option 2. Log out, then log back in in an X11 session. X11 is still available and fully working. It just is not anymore the default, to the extent that users are moved to Wayland even during an upgrade.

slatica avatar
jp flag
That did the trick. Thank you @vanadium
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.