Code Monkey home page Code Monkey logo

Comments (4)

Slackadays avatar Slackadays commented on May 16, 2024

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.

Slackadays avatar Slackadays commented on May 16, 2024

@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.

lukasz-mitka avatar lukasz-mitka commented on May 16, 2024

@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.

Slackadays avatar Slackadays commented on May 16, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.