-
-
Notifications
You must be signed in to change notification settings - Fork 878
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clipboard sharing with Wine apps does not work in Hyprland. It's fine with Swaywm and other wayland WMs #2319
Comments
Clipboard sharing works in wine-wayland |
EDIT: Now wait a second. I think we've got it. It's working now. Thank you very much.
|
https://aur.archlinux.org/packages/wine-wl-git solves the issue for me as well. @simonm if Issue is solved you could close the issue ;) |
Yes - this solved it. Many thanks all! |
having wine-wl-git installed does not fix the issue for me, cant copy paste into any apps running wine and its driving me crazy |
Are the games usin the correct wine version in lutris or pure wine, I am also using a clipboard history retaining service clipmon https://git.sr.ht/~whynothugo/clipmon maybe using a clipboard retaining service is also a requirement. |
ive tried a couple of different configurations, at first it was just wl-clip-persist and it didnt work, so i tried getting a clipboard manager and syncing the primary and secondary and it didnt work. |
@simonm can you please re-open this? the bug isn't fixed, and "use a different wine" isn't applicable for everyone |
An actual fix may be
|
Nice. Still a workaround though, not a fix. @vaxerski could you re-open this? |
This has annoyed me for months, just found this ticket today. Using a different wine is not an alternative, I already use specific Wine versions with specific patches to address other issues through Bottles. Glad to see there' a workaround though, so I don't have to manually type out my 35 character random password into the Baldur's Gate 3 launcher. |
|
And funny that it doesn't work all the time, I'm not sure where the problem is. |
Also, without the xclip workaround, I noticed that I think the reason the infinite copying occurs is that when Edit: the command is inconsistent. I now use |
Re-opening as per the request in the comments. Don't overlook the possible issue of PRIMARY v CLIPOBOARD on Xorg or Wayland. You'll need to set up clipboard synchronisation as others have commented. I use copyq. There are other options. |
I've tried using copyq and I've made several tests on this regard, when it doesn't copy something on this regard, copyq is totally ignored. |
Hi @Menelkir - It may be copying to the "wrong" clipboard. What happens if you look at 'But - let me add: It only started working when I installed wine-wl-git |
It doesn't show any text unless I use the workaround. |
This will freeze the program when copying large texts. e.g. copying https://github.com/torvalds/linux/blob/master/Makefile from firefox (native wayland mode), then firefox will freeze. |
Just out of curiosity, is it clear what the issue is here? From the workarounds, it sounds to me like Hyprland should put copied text into the "XA_CLIPBOARD" selection in the Xwayland clipboard, rather than "XA_PRIMARY" (or maybe both?). If so, isn't this a trivial one-line fix? 🤔 |
given that sway doesn't have this problem, i assume it's a small problem with a simple fix buried somewhere in the code. unfortunately i'm not familiar enough with either project to know how to approach it without help. |
I failed to launch wine in nested hyprland session, but wps, another xwayland app that can't paste things from native wayland. Here's wlroots log when trying to copy sth when another random xwayland app opened:
Here's the one when wps opened:
The log above indicates that wps is trying to read from clipboard right after we yanked something, and the read is denied by wlroots because xwayland window is not focused. But if I keep mouse focusing on wps window when copying with
I guess the cause for wine is the same, and an obvious workaround looks to me is to bypass the denial of wlroots. I don't know how sway deal with such issue. |
nicely done! but if this is indeed the problem, what is sway doing differently that avoids it? |
I sent a PR to wlroots https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4359, which drops the restriction of unfocused xwayland apps to read clipboard. Pasting contents from native wayland to wine works with it. |
Edit: |
This breaks coping images from/into xwayland apps at least on my system. When I copy an image from my web browser into another window I get the html of the image instead of the image itself. That works fine when wl-paste is not running or I use wl-paste only to puch stuff into cliphist. What would be best way to add cliphist store to that workaround? |
I have an aur package w/o the xwayland clipboard restriction of wlroots. Unfortunately, it won't get upstreamed because wlroots maintainers don't think dropping the restriction is the right thing to do |
Thanks! Far from perfect solution especially that it completely messed up hyprpm and I need to build split-monitor-workspaces by hand but got it working so I am fine for now. |
Agreed. This is my only real issue with Hyprland. |
@vaxerski I'm curious to hear if there are any solutions you can think of that don't involve installing custom versions of wine or hyprland 😄 |
That doesn't work for me either. Whatever is in my clipboard prior to starting up a game in Proton is accessible (with or without the xclip workaround) but any consecutive copy paste is not picked up on. Need to learn more about this before I can contribute anything sensible to the discussion. |
A version of the workaround that declines transfer if the copy contains image formats. |
tools including wl-clipboard and xclip are unable to perfectly keep wayland and x clipboards in sync because they can't forward every mime types of the yanked stuff, check |
Didn't work. It seems anything in my clipboard that is there prior to launching a xwayland application is remembed but any subsequent copies are not. See [#2319](hyprwm/Hyprland#2319)
This used to work for me but recently it broke.
this log is repeated ad infinitum with random resource id. |
As the title suggests, I cannot get clipboard sharing to work between wine applications and hyprland.
I've simplified the issue and can replicate easily using just notepad.exe.
Copying from notepad.exe running under Wine successfully goes to the Wayland WM clipboard.
Copying from Wayland / Hyprland does NOT go to the clipboard in Wine.
Clipboard is fine in both directions with swaywm (which is where I am migrating from). I am using the same setup - with
copyq
- managing the clipboard in both places.I have also been able to replicate the same results using the recommended / documented clipboard settings in the Hyprland Wiki:
exec-once = copyq --start-server
and separately,
exec-once = wl-paste --type text --watch cliphist store #Stores only text data
exec-once = wl-paste --type image --watch cliphist store #Stores only image data
The problem seems to only occur in Hyprland, which is why I raise this.
Is there a suggestion to help me troubleshoot root cause please?
Thank you!
The text was updated successfully, but these errors were encountered: