Comments (4)
I just did some testing and although I wasn't able to get anything to crash, Firefox did hang completely. I installed WSL2/Brew/Clipboard and tried your setup. At first, copying the text seemed to work. But I had a very similar issue to Firefox/Chrome when using Clipboard again to see that copied text. It just seemed to hang and do nothing. However, what did work though is accessing the text through the virt-manager
Windows VM that I'm doing all of this in. This didn't make much sense, so I compiled Clipboard manually. This time, copying text worked as before, but now I was able to see it by using Clipboard again. This was a Debug build so I had all the logs available. It turns out what's happening is when Clipboard copies something, the X11 daemon immediately provides some content to what I think is wslg
https://github.com/microsoft/wslg which then goes to the Windows clipboard. However, some issue prevented the Brew version from providing more data. The compiled version did work here though, but only for Clipboard itself. Firefox still wouldn't work and Notepad just wouldn't see anything. Then I tried using the Windows version of Clipboard. After invoking it and showing the WSL2 content, pasting into Firefox and Notepad somehow started working. Clipboard now served up all the X11 requests that wslg
needed.
So, the moral of the story here is that there is some funky issue that's fixed in the latest commit, but that issue only involves getting the content using Clipboard. The Chrome/VSCode/Firefox issue seems to be fixable by using Clipboard on Windows once, but otherwise it looks to be a WSL2 bug.
from clipboard.
@lukasz-mitka So from here, it looks like you might want to make an issue in https://github.com/microsoft/WSL to see if it's a WSL2 problem because there are a few similar issues there that have to do with the clipboard.
from clipboard.
@Slackadays
wow. Thanks for quick and thorough investigation!
I stand corrected, it only hangs, no crash.
It's too much for me to comprehend to create viable issue in https://github.com/microsoft/WSL so I'm not going to do that. I'm leaving it up to you if you're interested. Sorry.
One more thing. I think I've seen brew installing wayland
together with clipboard
, maybe that has something to do with it.
from clipboard.
@lukasz-mitka I just tried this again, and I can't seem to make Clipboard cause this behavior. I was going to try xclip
and see if it does the same thing, but now that the issue fixed itself at least on my end, I can only guess what happened there. However, it may have been a simple shutdown/startup/reboot that fixed it as I did all the initial testing in one session, so see if this fixes things on your end as well.
Does xclip
have the same behavior for you? See if you can try out the latest Clipboard commit (Brew might have updated it for you already) because it may be fixed there for you.
Otherwise, I can close this issue as even with the behavior, it looks to be WSL's fault for not coping with X11 messages which isn't something Clipboard can fix. However, we can reopen this if there's more info on the underlying issue.
from clipboard.
Related Issues (20)
- Windows: Unicode characters break Clipboard HOT 4
- Keeps copying text only HOT 5
- v0.8.2 it just show one itme HOT 1
- v0.8.2 how to select item HOT 2
- Strip / Escape new lines when displaying info HOT 1
- Version 0.8.2 fails to build for Homebrew HOT 4
- Assertion '__pos < this->_M_len' failed HOT 10
- Clipboard v0.82 (flathub on Ubuntu) steals focus every two seconds on Wayland HOT 5
- Wildcards do not work on windows
- cb cut does not remove the clipboard entry on windows
- cb cannot dynamic recognize size
- support cb gounp HOT 3
- global_path.persistent should handle case where XDG_STATE_HOME is not defined HOT 1
- Unable to use the default clipboard on Windows HOT 2
- CB memory leaks and consumes all RAM on system HOT 15
- Bug(ish): new contributions link leads to 404 error
- Persistent directory bug HOT 1
- Breaks my Ubuntu setup HOT 1
- when i select item , but copy is not it
- GUI integration coredumps after some time
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clipboard.