Score:0

python pyperclip.copy does not work in Ubuntu 22.10 (Wayland) because printenv "DISPLAY" returns 0. What to do?

cy flag

I'm running Ubuntu 22.10, with Wayland. I tried in a python script 'pyperclip.copy("xyz")'. Nothing copied to clipboard. 'printenv "DISPLAY"' under Wayland returns :0, and that, I am told is why pyperclip fails. Is there a workaround?

Score:0
cy flag

I fixed the problem with pyperclip, by switching at login to Xorg, which I found out how to do by a google search, which search I should have done before asking the question. Problem solved

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.